[H-GEN] Apache segfaulting... how to debug
Andrae Muys
andrae.muys at braintree.com.au
Thu Jul 10 00:09:11 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Michael Anthon wrote:
> bash> ldd /usr/lib/php4/20020429/oci8.so
> libclntsh.so.8.0 => /oracle/as9i/lib/libclntsh.so.8.0 (0x40010000)
> libc.so.6 => /lib/libc.so.6 (0x405d6000)
> libwtc8.so => /oracle/as9i/lib/libwtc8.so (0x406e6000)
> libdl.so.2 => /lib/libdl.so.2 (0x406ee000)
> libm.so.6 => /lib/libm.so.6 (0x406f1000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x40712000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> If I understand the gist of what Andrae is saying then you are
> suggesting that something is allocating some memory but not cleaning up
> after itself?
>
The memory allocator keeps various records about allocated memory that
allow it to manage allocations, reallocations, and deallocations. If
this data gets clobbered for whatever reason your application can crash
at weird places (such as after returning from main, or inside
malloc/free) as the allocator wanders off in search of some random
garbage address.
The most common cause for this sort of behaviour I have seen is to free
the same block of memory twice --- on some allocators this will lead to
a crash in some indeterminate malloc/free later in the program ---
however heap array overruns/underruns; random pointer fandangos;
incompatible libc's/allocators; could all conceivably cause the same
symptoms.
Check apache and make sure it is linked against /lib/libc.so.6. Other
than that you could try providing an ltrace, although this would likely
have security implications if you accessed anything sensitive. (You
might also like to check the strace for any sensitive information that
might need sanitising).
Andrae
--
Andrae Muys But can it generate *quantum* Haiku
<andrae.muys at braintree.com.au> error messages, in Latin, where each
Engineer line of the error message is a
Braintree Communications palindrome? -- Mike Vanier on perl
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list