Segfault with Apache::Request->param method

[prev] [thread] [next] [Date index for 2004/12/02]

From: Chris Brown
Subject: Segfault with Apache::Request->param method
Date: 21:36 on 02 Dec 2004
Hi all,
New to the list, somewhat new to this whole mod_perl thing. I've got a 
pretty good handle on it but recently I've been getting segfaults when 
calling $apr->param('someparam') ... this appears to be somewhat random 
though it happens within two or three requests when running under -X

Right now I'm running Apache 1.3.31 with mod_perl 1.29. Perl is 5.8.3 on 
Fedora FC1

Here's the output of perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.4.21-9.elsmp, archname=i386-linux-thread-multi
    uname='linux bugs.devel.redhat.com 2.4.21-9.elsmp #1 smp thu jan 8 
17:08:56
est 2004 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 
-Dversion=5
.8.3 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc 
-Dcf_by=Red Hat,
 Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux 
-Dvendorprefix=/u
sr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads 
-Duselargefiles -Dd
_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog 
-Dman3ex
t=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly 
-Dpager=/usr
/bin/less -isr -Dinc_version_list=5.8.2 5.8.1 5.8.0'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=de
fine
    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 
-DDEBUGGI
NG -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_
BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-st
rict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.3.2 20031218 (Red Hat Linux 3.3.2-5)', 
gccosandv
ers=''
    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.2.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpa
th,/usr/lib/perl5/5.8.3/i386-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 Mar 23 2004 20:56:34

And here's a backtrace of the segfault:

#0  0x08066b54 in ap_table_get ()
#1  0x0013e6a6 in XS_Apache__Request_param (my_perl=0x915d190, cv=0x9129290)
    at Request.xs:416
#2  0x00cee50d in Perl_pp_entersub (my_perl=0x915d190) at pp_hot.c:2840
#3  0x00cd0ead in Perl_runops_debug (my_perl=0x915d190) at dump.c:1438
#4  0x00c809b9 in S_call_body (my_perl=0x915d190, myop=0xbff069b0, 
is_eval=0)
    at perl.c:2222
#5  0x00c80685 in Perl_call_sv (my_perl=0x915d190, sv=0x0, flags=4)
    at perl.c:2140
#6  0x0021b9a5 in perl_call_handler (sv=0x91946ac, r=0x99500ec, args=0x0)
    at mod_perl.c:1668
#7  0x0021a7a0 in perl_run_stacked_handlers (hook=0x25eaed "PerlHandler",
    r=0x99500ec, handlers=0x915b898) at mod_perl.c:1381
#8  0x0021749b in perl_handler (r=0x99500ec) at mod_perl.c:921
#9  0x0806ac2f in ap_invoke_handler ()
#10 0x0807ff5d in process_request_internal ()
#11 0x0807ffbc in ap_process_request ()
#12 0x08077083 in child_main ()
#13 0x08077249 in make_child ()
#14 0x080773af in startup_children ()
#15 0x08077a66 in standalone_main ()
#16 0x0807829e in main ()

Has anyone else seen behavior like this before?

Thanks!
Chris

        -- 
        Chris Brown
System Administrator
Wavetex Inc.
903-597-7566	http://wavetex.com/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Segfault with Apache::Request->param method
Chris Brown 21:36 on 02 Dec 2004

Re: Segfault with Apache::Request->param method
Chris Brown 14:05 on 06 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52