httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wichitill <ma...@gmx.de>
Subject Re: [multi-env] perl glue status
Date Mon, 14 Mar 2005 17:27:53 GMT
Joe Schaefer wrote:
> Time to review, stabilize & document the perl glue.
> The major change is the Apache:: -> Apache2:: rename.

All apreq (and mod_perl) tests pass for me on Linux with today's SVN of
apache2-renaming-hell-unstable-branch. Installation however fails with

make[4]: Leaving directory `/usr/src/apreq-2.0/glue/perl/xs'
Undefined subroutine &ModPerl::MM::install called at -e line 1.
make[3]: *** [pure_site_install] Error 255

I worked around that by calling ExtUtils::Install::install in
ModPerl::MM::mod_install instead (whether that makes sense or not).


After porting my mwForum application to the Apache2 namespace, the first use
of param() segfaults (sorry, no debug binaries):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1105370032 (LWP 6070)]
0x4027536d in apr_table_get () from /usr/local/apache2/lib/libapr-0.so.0
(gdb) bt
#0  0x4027536d in apr_table_get () from /usr/local/apache2/lib/libapr-0.so.0
#1  0x406bda82 in apache2_body_get (env=0x853f2b0, name=0x84f8f10 "sid") at
handle.c:189
#2  0x406c799b in apreq_param (req=0x853f2b0, key=0x84f8f10 "sid") at
apreq_module.h:197
#3  0x40764935 in apreq_xs_apache2_param () from
/usr/local/perl/lib/auto/APR/Request/Apache2/Apache2.so
#4  0x4055448f in Perl_pp_entersub () from /usr/local/perl/lib/CORE/libperl.so
#5  0x40552b7f in Perl_runops_standard () from
/usr/local/perl/lib/CORE/libperl.so
#6  0x404e78a4 in Perl_call_sv () from /usr/local/perl/lib/CORE/libperl.so
#7  0x404a7509 in modperl_callback () from
/usr/local/apache2/modules/mod_perl.so
#8  0x404a7a52 in modperl_callback_run_handlers () from
/usr/local/apache2/modules/mod_perl.so
#9  0x404a806a in modperl_callback_per_dir () from
/usr/local/apache2/modules/mod_perl.so
#10 0x404a14db in modperl_response_handler_cgi () from
/usr/local/apache2/modules/mod_perl.so
#11 0x08069ddc in ap_run_handler ()
#12 0x0806cd96 in ap_invoke_handler ()
#13 0x08065efb in ap_process_request ()
#14 0x08060fe8 in ap_process_http_connection ()
#15 0x08073dec in ap_run_process_connection ()
#16 0x08067fd6 in worker_thread ()
#17 0x4027dcd6 in dummy_worker () from /usr/local/apache2/lib/libapr-0.so.0
#18 0x403027f3 in start_thread () from /lib/tls/libpthread.so.0
#19 0x403cb62a in clone () from /lib/tls/libc.so.6


I tried to create a simplified testcase similar to my real code:

use Apache2::Request ();
my $apr = Apache2::Request->new($_[0]);
$apr->discard_request_body() == 0 or die "Discard error";
my $param = eval { $apr->param('sid') };
!$@ or die "Param exception";
$apr->content_type("text/plain");
print "sid = $param";

It behaves differently though. With a valid query string like
"test.pl?sid=123", it works as expected, but with an invalid query like
"test.pl?sid=%", it segfaults with the same stack. Unless I remove
$apr->discard_request_body(), in which case it works again. But doing that
doesn't help in the real app. I'm not sure what to try now.



*** mod_perl version 1.999022

*** using /usr/local/perl/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_AP_PREFIX   => /usr/local/apache2
  MP_COMPAT_1X   =>
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_USE_DSO     => 1

*** The httpd binary was not found [hm, that used to work before]

$ /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.52
Server built:   Jan 18 2005 04:40:00
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -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="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

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

 -L/usr/local/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl  -lpthread -ldl
 -L/usr/local/apache2/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat

*** /usr/local/perl/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=linux, osvers=2.6.8-24.10-default, archname=i686-linux-thread-multi
    uname='linux red 2.6.8-24.10-default #1 wed dec 22 11:54:27 utc 2004
i686 athlon i386 gnulinux '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=undef 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',
    optimize='-O3 -march=athlon-tbird',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.3.4 (pre 3.3.5 20040809)', 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=4
    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=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/local/perl/lib/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Jan 22 2005 03:55:06
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/local/perl/lib
    /usr/local/perl/lib
    /usr/local/perl/lib
    /usr/local/perl/lib
    .

Mime
View raw message