[mp2] segfaulting apache in ap_pcw_walk_files_config
[prev]
[thread]
[next]
[Date index for 2005/05/23]
Hello
I have a problem running mod_perl-2.0.0 (and the latest devel snapshot too)=
:
Apache segfaults on startup as soon as I have the LoadModule directive
in the httpd.conf. This also happens when running make test. I have
compiled mod_perl with debugging enabled and found the problematic
spot, however I have no idea on what exactly is wrong:
(gdb output after segfault):
[Mon May 23 17:10:32 2005] [info] 6 Apache2:: modules loaded
[Mon May 23 17:10:32 2005] [info] 0 APR:: modules loaded
[Mon May 23 17:10:32 2005] [info] base server + 27 vhosts ready to run test=
s
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212529568 (LWP 11107)]
0xb75a86dc in ap_pcw_walk_files_config (pconf=3D0x80c20a8, s=3D0x80c8018,=
=20
dconf=3D0x80fe4a8, modp=3D0xb75bb500,=20
dir_cb=3D0xb75a82d0 <modperl_hash_handlers_dir>, data=3D0x0)
at modperl_pcw.c:67
67=09 ap_conf_vector_t **dirs =3D (ap_conf_vector_t **)dconf->sec_file->=
elts;
(gdb) bt
#0 0xb75a86dc in ap_pcw_walk_files_config (pconf=3D0x80c20a8, s=3D0x80c801=
8,=20
dconf=3D0x80fe4a8, modp=3D0xb75bb500,=20
dir_cb=3D0xb75a82d0 <modperl_hash_handlers_dir>, data=3D0x0)
at modperl_pcw.c:67
#1 0xb75a889e in ap_pcw_walk_config (pconf=3D0x80c20a8, s=3D0x80c8018,=20
modp=3D0xb75bb500, data=3D0x0, dir_cb=3D0xb75a82d0 <modperl_hash_handle=
rs_dir>,=20
srv_cb=3D0xb75a8390 <modperl_hash_handlers_srv>) at modperl_pcw.c:121
#2 0xb75a851a in modperl_mgv_hash_handlers (p=3D0x0, s=3D0x0) at modperl_m=
gv.c:520
#3 0xb759ac52 in modperl_hook_post_config_last (pconf=3D0x80c20a8,=20
plog=3D0x80f8180, ptemp=3D0x80fa188, s=3D0x80c8018) at mod_perl.c:701
#4 0x080824ca in ap_run_post_config ()
#5 0x08087d7e in main ()
(gdb)=20
In order to isolate the problem further I changed line 118 of modperl_pcw.c=
from
if (dir_cb) {
to=20
if (dir_cb && 0) {
and mod-perl2 started working! So there seems to be a problem with
reading configuration files/directories somehow.
Thank you for your help and regards
Flavio Curti
t/REPORT follows here:
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
[DESCRIBE THE PROBLEM HERE]
2. Used Components and their Configuration:
*** mod_perl version 2.000000
*** using /usr/src/debian-packages/cyb-mod-perl2/mod_perl-2.0.0/lib/Apache2=
/BuildConfig.pm
*** Makefile.PL options:
MP_APR_LIB =3D> aprext
MP_APXS =3D> /usr/sbin/apxs
MP_CCOPTS =3D> -g -Wall
MP_COMPAT_1X =3D> 1
MP_DEBUG =3D> 0
MP_GENERATE_XS =3D> 1
MP_LIBNAME =3D> mod_perl
MP_TRACE =3D> 0
MP_USE_DSO =3D> 1
MP_USE_GTOP =3D> 1
*** /usr/sbin/httpd2 -V
Server version: Apache/2.0.54
Server built: May 17 2005 21:47:54
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR=3D"server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT=3D""
-D SUEXEC_BIN=3D"yes"
-D DEFAULT_PIDLOG=3D"/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD=3D"logs/apache_runtime_status"
-D DEFAULT_LOCKFILE=3D"/var/run/accept.lock"
-D DEFAULT_ERRORLOG=3D"logs/error_log"
-D AP_TYPES_CONFIG_FILE=3D"/etc/httpd2/mime.types"
-D SERVER_CONFIG_FILE=3D"/etc/httpd2/httpd2.conf"
*** (apr|apu)-config linking info
-L/usr/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat
-L/usr/lib -lapr-0 -lrt -lm -lnsl -lpthread
*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=3Dlinux, osvers=3D2.4.27-ti1211, archname=3Di386-linux-thread-mu=
lti
uname=3D'linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004
i686 gnulinux '
config_args=3D'-Dusethreads -Duselargefiles -Dccflags=3D-DDEBIAN
-Dcccdlflags=3D-fPIC -Darchname=3Di386-linux -Dprefix=3D/usr
-Dprivlib=3D/usr/share/perl/5.8 -Darchlib=3D/usr/lib/perl/5.8
-Dvendorprefix=3D/usr -Dvendorlib=3D/usr/share/perl5
-Dvendorarch=3D/usr/lib/perl5 -Dsiteprefix=3D/usr/local
-Dsitelib=3D/usr/local/share/perl/5.8.4
-Dsitearch=3D/usr/local/lib/perl/5.8.4 -Dman1dir=3D/usr/share/man/man1
-Dman3dir=3D/usr/share/man/man3 -Dsiteman1dir=3D/usr/local/man/man1
-Dsiteman3dir=3D/usr/local/man/man3 -Dman1ext=3D1 -Dman3ext=3D3perl
-Dpager=3D/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=3Dlibperl.so.5.8.4 -Dd_dosuid -des'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
usethreads=3Ddefine use5005threads=3Dundef useithreads=3Ddefine
usemultiplicity=3Ddefine
useperlio=3Ddefine d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dund=
ef
use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc', ccflags =3D'-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=3D64',
optimize=3D'-O2',
cppflags=3D'-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -I/usr/local/include'
ccversion=3D'', gccversion=3D'3.3.5 (Debian 1:3.3.5-9)', gccosandvers=
=3D''
intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D123=
4
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=
=3D12
ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'of=
f_t',
lseeksize=3D8
alignbytes=3D4, prototype=3Ddefine
Linker and Libraries:
ld=3D'cc', ldflags =3D' -L/usr/local/lib'
libpth=3D/usr/local/lib /lib /usr/lib
libs=3D-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=3D-ldl -lm -lpthread -lc -lcrypt
libc=3D/lib/libc-2.3.2.so, so=3Dso, useshrplib=3Dtrue, libperl=3Dlibper=
l.so.5.8.4
gnulibc_version=3D'2.3.2'
Dynamic Linking:
dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'-Wl,-=
E'
cccdlflags=3D'-fPIC', lddlflags=3D'-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):=20
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Mar 8 2005 19:51:48
%ENV:
PERL_LWP_USE_HTTP_10=3D"1"
@INC:
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3
/usr/local/lib/perl/5.8.1
/usr/local/share/perl/5.8.1
.
*** Packages of interest status:
Apache2 : -
Apache2::Request : -
CGI : 3.04
ExtUtils::MakeMaker: 6.17
LWP : 5.803
mod_perl : -
CONTEXT
Built under linux
Compiled at Mar 8 2005 19:51:48
%ENV:
PERL_LWP_USE_HTTP_10=3D"1"
@INC:
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3
/usr/local/lib/perl/5.8.1
/usr/local/share/perl/5.8.1
.
*** Packages of interest status:
Apache2 : -
Apache2::Request : -
CGI : 3.04
ExtUtils::MakeMaker: 6.17
LWP : 5.803
mod_perl : -
mod_perl2 : -
--=20
http://no-way.org/~fcu/