Ich komme hier überhaupt nicht weiter:
Der apache meldet seit dem update auf php5 (5.2.0) von php5.1 (apt-get.org) ständig folgendes bei Seitenaufrufen:
Code: Alles auswählen
[Wed Sep 19 09:41:43 2007] [notice] child pid 9772 exit signal Segmentation fault (11)
[Wed Sep 19 09:41:45 2007] [notice] child pid 9594 exit signal Segmentation fault (11)
[Wed Sep 19 09:41:47 2007] [notice] child pid 9593 exit signal Segmentation fault (11)
[Wed Sep 19 09:41:49 2007] [notice] child pid 9584 exit signal Segmentation fault (11)
Nun wollte ich apache debuggen, aber der gdb steigt aus:
Code: Alles auswählen
# gdb --args apache -X -f /etc/apache/httpd.confGNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /usr/sbin/apache -X -f /etc/apache/httpd.conf
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Cannot find user-level thread for LWP 30275: generic error
(gdb) bt
#0 0xb7ff7010 in _dl_debug_state () from /lib/ld-linux.so.2
#1 0xbfffd860 in ?? ()
#2 0xb7fedc35 in ?? () from /lib/ld-linux.so.2
#3 0xb80011e0 in _rtld_global () from /lib/ld-linux.so.2
#4 0xb80016a4 in ?? ()
#5 0x00000000 in ?? ()
(gdb) quit
The program is running. Exit anyway? (y or n) y
Oder funktioniert gdb bei threaded Programmen nicht in einem vserver?
Hier ein Link, den ich gefunden habe:
http://groups.google.com/group/linux.de ... 709e6b10cc
Auch das argument -X für apache wird ja scheinbar völlig ignoriert, da apache ja einen neuen thread öffnen will, oder gdb einen thread erwartet.
http://svn.collab.net/repos/svn/tags/0. ... _setup.txt
http://techpubs.sgi.com/library/tpl/cgi ... -for-linuxADDENDUM 2: Debugging Apache
'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.
If you need to debug the server, follow this recipe:
% gdb httpd
(gdb) run -X
^C
(gdb) break some_func_in_mod_dav_svn
(gdb) continue
The '-X' switch runs httpd in a single thread, and insures it won't
detach from the tty. As soon as it starts, it will sit and wait for
requests. Then hit control-C and set your breakpoint.
kfogel adds:
Hmmm, I had thought httpd 2.0 also had these options: -DONE_PROCESS
and -DNO_DETACH. How are they related to -X, and/or should they be
used in combination with -X? Anyone know?
Siehe auch:3.3.2 gdb unable to debug threaded apps
When using gdb to debug applications, you may see the error messages
similar to the following:
Error while reading shared library symbols:
Cannot get thread info: generic error
Cannot find user-level thread for LWP 8273: no LWP to satisfy query
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323773
EDIT:
Musste gerade feststellen, dass die Segmentation fault (11) ausbleiben, wenn ich den apache stoppe, und von der Commandline als single thread mit der -X option starte (das muss ich noch weiter testen). Könnte es sein, dass php5.2 einen höheren Speicherbedarf hat, und mein vserver in die Knie geht?
Ok, Ich versuche es jetzt mal mit excepionHooks:
http://httpd.apache.org/docs/1.3/mod/co ... eptionhook
http://publib.boulder.ibm.com/httpserv/ ... ledus.html
Hmmm... was sagt mir das nun?
Code: Alles auswählen
[Wed Sep 19 15:04:30 2007] [notice] child pid 19680 exit signal Segmentation fault (11)
[Wed Sep 19 15:04:31 2007] pid 19679 mod_backtrace backtrace for signal 11
[Wed Sep 19 15:04:31 2007] pid 19679 mod_backtrace main() is at 8061680
/usr/lib/apache/1.3/mod_backtrace.so[0xb67eeb85]
/usr/sbin/apache[0x805deb6]
/lib/tls/libpthread.so.0[0xb7fb5668]
/lib/ld-linux.so.2[0xb7ff2b07]
/lib/ld-linux.so.2[0xb7ff62f9]
/lib/ld-linux.so.2[0xb7ff6090]
/lib/tls/librt.so.1[0xb6f6e6e7]
/lib/ld-linux.so.2[0xb7ff6ede]
/lib/tls/libc.so.6(exit+0xd0)[0xb7d554f0]
/usr/sbin/apache[0x805d51a]
/usr/sbin/apache[0x805f746]
/usr/sbin/apache[0x805fe46]
/usr/sbin/apache[0x8060bf8]
/usr/sbin/apache(main+0x759)[0x8061dd9]
/lib/tls/libc.so.6(__libc_start_main+0xc8)[0xb7d3eea8]
/usr/sbin/apache[0x804f6a1]
[Wed Sep 19 15:04:31 2007] pid 19679 mod_backtrace end of report
[Wed Sep 19 15:04:31 2007] pid 19679 mod_whatkilledus sig 11 crash
[Wed Sep 19 15:04:31 2007] pid 19679 mod_whatkilledus no active connection at crash
[Wed Sep 19 15:04:31 2007] pid 19679 mod_whatkilledus no request active at crash
[Wed Sep 19 15:04:31 2007] pid 19679 mod_whatkilledus end of report