New report:

---


1. Problem Description:

A custom apache config directive defined in a <Location> together with
a PerlResponseHandler makes the request handling crash (apache dumps core, see below).
Nothing printed in the error_log nor the access_log.

httpd.conf contains:
--------------------
PerlLoadModule Xi::TestConf

<Location /test>
 XiTest test
 SetHandler modperl
 PerlResponseHandler Xi::Test
</Location>

TestConf.pm:
------------
package Xi::TestConf;

use Apache2::Module ();

my @directives = ( { name         => 'XiTest' } );
Apache2::Module::add(__PACKAGE__, [EMAIL PROTECTED]);

sub XiTest {
    my($self, $parms, $arg) = @_;
    $self->{XiTest} = $arg;
}

1;

Test.pm:
--------
package Xi::Test;

use Apache2::RequestIO ();

use Apache2::Const -compile => qw/OK/;

sub handler {
    my $r = shift;

    $r->print("Hello");

    return Apache::Const::OK;
}

1;


See attached bug tarball.


2. Used Components and their Configuration:

*** mod_perl version 2.000000

*** using 
/opt/xi3/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_APXS        => /opt/xi3/bin/apxs
  MP_COMPAT_1X   => 0
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1


*** The httpd binary was not found


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

 -L/opt/xi3/lib -laprutil-0 -lgdbm -ldb -lexpat
 -L/opt/xi3/lib -lapr-0 -lrt -lm -lcrypt -lnsl  -lpthread -ldl



*** /opt/xi3/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.6.11.8, archname=i686-linux-thread-multi
    uname='linux acer 2.6.11.8 #1 sat apr 30 19:16:00 cest 2005 i686 unknown 
unknown gnulinux '
    config_args='-Doptimize=-g -Dusethreads'
    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 -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.3.4', 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 -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.4'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,/opt/xi3/lib/perl5/5.8.6/i686-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at May 20 2005 17:46:47 %ENV: PERL_LWP_USE_HTTP_10="1" @INC: /opt/xi3/lib/perl5/5.8.6/i686-linux-thread-multi /opt/xi3/lib/perl5/5.8.6 /opt/xi3/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /opt/xi3/lib/perl5/site_perl/5.8.6 /opt/xi3/lib/perl5/site_perl .

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.05
ExtUtils::MakeMaker: 6.17
LWP                : 5.803
mod_perl           : -
mod_perl2          : 2.000000


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

#0 0x4045d846 in Perl_safesysmalloc (size=22) at util.c:75
#1 0x4046de71 in S_save_hek_flags (my_perl=0x8277250,
str=0xbf5ff514 "RequestRec::", len=12, hash=1405554878, flags=0) at hv.c:97
#2 0x40471994 in S_share_hek_flags (my_perl=0x8277250,
str=0xbf5ff514 "RequestRec::", len=12, hash=1405554878, flags=0)
at hv.c:2112
#3 0x4046f04a in S_hv_fetch_common (my_perl=0x8277250, hv=0x82d90f4,
keysv=0x0, key=0xbf5ff514 "RequestRec::", klen=12, flags=0, action=12,
val=0x82e90fc, hash=1405554878) at hv.c:765
#4 0x4046e394 in Perl_hv_fetch (my_perl=0x8277250, hv=0x82d90f4,
key=0xbf5ff514 "RequestRec::", klen_i32=12, lval=1) at hv.c:333
#5 0x404097f7 in Perl_gv_fetchpv (my_perl=0x8277250,
nambeg=0xbf5ff664 "Apache2::RequestRec::", add=1, sv_type=11) at gv.c:686
#6 0x40409552 in Perl_gv_stashpvn (my_perl=0x8277250,
name=0x403d38e8 "Apache2::RequestRec", namelen=21, create=1) at gv.c:619
#7 0x404094a8 in Perl_gv_stashpv (my_perl=0x8277250,
name=0x403d38e8 "Apache2::RequestRec", create=1) at gv.c:600
#8 0x404929b2 in Perl_newSVrv (my_perl=0x8277250, rv=0x8270898,
classname=0x403d38e8 "Apache2::RequestRec") at sv.c:7752
#9 0x40492a3f in Perl_sv_setref_pv (my_perl=0x8277250, rv=0x8270898,
classname=0x403d38e8 "Apache2::RequestRec", pv=0x83ba570) at sv.c:7784
#10 0x403b8274 in modperl_ptr2obj (my_perl=0x8277250,
classname=0x403d38e8 "Apache2::RequestRec", ptr=0x83ba570)
#11 0x403b69ba in modperl_handler_make_args (my_perl=0x8277250, avp=0xbf5ff894)
at modperl_handler.c:338
#12 0x403b5598 in modperl_callback_run_handlers (idx=6, type=4, r=0x83ba570,
c=0x0, s=0x80a1ea0, pconf=0x0, plog=0x0, ptemp=0x0,
run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:221
#13 0x403b5b67 in modperl_callback_per_dir (idx=6, r=0x83ba570,
run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:368
#14 0x403ae189 in modperl_response_handler_run (r=0x83ba570, finish=1)
at mod_perl.c:979
#15 0x403ae2a0 in modperl_response_handler (r=0x83ba570) at mod_perl.c:1019
#16 0x080697a6 in ap_run_handler (r=0x83ba570) at config.c:152
#17 0x08069d48 in ap_invoke_handler (r=0x83ba570) at config.c:364
#18 0x080652af in ap_process_request (r=0x83ba570) at http_request.c:249
#19 0x08060de9 in ap_process_http_connection (c=0x839f688) at http_core.c:251
#20 0x080727e6 in ap_run_process_connection (c=0x839f688) at connection.c:43
#21 0x08066464 in process_socket (p=0x839f560, sock=0x839f598,
my_child_num=-1084228640, my_thread_num=0, bucket_alloc=0x83a1568)
at worker.c:521
#22 0x08066b3d in worker_thread (thd=0x8231f18, dummy=0x0) at worker.c:835
#23 0x4010f2f1 in dummy_worker (opaque=0x0) at thread.c:105
#24 0x4019a54e in pthread_start_thread () from /lib/libpthread.so.0
#25 0x402a3b8a in clone () from /lib/libc.so.6


This report was generated by /opt/xi3/bin/mp2bug on Fri May 20 16:00:12 2005 GMT.

Attachment: bug-reporting-skeleton-mp2.tar.gz
Description: Binary data



Reply via email to