You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Derek Balling <dr...@megacity.org> on 2001/10/03 04:52:10 UTC
segfault on start....
I seem to have something boned... I can't even run an apachectl
configtest without segfaulting.
# ../bin/apachectl start
../bin/apachectl: line 171: 16563 Segmentation fault $HTTPD
../bin/apachectl start: httpd could not be started
Removing the Apache::Registry call from my httpd.conf makes the
problem go away immediately.
This is on apache 1.3.20, mod_perl 1.26, and perl 5.6.1 (-V output at
the bottom)
Anyone have any thoughts?
D
# perl -v
This is perl, v5.6.1 built for i686-linux-thread-multi
Copyright 1987-2001, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
[root@minbar conf]# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.2.17, archname=i686-linux-thread-multi
uname='linux minbar.megacity.org 2.2.17 #1 mon sep 4 22:42:31 pdt
2000 i686 unknown '
config_args='-Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2
release)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Apr 9 2001 07:56:05
@INC:
/usr/local/lib/perl5/5.6.1/i686-linux-thread-multi
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
--
+---------------------+-----------------------------------------+
| dredd@megacity.org | "Thou art the ruins of the noblest man |
| Derek J. Balling | That ever lived in the tide of times. |
| | Woe to the hand that shed this costly |
| | blood" - Julius Caesar Act 3, Scene 1 |
+---------------------+-----------------------------------------+
Re: segfault on start....
Posted by Joshua Chamas <jo...@chamas.com>.
Derek Balling wrote:
>
> >
> >Run your httpd in -X mode without the help of the apachectl start
> >script. You can get that under gdb. -X mode runs in single
> >process mode, and is most handy for diagnosing problems such
> >as these.
>
> I guess I'm dense:
>
> # ../bin/httpd -X -f conf/httpd.conf.mod_perl
> Segmentation fault
>
> how is this more helpful? ;)
>
> Pretend like I'm NOT some C-code guru, and explain to me what I need
> to do, because it doesn't seem like doing what the docs say is
> helping. *chuckle*
>
unix prompt> gdb ../bin/httpd
... gdb header stuff ...
(gdb) run -X -f conf/httpd.conf.mod_perl
Segfault
(gdb) bt
!!! UGLY STACK TRACE TO FOLLOW !!!
This *MIGHT* give the real gurus on the list something
to work with. Its how I have debugged many a segfault
in my day. This or something like it. You can also
load up a core dump with gdb, but I can't remember
the last time I did that, so I have no real directions
here, but its probably just
prompt> gdb core
...
(gdb) bt
[ find out where it segfaulted ]
--Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks Founder Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
Re: segfault on start....
Posted by Derek Balling <dr...@megacity.org>.
>Joshua meant for you to run it in gdb with that option, but it might not
>be very helpfull if you didn't compile with CFLAGS=-g
Well, I did PERL_DEBUG=1, which allegedly does that. :)
>But you can try it anyay:
>
>gdb ../bin/httpd
>
>(gdb) run -X
><likely to give a segmentation fault>
>(gdb) bt
>
>and send the information it gives here.
(gdb) run -X -f conf/httpd.conf.mod_perl
Starting program: /web1.3/conf/../bin/httpd -X -f conf/httpd.conf.mod_perl
Program received signal SIGSEGV, Segmentation fault.
0x80de49c in Perl_gv_fetchpv ()
(gdb) bt
#0 0x80de49c in Perl_gv_fetchpv ()
#1 0x80da33f in Perl_get_sv ()
#2 0x808a461 in perl_create_request_config ()
#3 0x808a6ac in perl_cmd_handler_handlers ()
#4 0x80afde6 in ap_clear_module_list ()
#5 0x80b0223 in ap_handle_command ()
#6 0x80b02b7 in ap_srm_command_loop ()
#7 0x80b0910 in ap_process_resource_config ()
#8 0x80b1182 in ap_read_config ()
#9 0x80bb0a9 in main ()
#10 0x400df1eb in __libc_start_main (main=0x80bae1c <main>, argc=4,
argv=0xbffffc54, init=0x8062748 <_init>, fini=0x816442c <_fini>,
rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffffc4c)
at ../sysdeps/generic/libc-start.c:90
> > Pretend like I'm NOT some C-code guru, and explain to me what I need
>> to do, because it doesn't seem like doing what the docs say is
>> helping. *chuckle*
>
>Isn't there anything about debugging in the documentation?
It all seems centered around, near as I can tell, "debugging a server
that runs but takes a dump on a particular script/URL/etc."
D
--
+---------------------+-----------------------------------------+
| dredd@megacity.org | "Thou art the ruins of the noblest man |
| Derek J. Balling | That ever lived in the tide of times. |
| | Woe to the hand that shed this costly |
| | blood" - Julius Caesar Act 3, Scene 1 |
+---------------------+-----------------------------------------+
Re: segfault on start....
Posted by Thomas Eibner <th...@stderr.net>.
On Tue, Oct 02, 2001 at 10:46:45PM -0700, Derek Balling wrote:
> >Run your httpd in -X mode without the help of the apachectl start
> >script. You can get that under gdb. -X mode runs in single
> >process mode, and is most handy for diagnosing problems such
> >as these.
>
> I guess I'm dense:
>
> # ../bin/httpd -X -f conf/httpd.conf.mod_perl
> Segmentation fault
>
> how is this more helpful? ;)
Joshua meant for you to run it in gdb with that option, but it might not
be very helpfull if you didn't compile with CFLAGS=-g
But you can try it anyay:
gdb ../bin/httpd
(gdb) run -X
<likely to give a segmentation fault>
(gdb) bt
and send the information it gives here.
Another option would be to:
to use strace|truss|whatever your system uses to trace system call
strace ../bin/httpd -X
Which might give you a lot of information which will very likely be
to much to post here.
> Pretend like I'm NOT some C-code guru, and explain to me what I need
> to do, because it doesn't seem like doing what the docs say is
> helping. *chuckle*
Isn't there anything about debugging in the documentation?
--
Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
mod_pointer <http://stderr.net/mod_pointer>
Re: segfault on start....
Posted by Derek Balling <dr...@megacity.org>.
At 10:38 PM -0700 10/2/01, Joshua Chamas wrote:
>Derek Balling wrote:
>>
>> Did that. THAT's the output I get, nothing more. Make test, and the
>> test server all check out 100% and run fine, its only when I put it
>> in production that it takes a dump, and leaves absolutely nothing
>> except what you see there.
>>
>> Lots of the "segfault" stuff in SUPPORT has to do with "when it
>> segfaults on a request". It's hard to "attach to the running process"
>> or "send the request that causes the segfault" when you can't get
>> that far. ;)
>>
>
>Run your httpd in -X mode without the help of the apachectl start
>script. You can get that under gdb. -X mode runs in single
>process mode, and is most handy for diagnosing problems such
>as these.
I guess I'm dense:
# ../bin/httpd -X -f conf/httpd.conf.mod_perl
Segmentation fault
how is this more helpful? ;)
Pretend like I'm NOT some C-code guru, and explain to me what I need
to do, because it doesn't seem like doing what the docs say is
helping. *chuckle*
What can I give you that would be helpful to debug this? :)
D
--
+---------------------+-----------------------------------------+
| dredd@megacity.org | "Thou art the ruins of the noblest man |
| Derek J. Balling | That ever lived in the tide of times. |
| | Woe to the hand that shed this costly |
| | blood" - Julius Caesar Act 3, Scene 1 |
+---------------------+-----------------------------------------+
Re: segfault on start....
Posted by Joshua Chamas <jo...@chamas.com>.
Derek Balling wrote:
>
> Did that. THAT's the output I get, nothing more. Make test, and the
> test server all check out 100% and run fine, its only when I put it
> in production that it takes a dump, and leaves absolutely nothing
> except what you see there.
>
> Lots of the "segfault" stuff in SUPPORT has to do with "when it
> segfaults on a request". It's hard to "attach to the running process"
> or "send the request that causes the segfault" when you can't get
> that far. ;)
>
Run your httpd in -X mode without the help of the apachectl start
script. You can get that under gdb. -X mode runs in single
process mode, and is most handy for diagnosing problems such
as these.
--Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks Founder Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
Re: segfault on start....
Posted by Derek Balling <dr...@megacity.org>.
At 1:01 PM +0800 10/3/01, Stas Bekman wrote:
>Derek Balling wrote:
>
>>I seem to have something boned... I can't even run an apachectl
>>configtest without segfaulting.
>>
>># ../bin/apachectl start
>>../bin/apachectl: line 171: 16563 Segmentation fault $HTTPD
>>../bin/apachectl start: httpd could not be started
>>
>>Removing the Apache::Registry call from my httpd.conf makes the
>>problem go away immediately.
>>
>>This is on apache 1.3.20, mod_perl 1.26, and perl 5.6.1 (-V output
>>at the bottom)
>>
>>Anyone have any thoughts?
>
>
>Please follow the instructions in the SUPPORT file in the modperl
>source distro to report a segfault. thanks.
Did that. THAT's the output I get, nothing more. Make test, and the
test server all check out 100% and run fine, its only when I put it
in production that it takes a dump, and leaves absolutely nothing
except what you see there.
Lots of the "segfault" stuff in SUPPORT has to do with "when it
segfaults on a request". It's hard to "attach to the running process"
or "send the request that causes the segfault" when you can't get
that far. ;)
D
--
+---------------------+-----------------------------------------+
| dredd@megacity.org | "Thou art the ruins of the noblest man |
| Derek J. Balling | That ever lived in the tide of times. |
| | Woe to the hand that shed this costly |
| | blood" - Julius Caesar Act 3, Scene 1 |
+---------------------+-----------------------------------------+
Re: segfault on start....
Posted by Stas Bekman <st...@stason.org>.
Derek Balling wrote:
> I seem to have something boned... I can't even run an apachectl
> configtest without segfaulting.
>
> # ../bin/apachectl start
> ../bin/apachectl: line 171: 16563 Segmentation fault $HTTPD
> ../bin/apachectl start: httpd could not be started
>
> Removing the Apache::Registry call from my httpd.conf makes the problem
> go away immediately.
>
> This is on apache 1.3.20, mod_perl 1.26, and perl 5.6.1 (-V output at
> the bottom)
>
> Anyone have any thoughts?
Please follow the instructions in the SUPPORT file in the modperl source distro to report a segfault. thanks.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/