perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Norris <Robert.Nor...@its.monash.edu.au>
Subject Segfault on page load
Date Mon, 24 Feb 2003 00:04:34 GMT
I've been attempting to get Embperl installed for the past few days, but
it continues to segfault when an Embperl page is loaded. I've traced the
code as far as I'm able, and I'm hoping someone here would be able to
lend a hand.

OS: Redhat 7.3
Apache: 1.3.27
mod_perl: 1.27
Embperl: 2.0b8
perl: 5.6.1

mod_perl was configured with:
  EVERYTHING=1 USE_APACI=1

Apache was configured with:
  --enable-module=so --activate-module=src/modules/perl/libperl.a

Embperl is configured like this:

---
PerlModule Embperl

Embperl_Syntax "Embperl SSI"
Embperl_Options 262160
Embperl_Escmode 0

<Files *.epl>
SetHandler perl-script
PerlHandler Embperl
Options +ExecCGI
</Files>

AddType text/html .epl
---

I've recompiled Apache, mod_perl and Embperl with debugging on and
optimisations off, and run apache with the -X switch. gdb gives me the
following when attempting to load /test.epl:

---
Program received signal SIGSEGV, Segmentation fault.
0x4028297c in embperl_GetApacheComponentConfig (pReq=0x8375434, pPool=0x837540c, pDirCfg=0x81a511c,
pConfig=0x83754a0)
    at mod_embperl.c:846
846                 SvREFCNT_inc(pConfig -> pExpiredFunc);
(gdb) bt
#0  0x4028297c in embperl_GetApacheComponentConfig (pReq=0x8375434, pPool=0x837540c, pDirCfg=0x81a511c,

    pConfig=0x83754a0) at mod_embperl.c:846
#1  0x40264bc4 in embperl_SetupComponent (r=0x8375434, pPerlParam=0x0, ppComponent=0xbfffed4c)
at epinit.c:1785
#2  0x402655dc in embperl_InitRequestComponent (pApacheReqSV=0x827f600, pPerlParam=0x0, ppReq=0xbfffed7c)
    at epinit.c:2027
#3  0x40256edb in embperl_ExecuteRequest (pApacheReqSV=0x827f600, pPerlParam=0x0) at epmain.c:1390
#4  0x4024c8aa in XS_Embperl__Req_ExecuteRequest (cv=0x828a7cc) at Embperl.xs:86
#5  0x0811b66c in Perl_pp_entersub ()
#6  0x08115ab8 in Perl_runops_standard ()
#7  0x080d51d4 in S_call_body ()
#8  0x080d4fb1 in perl_call_sv ()
#9  0x0808afd2 in perl_call_handler (sv=0x827f54c, r=0x83717d4, args=0x0) at mod_perl.c:1658
#10 0x0808a8c9 in perl_run_stacked_handlers (hook=0x816526e "PerlHandler", r=0x83717d4, handlers=0x827f594)
    at mod_perl.c:1371
#11 0x08089379 in perl_handler (r=0x83717d4) at mod_perl.c:897
#12 0x080a7c3f in ap_invoke_handler (r=0x83717d4) at http_config.c:518
#13 0x080bcb77 in process_request_internal (r=0x83717d4) at http_request.c:1308
#14 0x080bcbd8 in ap_process_request (r=0x83717d4) at http_request.c:1324
#15 0x080b3a2d in child_main (child_num_arg=0) at http_main.c:4603
#16 0x080b3bd8 in make_child (s=0x8197d84, slot=0, now=1046042888) at http_main.c:4718
#17 0x080b3d4c in startup_children (number_to_start=5) at http_main.c:4800
#18 0x080b43c4 in standalone_main (argc=2, argv=0xbffff284) at http_main.c:5108
#19 0x080b4c27 in main (argc=2, argv=0xbffff284) at http_main.c:5456
#20 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
---

Some inspection:

---
(gdb) p *pConfig
$3 = {_perlsv = 0x83740c0, pPool = 0x837540c, bUseEnv = 109 'm',
  bUseRedirectEnv = 115 's', sPackage = 0x2 <Address 0x2 out of bounds>,
  bDebug = 1919251317, bOptions = 262160, nCleanup = 1936942445,
  nEscMode = 0, nInputEscMode = 1702112615,
  sInputCharset = 0x69406d61 <Address 0x69406d61 out of bounds>, 
  bEP1Compat = 1831760756,
  sCacheKey = 0x73616e6f <Address 0x73616e6f out of bounds>,
  bCacheKeyOptions = 1684352616, pExpiredFunc = 0x75612e75,
  pCacheKeyFunc = 0x6e696c00, nExpiresIn = 29547, 
  sExpiresFilename = 0x74656e2f <Address 0x74656e2f out of bounds>,
  sSyntax = 0x836921c "Embperl SSI", 
  pRecipe = 0x2d656863,
  sXsltstylesheet = 0x2f766564 <Address 0x2f766564 out of bounds>, 
  sXsltproc = 0x6f647468 <Address 0x6f647468 out of bounds>,
  sCompartment = 0x7363 <Address 0x7363 out of bounds>, 
  pOpcodeMask = 0x81a537c}
---

Obviously, this structure is not being initialised correctly. I've tried
tracing the code, but I'm not familiar enough with the code to figure
out what's going on.

Any help would be appreciated.

Regards,
Rob.

--
Robert Norris                          <Robert.Norris@its.monash.edu.au>
Messaging Team, Identity & Messaging Services
Information Technology Services                     Tel: +61 3 990 53027
PO Box 28C, Monash University, VIC 3800, Australia  Fax: +61 3 990 59888

Mime
View raw message