I am getting a consistent segfault in Embperl, that I'd like some help in diagnosing. I am using:

RHEL AS 4, kernel 2.6.11
with these things I compiled myself:
  apache 2.0.53
  perl 5.8.6
  mod_perl-2.0.0-RC4
  Embperl 2.0rc2

The problem happens with earlier versions of everything, as well (even Emb 1.x). Here is the relevant section of httpd.conf:

AddType text/html .epl
LoadModule embperl_module /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
Embperl_UseEnv on
SetEnv EMBPERL_DEBUG 0
SetEnv EMBPERL_APPNAME lottery
SetEnv EMBPERL_SESSION_HANDLER_CLASS no
PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no


<Files *.epl>
  PerlSetEnv    EMBPERL_SESSION_HANDLER_CLASS no
  SetHandler    perl-script
  PerlResponseHandler   Embperl::Object
  Options       ExecCGI
</Files>

<Location /lottery>
  DirectoryIndex index.epl index.html index.shtml default.html blocked.html
  PerlSetEnv    EMBPERL_OBJECT_BASE hello.epl
  PerlSetEnv    EMBPERL_FILESMATCH "\.epl$"
  PerlResponseHandler   Embperl::Object
</Location>

The above config uses "hello.epl", which is just:

<HTML><HEAD></HEAD><BODY>
[+ "Hello world!" +]
</BODY></HTML>

If I do not include a "use Embperl" line in my startup script, then the first request for a ".epl" file works fine, but the second request for the *same page* will segfault. This is the output from a gdb run with "-X -DSSL":

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208875328 (LWP 30771)]
0xb7e2fb52 in S_hv_fetch_common () from /etc/httpd/modules/mod_perl.so
(gdb) bt
#0  0xb7e2fb52 in S_hv_fetch_common () from /etc/httpd/modules/mod_perl.so
#1  0xb7e31000 in Perl_hv_fetch () from /etc/httpd/modules/mod_perl.so
#2  0xb7b93367 in EMBPERL2_GetHashValueStr ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#3  0xb7b9f0a1 in embperl_GetCGIReqConfig ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#4  0xb7bb6c91 in embperl_GetApacheReqConfig ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#5  0xb7b9b1c2 in embperl_SetupRequest ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#6  0xb7b9db70 in embperl_InitRequest ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#7  0xb7b86bff in XS_Embperl__Req_InitRequest ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#8  0xb7e3ace8 in Perl_pp_entersub () from /etc/httpd/modules/mod_perl.so
#9  0xb7e34632 in Perl_runops_standard () from /etc/httpd/modules/mod_perl.so
#10 0xb7dd7fe9 in Perl_call_sv () from /etc/httpd/modules/mod_perl.so
#11 0xb7dbe88f in modperl_callback () from /etc/httpd/modules/mod_perl.so
#12 0xb7dbefa5 in modperl_callback_run_handlers ()
   from /etc/httpd/modules/mod_perl.so
#13 0xb7dbf343 in modperl_callback_per_dir ()
   from /etc/httpd/modules/mod_perl.so
#14 0xb7dba7a5 in modperl_response_handler_cgi ()
   from /etc/httpd/modules/mod_perl.so
#15 0x080672ce in ap_run_handler (r=0x8d45740) at config.c:152
#16 0x08067699 in ap_invoke_handler (r=0x8d45740) at config.c:364
#17 0x08064ee5 in ap_process_request (r=0x8d45740) at http_request.c:249
#18 0x08060bb1 in ap_process_http_connection (c=0x8d37200) at http_core.c:251
#19 0x0806f4e2 in ap_run_process_connection (c=0x8d37200) at connection.c:43
#20 0x08065aa9 in child_main (child_num_arg=0) at prefork.c:610
#21 0x08065c9d in make_child (s=0x809be58, slot=0) at prefork.c:650
#22 0x08065d64 in startup_children (number_to_start=5) at prefork.c:722
#23 0x08066437 in ap_mpm_run (_pconf=0xbffff500, plog=0x80c4150, s=0xbffff504)
    at prefork.c:941
#24 0x0806b4e7 in main (argc=3, argv=0xbffff6a4) at main.c:618

This is similar to a problem encountered in this thread:

  http://www2.ecos.de/~mailarc/embperl/2004-04/msg00110.html

the solution for which was to include "use Embperl" in the startup script. But if I do this, then:

- web pages which use Embperl (ending in .epl) return no content and no errors
- and, the perl-status URL for Embperl [hostname/perl-status?Embperl] segfaults:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208875328 (LWP 16726)]
0xb7b989d7 in EMBPERL2_mgGetCurrNode ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
(gdb) bt
#0  0xb7b989d7 in EMBPERL2_mgGetCurrNode ()
   from /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Embperl/Embperl.so
#1  0xb7e273b2 in Perl_mg_get () from /etc/httpd/modules/mod_perl.so
#2  0xb7e53f7f in Perl_sv_setsv_flags () from /etc/httpd/modules/mod_perl.so
#3  0xb7e559ca in Perl_sv_mortalcopy () from /etc/httpd/modules/mod_perl.so
#4  0xb7e729ad in Perl_pp_leavetry () from /etc/httpd/modules/mod_perl.so
#5  0xb7e34632 in Perl_runops_standard () from /etc/httpd/modules/mod_perl.so
#6  0xb7dd7fe9 in Perl_call_sv () from /etc/httpd/modules/mod_perl.so
#7  0xb7dbe88f in modperl_callback () from /etc/httpd/modules/mod_perl.so
#8  0xb7dbefa5 in modperl_callback_run_handlers ()
   from /etc/httpd/modules/mod_perl.so
#9  0xb7dbf343 in modperl_callback_per_dir ()
   from /etc/httpd/modules/mod_perl.so
#10 0xb7dba7a5 in modperl_response_handler_cgi ()
   from /etc/httpd/modules/mod_perl.so
#11 0x080672ce in ap_run_handler (r=0x8e2bca8) at config.c:152
#12 0x08067699 in ap_invoke_handler (r=0x8e2bca8) at config.c:364
#13 0x08064ee5 in ap_process_request (r=0x8e2bca8) at http_request.c:249
#14 0x08060bb1 in ap_process_http_connection (c=0x8e05088) at http_core.c:251
#15 0x0806f4e2 in ap_run_process_connection (c=0x8e05088) at connection.c:43
#16 0x08065aa9 in child_main (child_num_arg=0) at prefork.c:610
#17 0x08065c9d in make_child (s=0x809be58, slot=0) at prefork.c:650
#18 0x08065d64 in startup_children (number_to_start=5) at prefork.c:722
#19 0x08066437 in ap_mpm_run (_pconf=0xbffff500, plog=0x80c4150, s=0xbffff504)
    at prefork.c:941
#20 0x0806b4e7 in main (argc=3, argv=0xbffff6a4) at main.c:618

Any ideas?
--
Dan Wilga                                         [EMAIL PROTECTED]
Web Administrator                             http://www.mtholyoke.edu
Mount Holyoke College                                Tel: 413-538-3027
South Hadley, MA  01075            "Who left the cake out in the rain?"

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to