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 tests

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212529568 (LWP 11107)]
0xb75a86dc in ap_pcw_walk_files_config (pconf=0x80c20a8, s=0x80c8018, 
    dconf=0x80fe4a8, modp=0xb75bb500, 
    dir_cb=0xb75a82d0 <modperl_hash_handlers_dir>, data=0x0)
    at modperl_pcw.c:67
67          ap_conf_vector_t **dirs = (ap_conf_vector_t 
**)dconf->sec_file->elts;
(gdb) bt
#0  0xb75a86dc in ap_pcw_walk_files_config (pconf=0x80c20a8, s=0x80c8018, 
    dconf=0x80fe4a8, modp=0xb75bb500, 
    dir_cb=0xb75a82d0 <modperl_hash_handlers_dir>, data=0x0)
    at modperl_pcw.c:67
#1  0xb75a889e in ap_pcw_walk_config (pconf=0x80c20a8, s=0x80c8018, 
    modp=0xb75bb500, data=0x0, dir_cb=0xb75a82d0 <modperl_hash_handlers_dir>, 
    srv_cb=0xb75a8390 <modperl_hash_handlers_srv>) at modperl_pcw.c:121
#2  0xb75a851a in modperl_mgv_hash_handlers (p=0x0, s=0x0) at modperl_mgv.c:520
#3  0xb759ac52 in modperl_hook_post_config_last (pconf=0x80c20a8, 
    plog=0x80f8180, ptemp=0x80fa188, s=0x80c8018) at mod_perl.c:701
#4  0x080824ca in ap_run_post_config ()
#5  0x08087d7e in main ()
(gdb) 

In order to isolate the problem further I changed line 118 of modperl_pcw.c from
  if (dir_cb) {
to 
  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     => aprext
  MP_APXS        => /usr/sbin/apxs
  MP_CCOPTS      => -g -Wall
  MP_COMPAT_1X   => 1
  MP_DEBUG       => 0
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 0
  MP_USE_DSO     => 1
  MP_USE_GTOP    => 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="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=""
 -D SUEXEC_BIN="yes"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd2/mime.types"
 -D SERVER_CONFIG_FILE="/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=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi
    uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004
i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.4
-Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-9)', 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, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    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 Mar  8 2005 19:51:48
  %ENV:
    PERL_LWP_USE_HTTP_10="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="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          : -

-- 
http://no-way.org/~fcu/

Reply via email to