[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: segfaults with subversion 1.1.0 with apache on SuSE 9.1

From: Peter Poeml <poeml_at_suse.de>
Date: 2004-10-01 10:22:38 CEST

On Thu, Sep 30, 2004 at 04:20:13PM -0500, kfogel@collab.net wrote:
> Moby <moby@mobsternet.com> writes:
> > Following Peter Poeml's suggestion for me when I had the same issue
> > with subversion 1.05 (I did not follow the problem with 1.05 since the
> > downloaded RPMS worked fine), I ran strace against httpd2-prefork.
>
> Hmm, do you know how to use GDB? If so, the section "Debugging the
> server" in http://svn.collab.net/repos/svn/trunk/HACKING gives
> instructions on debugging httpd under GDB:
>
> Debugging the ra_dav server
> ---------------------------
>
> 'mod_dav_svn.so' contains the main Subversion server logic; it runs as
> a module within mod_dav, which runs as a module within httpd. Since
> httpd is probably using dynamic shared modules, you normally won't be
> able to set breakpoints in advance when you start Apache in a debugger
> such as GDB. Instead, you'll need to start up, then interrupt httpd,
> set your breakpoint, and continue:
>
> % gdb httpd
> (gdb) run -X
> ^C
> (gdb) break some_func_in_mod_dav_svn
> (gdb) continue
>
> The -X switch is equivalent to -DONE_PROCESS and -DNO_DETACH, which
> ensure that httpd runs as a single thread and remains attached to the
> tty, respectively. As soon as it starts, it sits and waits for
> requests; that's when you hit control-C and set your breakpoint.
>
> You'll probably want to watch Apache's run-time logs
>
> /usr/local/apache2/logs/error_log
> /usr/local/apache2/logs/access_log
>
> to help determine what might be going wrong and where to set
> breakpoints.
>
> I think that's probably the best way to find the cause of the
> segfault...

Before that step, it can be generally helpful to use the recently added
apache module mod_log_forensic by setting "ForensicLog
/var/log/apache2/forensic_log", to be able to easily see which request
crashed the server and what was sent by the client. [1]

Of course, this might not be needed at all if any request makes the
server crash, which makes it easy to reproduce.

About this particular case: if you see the segfault at each request,
then it would point to a general incompatilibity like compiling one
thing with large file support but not the other. Make sure to use the
same CFLAGS when building subversion that were used to build apache /
libapr0. Apache modules _must_ be compiled with CFLAGS=`apxs2 -q
CFLAGS`.

Peter
[1] http://httpd.apache.org/docs-2.0/mod/mod_log_forensic.html

-- 
Thought is limitation. Free your mind.

  • application/pgp-signature attachment: stored
Received on Fri Oct 1 10:25:39 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.