perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beau E. Cox" <b...@beaucox.com>
Subject Re: Segfaults
Date Sun, 25 Apr 2004 10:12:04 GMT
Hi Gerald -

My segfaults happen in production even with perl back to
5.8.3. I must be a configuration problem. Here is what
I' getting:

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

  segfaults on embperl pages. Content is transfered to the
  browser. Using Embperl cvs.

1a. Test page

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Embperl test</title>
</head>
<body>
<h1>Embperl test</h1>
<p>2 + 2 = [+ 4 +].</p>
</body> </html>

1b. httpd.conf

[...]
LoadModule embperl_module \
        /usr/perl/db-apache2.1/lib/site_perl/5.8.4/i686-linux-thread-multi/auto/Embperl/Embperl.so
[...]
<VirtualHost xxx.xxx.xxx.xxx:80>
  ServerName xxxxx.xxxxx.com
  DocumentRoot "/srv/www/htdocs/embtest"
  <Directory "/srv/www/htdocs/embtest">
    Embperl_AppName my_embtest_app
    <FilesMatch "\.html$">
       SetHandler perl-script
       PerlHandler Embperl
       Options ExecCGI
    </FilesMatch>
  </Directory>
</VirtualHost>

2. Used Components and their Configuration:

*** mod_perl version 1.9914

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS        => /usr/apache2.1/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1
  MP_USE_STATIC  => 1


*** /usr/apache2.1/sbin/httpd -V
Server version: Apache/2.1.0-dev
Server built:   Apr 24 2004 23:26:12
Server's Module Magic Number: 20030821:3
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -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/apache2.1"
 -D SUEXEC_BIN="/usr/apache2.1/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="/etc/httpd/httpd.conf"


*** /usr/perl/db-apache2.1/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.6.6-rc2, archname=i686-linux-thread-multi
    uname='linux cathy.beaucox.com 2.6.6-rc2 #1 sat apr 24 13:43:16 hst 2004 
i686 unknown unknown gnulinux '
    config_args='-Dprefix=/usr/perl/db-apache2.1 -d -e -Dusethreads 
-Duseshrplib -Doptimize='-g''
    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 
-DDEBUGGING -fno-strict-aliasing -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 -I/usr/local/include'
    ccversion='', gccversion='3.3.3', 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 -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='-Wl,-E 
-Wl,-rpath,/usr/perl/db-apache2.1/lib/5.8.4/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 Apr 24 2004 22:45:51
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/perl/db-apache2.1/lib/5.8.4/i686-linux-thread-multi
    /usr/perl/db-apache2.1/lib/5.8.4
    /usr/perl/db-apache2.1/lib/site_perl/5.8.4/i686-linux-thread-multi
    /usr/perl/db-apache2.1/lib/site_perl/5.8.4
    /usr/perl/db-apache2.1/lib/site_perl
    .

*** Packages of interest status:

Apache::Request: 2.03-dev
CGI            : 3.05
LWP            : 5.79
mod_perl       : 1.9914


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

Starting program: /usr/apache2.1/sbin/httpd -X -DPRODUCTION -DAPACHE_2.1
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 5447)]
Detaching after fork from child process 5450.
Detaching after fork from child process 5451.
Detaching after fork from child process 5452.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 5447)]
0x40575711 in S_hv_fetch_common (my_perl=0x84bc198, hv=0x88dade8, keysv=0x0,
    key=0x4070dbc6 "EMBPERL_ALLOW", klen=13, flags=0, action=8, val=0x0, 
hash=138139023)
    at hv.c:631
631             if (HeHASH(entry) != hash)              /* strings can't be 
equal */
(gdb) bt
#0  0x40575711 in S_hv_fetch_common (my_perl=0x84bc198, hv=0x88dade8, 
keysv=0x0,
    key=0x4070dbc6 "EMBPERL_ALLOW", klen=13, flags=0, action=8, val=0x0, 
hash=138139023)
    at hv.c:631
#1  0x40574d53 in Perl_hv_fetch (my_perl=0x84bc198, hv=0x88dade8, 
key=0x4070dbc6 "EMBPERL_ALLOW",
    klen_i32=13, lval=0) at hv.c:323
