perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stujin <>
Subject seg faults/bus errors
Date Thu, 04 Jan 2001 06:53:30 GMT

 I work on a high-traffic site that uses apache/mod_perl, and we're
 seeing some occaisional segmentation faults and bus errors in our
 apache error logs.  These errors sometimes result in the entire apache
 process group going down, though it seems to me that the problems
 originate within one of apache's child processes (maybe shared memory
 is getting corrupted somehow?).
 I've searched through the archive of this list for similar situations,
 and I found a lot of questions about seg faults, but none quite
 matching our problem.
 We installed some signal handlers in our perl code that trap SIGSEGV
 and SIGBUS and then dump a perl stack trace to a log file (see below).
 Using this stack infomation, we can track the point of failure to a
 call to perl's "fork()" inside the IPC::Open3 standard module.  Since
 it seems very unlikely that fork() is broken, we're speculating that
 there's some funny business going on prior to the fork that's putting
 the process into an unstable state which prevents it from forking
 Due to a lot of sloppy, pre-existing Perl code, we're using PerlRun
 (not Registry) with "PerlRunOnce On" (children die after servicing one
 Does anyone have any suggestions about what might be going on here?
 Justin Caballero
 The following are: a backtrace from a core dump, the stack trace from
 the perl signal handler, and the version information for our
 apache        1.3.12
 mod_perl    1.24
 (gdb) where
 #0  0xe765c in Perl_sv_free ()
 #1  0xd89f4 in Perl_hv_free_ent ()
 #2  0xd8bd8 in Perl_hv_clear ()
 #3  0xd8b3c in Perl_hv_clear ()
 #4  0x10e760 in Perl_pp_fork ()
 #5  0x11b1d0 in Perl_runops_standard ()
 #6  0xa49e8 in perl_call_sv ()
 #7  0xa4490 in perl_call_method ()
 #8  0x2aea8 in perl_call_handler ()
 #9  0x2a6e0 in perl_run_stacked_handlers ()
 #10 0x28da0 in perl_handler ()
 #11 0x6e0f8 in ap_invoke_handler ()
 #12 0x8a8e8 in ap_some_auth_required ()
 #13 0x8a96c in ap_process_request ()
 #14 0x7e3e4 in ap_child_terminate ()
 #15 0x7e770 in ap_child_terminate ()
 #16 0x7ece8 in ap_child_terminate ()
 #17 0x7f54c in ap_child_terminate ()
 #18 0x7fe80 in main ()
 SIGSEGV caught at:
 IPC::Open3, /opt/perl-5.005_03/lib/5.00503/IPC/, 102,
 IPC::Open3, /opt/perl-5.005_03/lib/5.00503/IPC/, 150,
 IPC::Open2, /opt/perl-5.005_03/lib/5.00503/IPC/, 91,
 Cyxsub, /prod/APP/vobs/ssp/cgi-bin/, 69, IPC::Open2::open2
 Cyxsub, /prod/APP/vobs/ssp/cgi-bin/, 152, Cyxsub::sd_connect
 43, Cyxsub::xs_ods_main
 39, main::obtain_data
 main, /prod/APP/vobs/ssp/cgi-bin/, 285,
 main, /prod/APP/vobs/ssp/cgi-bin/, 208,
 main, /prod/APP/vobs/ssp/cgi-bin/, 70,
 main, /prod/APP/vobs/ssp/cgi-bin/, 39, main::cp_pers_ub_main
 122, (eval)
 296, Apache::PerlRun::compile
 /prod/ssp_2.8_mp_prod_sv.001212/vobs/ssp_perl/cgi-bin/, 0,
 /prod/ssp_2.8_mp_prod_sv.001212/vobs/ssp_perl/cgi-bin/, 0,
 > perl -V
 Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
     osname=solaris, osvers=2.6, archname=sun4-solaris
     uname='sunos atlas 5.6 generic_105181-19 sun4u sparc sunw,ultra-250 '
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef useperlio=undef d_sfio=undef
     cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=2.95.2 19991024
     ccflags ='-I/usr/local/include'
     stdchar='unsigned char', d_stdstdio=define, usevfork=false
     intsize=4, longsize=4, ptrsize=4, doublesize=8
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
     alignbytes=8, usemymalloc=y, prototype=define
   Linker and Libraries:
     ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
     libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
     libc=, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
     cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
 Characteristics of this binary (from libperl): 
   Built under solaris
   Compiled at Jul 11 2000 15:12:53

View raw message