Hi all,

I have been getting a segfault when starting mod_perl 2.x under rather
unusual circumstances.  Hopefully the below bug report will be useful,
although I'm not sure whether the problem lies in mod_perl 2.x or PAR.pm
(a CPAN module), but since the entire trace from debugging was in
mod_perl 2.x code, I thought I'd start here.  Please let me know if
there is any other information I can provide that would be helpful.


-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

Currently I'm getting a segmentation fault when starting mod_perl 2.x
(CVS)  This happens when doing the following steps:

Module is loaded via PerlModule (Apache::PAR).  That module then adds
configuration via Apache->httpd_conf($conf).  If the configuration being
added contains a PerlModule line for a module which is loaded via the
PAR CPAN module, I get the below trace.

The configuration which is sent to Apache->httpd_conf is:

Alias /test/module/ /home/techy/cvs/apache-par/t/par/module.par/
PerlModule TestMod
<Location /test/module>
SetHandler perl-script
PerlHandler TestMod
</Location>

I can't seem to duplicate this with other PerlModule lines included via
httpd_conf() other than ones for modules which are loaded via the PAR
module.  Further, if I leave out the PerlModule line, the rest of the
configuration works ok (and the module runs correctly)  It does not
appear to matter what the contents of TestMod.pm are.


2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX    => /usr/local/apache2
  MP_DEBUG        => 1
  MP_GENERATE_XS  => 1
  MP_INST_APACHE2 => 1
  MP_LIBNAME      => mod_perl
  MP_TRACE        => 1
  MP_USE_DSO      => 1
  MP_USE_STATIC   => 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.44
Server built:   Feb 17 2003 09:24:57
Server's Module Magic Number: 20020903:0
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
 -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="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
    uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
06:41:59 edt 2002 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686
-Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
-Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less
-isr'
    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='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -march=i386 -mcpu=i686',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-I/usr/include/gdbm'
    ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide
3.2-5)', 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='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.92'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    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 Sep  1 2002 23:56:49
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


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

Program received signal SIGSEGV, Segmentation fault.
0x4032dcf7 in modperl_cmd_modules (parms=0xbfffeae0, mconfig=0x80c6fc0,
    arg=0x83dc268 "TestMod") at modperl_cmd.c:95
95              dTHXa(scfg->mip->parent->perl);
(gdb) bt
#0  0x4032dcf7 in modperl_cmd_modules (parms=0xbfffeae0,
mconfig=0x80c6fc0,
    arg=0x83dc268 "TestMod") at modperl_cmd.c:95
#1  0x08065e88 in invoke_cmd (cmd=0x40349598, parms=0xbfffeae0,
    mconfig=0x80c6fc0, args=0x83dbfa7 "") at config.c:800
#2  0x08066759 in ap_walk_config_sub (current=0x83dbf80,
parms=0xbfffeae0,
    section_vector=0x80b14d0) at config.c:1082
#3  0x080667e0 in ap_walk_config (current=0x83dbf80, parms=0xbfffeae0,
    section_vector=0x80b14d0) at config.c:1121
#4  0x4032d87f in modperl_config_insert (my_perl=0x8113480, s=0x80b0f10,
    p=0x8096d58, ptmp=0x0, override=150, path=0x0, conf=0x80b14d0,
    lines=0x83d63f4) at modperl_config.c:433
#5  0x4032d8fc in modperl_config_insert_server (my_perl=0x83dab20,
    s=0x80b0f10, lines=0x83d63f4) at modperl_config.c:450
#6  0x404ef5e2 in XS_Apache__Server_add_config (my_perl=0x8113480,
    cv=0x815d4cc) at ServerUtil.xs:99
#7  0x403cd8c5 in Perl_pp_entersub ()
   from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#8  0x403c6059 in Perl_runops_standard ()
   from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#9  0x4036e139 in S_call_body ()
   from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#10 0x4036e352 in Perl_eval_sv ()
   from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
#11 0x40331715 in modperl_require_module (my_perl=0x8113480,
    pv=0x80d8280 "Apache::PAR", logfailure=1) at modperl_util.c:13
#12 0x4032d4ac in modperl_config_apply_PerlModule (s=0x80b0f10,
    scfg=0x80c6b00, perl=0x8113480, p=0x8096d58) at modperl_config.c:322
#13 0x40328574 in modperl_startup (s=0x80b0f10, p=0x8096d58) at
mod_perl.c:197
#14 0x4032954d in modperl_init (base_server=0x80b0f10, p=0x8096d58)
    at mod_perl.c:347
#15 0x403298b3 in modperl_hook_init (pconf=0x8096d58, plog=0x80c0e00,
    ptemp=0x80c2e08, s=0x80b0f10) at mod_perl.c:478
#16 0x08065164 in ap_run_open_logs (pconf=0x8096d58, plog=0x80c0e00,
    ptemp=0x80c2e08, s=0x80b0f10) at config.c:188
#17 0x08069341 in main (argc=3, argv=0xbfffeff4) at main.c:592
#18 0x401f4907 in __libc_start_main () from /lib/libc.so.6

This report was generated by t/REPORT on Sun Mar 23 04:07:10 2003 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
dev <at> perl.apache.org. To subscribe to the list send an empty
email to [EMAIL PROTECTED]





-- 
Nathan Byrd <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to