#2  0x406a3644 in EMBPERL2_GetHashValueStr (my_perl=0x84bc198, 
pHash=0x88dade8,
    sKey=0x4070dbc6 "EMBPERL_ALLOW", sDefault=0x0) at eputil.c:760
#3  0x406b2bf4 in embperl_GetCGIReqConfig (pApp=0x8b98ad4, pPool=0x8b9aabc, 
pConfig=0x8b9aafc,
    bUseEnv=1 '\001', bUseRedirectEnv=0 '\0', bSetDefault=0 '\0') at 
epcfg.h:36
#4  0x406d5ae7 in embperl_GetApacheReqConfig (pApp=0x8b98ad4, pPool=0x8b9aabc, 
pDirCfg=0x8ab1f28,
    pConfig=0x8b9aafc) at mod_embperl.c:879
#5  0x406ae9c7 in embperl_SetupRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pApp=0x8b98ad4, pApacheCfg=0x8ab1f28, pPerlParam=0x0, ppReq=0xbfffeea4) at 
epinit.c:1394
#6  0x406b0e43 in embperl_InitRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558, pPerlParam=0x0,
    ppReq=0xbfffef0c) at epinit.c:2121
#7  0x406b1319 in embperl_InitRequestComponent (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pPerlParam=0x0, ppReq=0xbfffef0c) at epinit.c:2189
#8  0x4069fe5d in embperl_ExecuteRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pPerlParam=0x0) at epmain.c:1417
#9  0x40693498 in XS_Embperl__Req_ExecuteRequest (my_perl=0x84bc198, 
cv=0x8ab83a0)
    at Embperl.xs:85
#10 0x405883ad in Perl_pp_entersub (my_perl=0x84bc198) at pp_hot.c:2854
#11 0x40561e72 in Perl_runops_debug (my_perl=0x84bc198) at dump.c:1442
#12 0x40500dd6 in S_call_body (my_perl=0x84bc198, myop=0xbffff180, is_eval=0) 
at perl.c:2285
#13 0x405008fc in Perl_call_sv (my_perl=0x84bc198, sv=0x8ad0084, flags=4) at 
perl.c:2203
#14 0x404b30c1 in modperl_callback (my_perl=0x84bc198, handler=0x8ab6148, 
p=0x8ab06a0,
    r=0x8ab06d8, s=0x81a1c70, args=0x8c5254c) at modperl_callback.c:99
#15 0x404b39b7 in modperl_callback_run_handlers (idx=6, type=4, r=0x8ab06d8, 
c=0x0, s=0x81a1c70,
    pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at 
modperl_callback.c:262
#16 0x404b3c8f in modperl_callback_per_dir (idx=6, r=0x8ab06d8, 
run_mode=MP_HOOK_RUN_FIRST)
    at modperl_callback.c:350
#17 0x404abb81 in modperl_response_handler_run (r=0x8ab06d8, finish=0) at 
mod_perl.c:865
---Type <return> to continue, or q <return> to quit---
#18 0x404abf22 in modperl_response_handler_cgi (r=0x8ab06d8) at mod_perl.c:960
#19 0x080a297f in ap_run_handler (r=0x8ab06d8) at config.c:151
#20 0x080a310d in ap_invoke_handler (r=0x8ab06d8) at config.c:363
#21 0x0808e7b3 in ap_process_request (r=0x8ab06d8) at http_request.c:246
#22 0x0808850a in ap_process_http_connection (c=0x8aa3db8) at http_core.c:253
#23 0x080b0504 in ap_run_process_connection (c=0x8aa3db8) at connection.c:42
#24 0x080b08fe in ap_process_connection (c=0x8aa3db8, csd=0x8aa3c20) at 
connection.c:175
#25 0x080a0eeb in child_main (child_num_arg=0) at prefork.c:625
#26 0x080a0fce in make_child (s=0x8131478, slot=0) at prefork.c:665
#27 0x080a1599 in ap_mpm_run (_pconf=0x80f40f0, plog=0x812c1d0, s=0x8131478) 
at prefork.c:941
#28 0x080a9229 in main (argc=4, argv=0xbffff644) at main.c:665
(gdb)

This report was generated by t/REPORT on Sun Apr 25 10:01:45 2004 GMT.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message