[TriLUG] Apache: Segmentation fault errors

James Olin Oden james.oden at gmail.com
Thu Mar 15 17:37:23 EDT 2007


On 3/15/07, Paul G. Szabady <Paul at thyservice.com> wrote:
> James,
>
> Excuse my ingnorance as I've not used httpd-debug nor gdb before.  I'm
> obviously missing something.
No problem...I'm deep in various bits of ... stuff at work and I
probably was a little too gruff.

>
> As you can see below, when I created the new rpms, I did get and install
> the httpd-debug rpm.  Hence, my confusion and follow-up email.
>
> Maybe I defined it wrong in the httpd.spec file before compiling from source?
>
> EXTRA_CFLAGS='-g'
> export EXTRA_CFLAGS
>
You shouldn't need to add -g.  The information you need for the back
trace are the symbols.  Every function in C has a name and that name
is stored in the executable as what is called a symbol (the same is
true of variables too).  Somewhere in the build process the binaries
are being stripped of their symbols, such that all you have is memory
addresses in the back trace (because the symbol table has been
stripped away).

-g on the other hand is adding other debug information such that you
have not only granularity to the symbol but to the line of code.  So
while that may be helpful, after you get a backtrace it won't help
otherwise.

So what you need is for the executables and libraries to not be
stripped.  As I said, and I know this sounds hackish, but its true,
add "exit 0" to end of %install in the httpd spec file.  You see rpm
has a macro (the name of which I forget, and I'm too lazy to look up)
that contains code to be appended to the end of %install.  Mostly that
code is for stripping out symbols and compressing man pages.  By
adding an exit 0, you short circuit that code that gets tacked on to
the end of the script.

> BTW, you did send an email, which is why I'm trying this.   ;-)
Oh, good, I'm not loosing my mind, at least not by this accounting (-;

Cheers...james



More information about the TriLUG mailing list