You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lasse Kliemann <la...@plastictree.net> on 2009/04/08 19:51:25 UTC

svnserve segfaults on new FSFS format with limited memory

The SSH server on my machine runs with limited memory resources, 
set via 'softlimit' <http://cr.yp.to/daemontools/softlimit.html>. 
This used to work for years. However, the FSFS format introduced 
in the 1.6.x series doesn't seem to like it:

   $ svnadmin create --fs-type fsfs repos

   $ svn co svn+ssh://USER@localhost/PATH/TO/repos
   svn: Network connection closed unexpectedly

The kernel log shows:

   kern.info: svnserve[27837]: segfault at 4b ip b7b5040d 
   sp bfef2200 error 4 in libpthread-2.9.so[b7b4a000+14000]


It works okay if I use '--fs-type bdb' or '--pre-1.6-compatible' 
to create the repos.

Local access via 'file://...' works in any case.

It also works when I set the memory limit very high:

   softlimit -m 900000000000 ...

It does _not_ work with 'softlimit -m 800000000000 ...'.

It is hard to believe that a memory limit of several hundreds of 
gigabyte would not be enough. And, if the memory limit in fact 
was an issue, there should be an 'out of memory' error message 
and not a segfault. So, there seems to be something wrong here.


$ svn --version
svn, version 1.6.0 (r36650)
   compiled Apr  8 2009, 16:57:13

$ gcc --version
gcc (GCC) 4.1.2

GCC is compiled with hardening patches, e.g., for stack 
protection.

Operating system is Linux 2.6.27.21.

Subversion is compiled with 'CFLAGS=CXXFLAGS=-march=i586 
-mtune=i586'. It is configured  with ' --disable-nls'. The test 
suite ('make check') runs through fine.

Re: svnserve segfaults with 1.6 FSFS if stack size below 2 GB

Posted by Lasse Kliemann <la...@plastictree.net>.
* Message by -Lasse Kliemann- from Wed 2009-04-08:
> The SSH server on my machine runs with limited memory resources, 
> set via 'softlimit' <http://cr.yp.to/daemontools/softlimit.html>. 
> This used to work for years. However, the FSFS format introduced 
> in the 1.6.x series doesn't seem to like it: [...]

I did some more tests.

softlimit offers four more specific options than -m, namely -d, 
-s, -l, and -a. Using -m is equivalent to giving all these four.

Any combination of -a, -d, and -l (apparently) does not cause 
trouble.

However, using -s (which causes softlimit to make the system call 
setrlimit with RLIMIT_STACK) and with (apparently) anything below 
2147483648 (= exactly 2 GB) gives a segfault. It works for 
2147483648 and (apparently) anything higher than that.

The limits I gave yesterday are of course useless, since they are 
much larger than what can be stored in an unsigned long int.

So, in a nutshell, svnserve segfaults with 1.6 FSFS whenever the 
stack size is limited to something below 2 GB.