perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Vandiver <>
Subject mod_perl segfault
Date Sun, 10 Dec 2000 22:03:15 GMT
Heya --
 Please 'scuse in advance the long post -- it had to be to fit in all of
the information asked for (better too much than too little, I hope). 
Anyways, I've run into an intermittent segfault problem with mod_perl
(Version 1.24).  It causes the Apache (version 1.3.12) process to die:
[Sun Dec 10 03:12:10 2000] [notice] child pid 18227 exit signal
Segmentation fault (11)

Here's my perl -V:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.12-20, archname=i586-linux
    uname='linux melnorme 2.2.12-20 #1 mon sep 27 10:25:54 edt 1999 i586
unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
    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 -lc -lposix -lcrypt
    libc=/lib/, 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: USE_LARGE_FILES
  Built under linux
  Compiled at Sep  6 2000 23:47:54

As I said above, this is mod_perl 1.24, running under Apache 1.3.12  The
same error also happened with Apache 1.3.9, however.  I built mod_perl
perl Makefile.PL APACHE_PREFIX=/usr/local/apache
APACI_ARGS='--with-layout=RedHat --verbose' PERL_DEBUG=1

I caught a backtrace of the segfault:
(gdb) run -X -D -f `pwd`/t/conf/httpd.conf -d `pwd`/t
Starting program:
/usr/src/redhat/SOURCES/mod_perl-1.24_01/../apache_1.3.14/src/httpd -X
-D -f `pwd`/t/conf/httpd.conf -d `pwd`/t

Program received signal SIGSEGV, Segmentation fault.
0x400cade7 in Perl_sv_setsv () from
(gdb) bt
#0  0x400cade7 in Perl_sv_setsv () from
#1  0x400c09e8 in Perl_pp_sassign () from
#2  0x400c052d in Perl_runops_standard () from
#3  0x4007e36a in S_call_body () from
#4  0x4007de2d in perl_call_sv () from
#5  0x400b5230 in Perl_vdie () from
#6  0x400b5391 in Perl_die () from
#7  0x400e91dd in Perl_pp_require () from
#8  0x400c052d in Perl_runops_standard () from
#9  0x4007e36a in S_call_body () from
#10 0x4007e0ab in perl_call_sv () from
#11 0x40080f1e in S_call_list_body () from
#12 0x40080bcc in Perl_call_list () from
#13 0x400a2f85 in Perl_newATTRSUB () from
#14 0x400a0087 in Perl_utilize () from
#15 0x400993cd in Perl_yyparse () from
#16 0x400e82a3 in S_doeval () from
#17 0x400e99c3 in Perl_pp_entereval () from
#18 0x400c052d in Perl_runops_standard () from
#19 0x4007e36a in S_call_body () from
#20 0x4007e0ab in perl_call_sv () from
#21 0x8070deb in perl_call_handler (sv=0x86355f4, r=0x864bd44, args=0x0)
at mod_perl.c:1663
#22 0x80705fb in perl_run_stacked_handlers (hook=0x80ba419
"PerlHandler", r=0x864bd44, handlers=0x8638c70) at mod_perl.c:1382
#23 0x806eb9d in perl_handler (r=0x864bd44) at mod_perl.c:908
#24 0x808b563 in ap_invoke_handler (r=0x864bd44) at http_config.c:516
#25 0x809ee09 in process_request_internal (r=0x864bd44) at
#26 0x809ee6c in ap_process_request (r=0x864bd44) at http_request.c:1298
#27 0x809674e in child_main (child_num_arg=0) at http_main.c:4203
#28 0x80968dc in make_child (s=0x80d7bd4, slot=0, now=976482722) at
#29 0x8096a39 in startup_children (number_to_start=4) at
#30 0x8097066 in standalone_main (argc=7, argv=0xbffffbd4) at
#31 0x80977f3 in main (argc=7, argv=0xbffffbd4) at http_main.c:5004

The error happens at unpredictable times -- resending the same request
may or may not segfault again -- but it always works eventually.  The
file being run is a base install of Everything (
) -- so the code is known to work -- at least with slightly different
versions of things than I run.  I suspect that the error lies somewhere
with Perl 5.6.  Here's the relevant section from httpd.conf (addresses
obfuscated to protect the guilty):
  DocumentRoot /home/httpd/host
  ErrorLog  /var/log/httpd/host-error_log
  CustomLog /var/log/httpd/host-access_log commonuser

  <Location />
    Options Indexes FollowSymLinks ExecCGI
    DirectoryIndex index.html
    AllowOverride None
    order allow,deny
    allow from all
    AddHandler perl-script pl
    PerlModule Apache::DBI
    PerlHandler Apache::Registry
    PerlSetupEnv On

  <Location /images>
    SetHandler default-handler
    Options FollowSymLinks

As you can guess, mod_perl is not a DSO, and I'm not using mod_php,
etc.  The only other possibly applicable fact is that LD_LIBRARY_PATH
needed to get set (/usr/local/lib/perl5/5.6.0/CORE) in order for
mod_perl to compile, as well as for Apache to run.  I don't know if this
is unusual or not..
  Anyways, hope that someone has an inkling as to what's going on here.
Many thanks,
  -Alex Vandiver

View raw message