On Fri, Jan 23, 2009 at 11:33:29AM +0100, fka...@googlemail.com wrote: > Peter Poeml: > > > It should work just like that. In which line does the > > crash precisely happen? > > In my code (see below) it is triggered if I try to set the > apr_table_t and *then* return. When returning *only* there > is no seg fault. Please see the comments in the code. It > must be something trivial... > > I recompiled apache with debugging symbols, however, I > failed to track the issue with the debugger gdb since I am > not very familiar with it. Is there an easy way to get more > info about the crash? > > > > If the innocent looking lines trigger this, I would expect > > that something is hosed already when they are reached, > > something like corruption of the request object by > > something else which is going on "above". > > > FYI, this is my little module:
I built the module from that source and it works for me. It doesn't crash. % curl -sI 'http://mbopensuse.suse.de/zrkadlo/repositories/Apache/openSUSE_11.0/Apache.repo?country=us' HTTP/1.1 302 Found Date: Fri, 23 Jan 2009 11:10:15 GMT Server: Apache/2.2.11 (Linux/SUSE) mod_zrkadlo/2.2 Location: http://localhost/abcdef Content-Type: text/html; charset=iso-8859-1 > > Can you reproduce it easily, i.e. with starting the server > > and issueing a single request? > > Yes, exactly. I restart apache, open the browser to > http://localhost and then apache crashs. > /var/log/apache2/error_log: > > [Fri Jan 23 11:02:35 2009] [notice] Apache/2.2.10 (Unix) > DAV/2 mod_ssl/2.2.10 OpenSSL/0.9.8j SVN/1.5.4 configured -- > resuming normal operations > > [Fri Jan 23 11:02:40 2009] [notice] child pid 12364 exit > signal Segmentation fault (11) > > [Fri Jan 23 11:04:19 2009] [notice] caught SIGTERM, shutting > down > > Hm... I suggest you compile with debug symbols and run it under gdb. apxs2 -c -Wc,"-Wall -g" mod_hs.c # (make sure to load .libs/mod_hs.so) # start it under gdb like the following. It'll start only a single # process that doesn't fork, which makes it easier to debug the crash gdb --args /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DONE_PROCESS -DNO_DETACH # type 'r' in gdb to run it # trigger the crash # look at back trace with 'bt' and 'l', observing the local variables I hope you get a good trace, which helps you further. Peter -- Contact: ad...@opensuse.org (a.k.a. ftpad...@suse.com) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research & Development
pgpKA2U1PBVIW.pgp
Description: PGP signature