1. Problem Description:

I am having a problem where apache(2.0.59/prefork) will segfault when the mod_perl module is added to the httpd.conf. The odd thing is that this only occurs when apache is started for the first time. If I have apache already running(without mod_perl loaded), and I change the .conf file to load in the mod_perl module, and then restart apache (-k restart), it loads up fine. I am able to have mod_perl handle scripts just fine, but only if I restart it as described above. Apache's log, when started with the 'loadmodule perl_module' directive, states this:
[notice] seg fault or similar nasty error detected in the parent process

below, I have used gdb to create a backtrace (under the core dump section). Any help or advise is appreciated.


2. Used Components and their Configuration:

*** mod_perl version 2.000003

*** using /home/liquid/mod_perl-2.0.3/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
 MP_APR_LIB     => aprext
 MP_APXS        => /usr/sbin/apxs
 MP_COMPAT_1X   => 1
 MP_GENERATE_XS => 1
 MP_LIBNAME     => mod_perl
 MP_USE_DSO     => 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

-L/usr/lib -laprutil-0 -lexpat -liconv -L/var/www/lib
-L/usr/lib -lapr-0 -lm -lresolv



*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
 Platform:
   osname=openbsd, osvers=3.2, archname=i386-openbsd
   uname='openbsd'
   config_args='-Dopenbsd_distribution=defined -dsE'
   hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
   useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
 Compiler:
   cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
   optimize='-O2',
   cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.3 20010125 (prerelease)', gccosandvers='openbsd3.2'
   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 =''
   libpth=/usr/lib
   libs=-lm -lc -lutil
   perllibs=-lm -lc -lutil
   libc=/usr/lib/libc.a, so=so, useshrplib=true, libperl=libperl.so.6.1
 Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags='-Wl,-R/usr/libdata/perl5/i386-openbsd/5.6.1/CORE'
   cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC '
Characteristics of this binary (from libperl):
 Compile-time options: USE_LARGE_FILES
 Built under openbsd
 Compiled at Oct  2 2002 06:07:24
 %ENV:
   PERL_LWP_USE_HTTP_10="1"
 @INC:
   /usr/libdata/perl5/i386-openbsd/5.6.1
/local/libdata/perl5/i386-openbsd/5.6.11
/libdata/perl5
/local/libdata/perl5
/local/libdata/perl5/site_perl/i386-openbsd
/libdata/perl5/site_perl/i386-openbsd
/local/libdata/perl5/site_perl
/libdata/perl5/site_perl
/local/lib/perl5/site_perl
.

*** Packages of interest status:

Apache2            : -
::Request          : -
CGI                : 3.29
ExtUtils::MakeMaker: 5.45
LWP                : -
mod_perl           : -
mod_perl2          : 2.000003


3. This is the core dump trace: (if you get a core dump):

bash# gdb httpd /var/www/httpd.core
warning: failed to install memory consistency checks; configuration should define NO_MMCHECK or MMCHECK_FORCE
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.2"...
Core was generated by `httpd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libz.so.1.4...done.
Reading symbols from /usr/lib/libaprutil-0.so.9.12...done.
Reading symbols from /usr/lib/libexpat.so.1.0...done.
Reading symbols from /usr/lib/libiconv.so.4.0...done.
Reading symbols from /usr/lib/libapr-0.so.9.12...done.
Reading symbols from /usr/lib/libm.so.0.1...done.
Reading symbols from /usr/lib/libc_r.so.6.5...done.
Reading symbols from /usr/lib/libc.so.28.5...done.
Reading symbols from /usr/lib/libutil.so.7.1...done.
Reading symbols from /var/www/modules/libphp4.so...done.
Reading symbols from /usr/lib/apache/modules/mod_perl.so...done.
#0  0x405312e6 in Perl_report_uninit ()
(gdb) run -X
Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x405223fe in modperl_mgv_lookup ()
(gdb) bt
#0  0x405223fe in modperl_mgv_lookup ()
#1  0x1708e4 in ?? () from /usr/lib/apache/modules/mod_perl.so
#2  0x40522bd1 in modperl_mgv_as_string ()
#3  0x40523fbc in modperl_env_default_populate ()
#4  0x4052fe17 in modperl_flags_lookup_srv ()
#5  0x4050840c in ?? () from /usr/lib/apache/modules/mod_perl.so
#6  0x405083b9 in ?? () from /usr/lib/apache/modules/mod_perl.so
#7  0x40508891 in ?? () from /usr/lib/apache/modules/mod_perl.so
#8  0x40508b43 in ?? () from /usr/lib/apache/modules/mod_perl.so
#9  0x677a1 in ap_run_open_logs ()
#10 0x70346 in L69 ()
(gdb) quit
The program is running.  Quit anyway (and kill it)? (y or n) y


This report was generated by t/REPORT on Tue Jun 12 13:58:36 2007 GMT.


Reply via email to