It would be difficult to debug a complex multi-process/threaded network daemon application like Apache, complete with modules (such as potentially including mod_PHP) via gdb.
Why do you think the error lies within Apache's
httpd, and not either an application (i.e. a PHP script) or module (e.g.
What is the exact segfault error message?
Does the segfault occur on startup, after a random while, after a certain web app is run, or a particular amount of time (about every 48 hours)?
Have you increase or added the Apache httpd
Log Level directive in the Apache configuration file to get more information?
debug for the most information.
I've been using Apache httpd for nearly 15 years, and I have never had to debug the Apache web server daemon itself, so I'm surprised you appear to need to debug it using gdb.
(no debugging symbols found)
This means that the debugging symbols are not included in the binary executable. Typically the compiler didn't have debugging enabled (
-g flag with gcc), and/or the install process
stripped the executable file, to make it occupy less memory while running.
Error while reading shared library symbols:
This error is about the shared (dynamically linked) libraries debug symbols.
Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.
I haven't seen this error before, it may be occurring because Red Hat Enterprise Linux 4 is built differently. DWARF is a debugging information format. The other common format found on Linux systems is Stabs.
Basically seems to be suggesting the shared libraries are also "stripped" of debugging information.
Correction: It means that debugger (
gdb) cannot read / find the string pointer (
strp). It may be due to GDB Bug 7358 or a compiler / debugger version mismatch.
The shared libraries often have the debugging information (symbols) in a separate package. For example, I believe RHEL the GNU Standard C Library (glibc) debug info is in a package called
glibc-debug. You will need to install the debug info of the libraries that Apache httpd uses. Check the Apache rpm package's libraries dependencies for a list of libraries the executable depends upon --
rpm -qR package-name or
rpm -qpR <rpm-file>.
i've tried configuring with --enable-maintainer-mode, but I don't seem to be getting far.
I'm sorry, but that's too vague to help you with. You need to include more useful details.
Update: Usage of
automake's maintainer-mode is mostly for packaging or development, not debugging proposes.
Consider using a PHP debugger, like Xdebug with the PHP application or script.
I'll try to summarize the information from the comments here:
- Generating a gdb backtrace (from PHP)
- requires PHP built with debugging (symbols included)
- PHP with debugging can be built by making it using
EXTRA_CFLAGS="-g" make or
- Preferably by using
configure --enable-debug (ref), followed by
This appears to have resolved the debugging symbols.