1. Problem Description:
A custom apache config directive defined in a <Location> together with a PerlResponseHandler makes the request handling crash.
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::Const -compile => qw/OK/;
sub handler { my $r = shift; $r->print("Hello"); return OK; }
1;
Result:
-------
% telnet localhost 8000 Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test/foo HTTP/1.0
Connection closed by foreign host.
Thanks in advance for any feedback about this.
2. Used Components and their Configuration:
*** mod_perl version 1.999023
*** 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_AP_PREFIX => /opt/xi3 MP_COMPAT_1X => 0 MP_GENERATE_XS => 1 MP_LIBNAME => mod_perl 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='' 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 -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -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='cc', 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: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at May 1 2005 21:29:27 %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 LWP : - mod_perl : - mod_perl2 : 1.999023
3. This is the core dump trace: (if you get a core dump):
[CORE TRACE COMES HERE]
This report was generated by /opt/xi3/bin/mp2bug on Thu May 19 18:53:06 2005 GMT.