Mailing List Archive

embperl and SSI
Hello,

I get a segfault on some page loads when using Embperl 2.4.0 on Apache 2.2.15 on a CentOS 6.4 server. The page causing the problem is using both SSI and Embperl. When the page is requested, either no data is returned or partial data is returned. When no data is returned the following message appears in the Apache logs:
[Wed Jul 09 14:05:48 2014] [notice] child pid 29812 exit signal Segmentation fault (11)
When partial data is returned no such message appears in the logs.

Apache is configured to serve the affected file as follows:
<Files *.html>
SetHandler perl-script
PerlHandler Embperl
Options +ExecCGI +Includes
XBitHack Full
</files>

There are other files that are served with no problem. They all use SSI and Embperl, and are all significantly smaller than this page - less than 8K. The affected page was trimmed down to 8100 bytes and served without error. Disabling SSI for the file by unsetting the execute bit allows the page to be served without errors (but then the includes do not function). When trimmed to 8101 the above errors started.

The following backtrace was observed from Apache when the segfault occurs:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888, pDomTree=0x7ffff84ca998, xNode=<value optimized out>, pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
3683 tNodeData * pNode = Node_self (pDomTree, xNode) ;
(gdb) bt
#0 0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888, pDomTree=0x7ffff84ca998, xNode=<value optimized out>, pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
#1 0x00007fffefb07be4 in EMBPERL2_Node_toString2 (r=0x7ffff8532888, pDomTree=<value optimized out>, xNode=<value optimized out>, pRepeatLevel=0x7fffffffdc7c) at epdom.c:3894
#2 0x00007fffefb08413 in EMBPERL2_Node_toString (r=<value optimized out>, pDomTree=<value optimized out>, xNode=<value optimized out>, nRepeatLevel=0) at epdom.c:3994
#3 0x00007fffefaeb65b in OutputToFile (r=0x7ffff8532888) at epmain.c:1123
#4 0x00007fffefaee478 in EndOutput (r=0x7ffff8532888) at epmain.c:1190
#5 embperl_RunRequest (r=0x7ffff8532888) at epmain.c:1401
#6 0x00007fffefaee9aa in embperl_ExecuteRequest (my_perl=0x7ffff8260bf0, pApacheReqSV=<value optimized out>, pPerlParam=0x0) at epmain.c:1486
#7 0x00007fffefaeaae7 in XS_Embperl__Req_ExecuteRequest (my_perl=0x7ffff8260bf0, cv=<value optimized out>) at Embperl.xs:136
#8 0x00007ffff1891815 in Perl_pp_entersub () from /usr/lib64/perl5/CORE/libperl.so
#9 0x00007ffff188fb06 in Perl_runops_standard () from /usr/lib64/perl5/CORE/libperl.so
#10 0x00007ffff18375df in Perl_call_sv () from /usr/lib64/perl5/CORE/libperl.so
#11 0x00007ffff1b6e0be in modperl_callback () from /etc/httpd/modules/mod_perl.so
#12 0x00007ffff1b6e80b in modperl_callback_run_handlers () from /etc/httpd/modules/mod_perl.so
#13 0x00007ffff1b6ee0f in modperl_callback_per_dir () from /etc/httpd/modules/mod_perl.so
#14 0x00007ffff1b6875f in ?? () from /etc/httpd/modules/mod_perl.so
#15 0x00007ffff1b68913 in modperl_response_handler_cgi () from /etc/httpd/modules/mod_perl.so
#16 0x00007ffff7fd6bb0 in ap_run_handler (r=0x7ffff85298c8) at /usr/src/debug/httpd-2.2.15/server/config.c:158
#17 0x00007ffff7fda46e in ap_invoke_handler (r=0x7ffff85298c8) at /usr/src/debug/httpd-2.2.15/server/config.c:376
#18 0x00007ffff7fe5b30 in ap_process_request (r=0x7ffff85298c8) at /usr/src/debug/httpd-2.2.15/modules/http/http_request.c:282
#19 0x00007ffff7fe29a8 in ap_process_http_connection (c=0x7ffff851da58) at /usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190
#20 0x00007ffff7fde6b8 in ap_run_process_connection (c=0x7ffff851da58) at /usr/src/debug/httpd-2.2.15/server/connection.c:43
#21 0x00007ffff7fea977 in child_main (child_num_arg=<value optimized out>) at /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:667
#22 0x00007ffff7feac46 in make_child (s=0x7ffff8212860, slot=0) at /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:707
#23 0x00007ffff7feb293 in ap_mpm_run (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) at /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:983
#24 0x00007ffff7fc2900 in main (argc=2, argv=0x7fffffffe6d8) at /usr/src/debug/httpd-2.2.15/server/main.c:760

What's the next step to take to figure out the root cause of this issue? Can SSI and Embperl be combined, and if so, is this done correctly with the above configuration?

--
Edward Guldemond
Programmer / Analyst
MicroDecisions, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
AW: embperl and SSI [ In reply to ]
Hi,

can you first try to update to Embperl 2.5.0. There are some fixes in, that
might solve your problem.

Gerald


> -----Ursprüngliche Nachricht-----
> Von: Edward Guldemond [mailto:edward@microdecisions.com]
> Gesendet: Donnerstag, 10. Juli 2014 17:45
> An: embperl@perl.apache.org
> Betreff: embperl and SSI
>
> Hello,
>
> I get a segfault on some page loads when using Embperl 2.4.0 on Apache
> 2.2.15 on a CentOS 6.4 server. The page causing the problem is using both
SSI
> and Embperl. When the page is requested, either no data is returned or
> partial data is returned. When no data is returned the following message
> appears in the Apache logs:
> [Wed Jul 09 14:05:48 2014] [notice] child pid 29812 exit signal
Segmentation
> fault (11) When partial data is returned no such message appears in the
logs.
>
> Apache is configured to serve the affected file as follows:
> <Files *.html>
> SetHandler perl-script
> PerlHandler Embperl
> Options +ExecCGI +Includes
> XBitHack Full
> </files>
>
> There are other files that are served with no problem. They all use SSI
and
> Embperl, and are all significantly smaller than this page - less than 8K.
The
> affected page was trimmed down to 8100 bytes and served without error.
> Disabling SSI for the file by unsetting the execute bit allows the page to
be
> served without errors (but then the includes do not function). When
> trimmed to 8101 the above errors started.
>
> The following backtrace was observed from Apache when the segfault
> occurs:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> pDomTree=0x7ffff84ca998, xNode=<value optimized out>,
> pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
> 3683 tNodeData * pNode = Node_self (pDomTree, xNode) ;
> (gdb) bt
> #0 0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> pDomTree=0x7ffff84ca998, xNode=<value optimized out>,
> pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
> #1 0x00007fffefb07be4 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> pDomTree=<value optimized out>, xNode=<value optimized out>,
> pRepeatLevel=0x7fffffffdc7c) at epdom.c:3894
> #2 0x00007fffefb08413 in EMBPERL2_Node_toString (r=<value optimized
> out>, pDomTree=<value optimized out>, xNode=<value optimized out>,
> nRepeatLevel=0) at epdom.c:3994
> #3 0x00007fffefaeb65b in OutputToFile (r=0x7ffff8532888) at epmain.c:1123
> #4 0x00007fffefaee478 in EndOutput (r=0x7ffff8532888) at epmain.c:1190
> #5 embperl_RunRequest (r=0x7ffff8532888) at epmain.c:1401
> #6 0x00007fffefaee9aa in embperl_ExecuteRequest
> (my_perl=0x7ffff8260bf0, pApacheReqSV=<value optimized out>,
> pPerlParam=0x0) at epmain.c:1486
> #7 0x00007fffefaeaae7 in XS_Embperl__Req_ExecuteRequest
> (my_perl=0x7ffff8260bf0, cv=<value optimized out>) at Embperl.xs:136
> #8 0x00007ffff1891815 in Perl_pp_entersub () from
> /usr/lib64/perl5/CORE/libperl.so
> #9 0x00007ffff188fb06 in Perl_runops_standard () from
> /usr/lib64/perl5/CORE/libperl.so
> #10 0x00007ffff18375df in Perl_call_sv () from
> /usr/lib64/perl5/CORE/libperl.so
> #11 0x00007ffff1b6e0be in modperl_callback () from
> /etc/httpd/modules/mod_perl.so
> #12 0x00007ffff1b6e80b in modperl_callback_run_handlers () from
> /etc/httpd/modules/mod_perl.so
> #13 0x00007ffff1b6ee0f in modperl_callback_per_dir () from
> /etc/httpd/modules/mod_perl.so
> #14 0x00007ffff1b6875f in ?? () from /etc/httpd/modules/mod_perl.so
> #15 0x00007ffff1b68913 in modperl_response_handler_cgi () from
> /etc/httpd/modules/mod_perl.so
> #16 0x00007ffff7fd6bb0 in ap_run_handler (r=0x7ffff85298c8) at
> /usr/src/debug/httpd-2.2.15/server/config.c:158
> #17 0x00007ffff7fda46e in ap_invoke_handler (r=0x7ffff85298c8) at
> /usr/src/debug/httpd-2.2.15/server/config.c:376
> #18 0x00007ffff7fe5b30 in ap_process_request (r=0x7ffff85298c8) at
> /usr/src/debug/httpd-2.2.15/modules/http/http_request.c:282
> #19 0x00007ffff7fe29a8 in ap_process_http_connection (c=0x7ffff851da58)
> at /usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190
> #20 0x00007ffff7fde6b8 in ap_run_process_connection (c=0x7ffff851da58) at
> /usr/src/debug/httpd-2.2.15/server/connection.c:43
> #21 0x00007ffff7fea977 in child_main (child_num_arg=<value optimized
> out>) at /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:667
> #22 0x00007ffff7feac46 in make_child (s=0x7ffff8212860, slot=0) at
> /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:707
> #23 0x00007ffff7feb293 in ap_mpm_run (_pconf=<value optimized out>,
> plog=<value optimized out>, s=<value optimized out>) at
> /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:983
> #24 0x00007ffff7fc2900 in main (argc=2, argv=0x7fffffffe6d8) at
> /usr/src/debug/httpd-2.2.15/server/main.c:760
>
> What's the next step to take to figure out the root cause of this issue?
Can
> SSI and Embperl be combined, and if so, is this done correctly with the
above
> configuration?
>
> --
> Edward Guldemond
> Programmer / Analyst
> MicroDecisions, Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
AW: embperl and SSI [ In reply to ]
Hi,

could you please compile Embperl with Debuginformation (run perl Makefile.PL debug && make install) and then sent me the backtrace again.

Thanks

Gerald


-----Ursprüngliche Nachricht-----
Von: Edward Guldemond [mailto:edward@microdecisions.com]
Gesendet: Freitag, 11. Juli 2014 17:28
An: richter@ecos.de
Betreff: RE: embperl and SSI

Installing Embperl 2.5.0 does not fix the problem.

--
Edward Guldemond
Programmer / Analyst
MicroDecisions, Inc.
Tel:  407-843-1550 x7533
Fax: 407-843-1660
E-mail: edward@microdecisions.com
Website: www.microbase.com


> -----Original Message-----
> From: Gerald Richter [mailto:gerald@weis-richter.de] On Behalf Of
> richter@ecos.de
> Sent: Friday, July 11, 2014 5:34 AM
> To: Edward Guldemond; embperl@perl.apache.org
> Subject: AW: embperl and SSI
>
> Hi,
>
> can you first try to update to Embperl 2.5.0. There are some fixes in,
> that might solve your problem.
>
> Gerald
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Edward Guldemond [mailto:edward@microdecisions.com]
> > Gesendet: Donnerstag, 10. Juli 2014 17:45
> > An: embperl@perl.apache.org
> > Betreff: embperl and SSI
> >
> > Hello,
> >
> > I get a segfault on some page loads when using Embperl 2.4.0 on Apache
> > 2.2.15 on a CentOS 6.4 server. The page causing the problem is using
> > both
> SSI
> > and Embperl. When the page is requested, either no data is returned
> > or partial data is returned. When no data is returned the following
> > message appears in the Apache logs:
> > [Wed Jul 09 14:05:48 2014] [notice] child pid 29812 exit signal
> Segmentation
> > fault (11) When partial data is returned no such message appears in
> > the
> logs.
> >
> > Apache is configured to serve the affected file as follows:
> > <Files *.html>
> > SetHandler perl-script
> > PerlHandler Embperl
> > Options +ExecCGI +Includes
> > XBitHack Full
> > </files>
> >
> > There are other files that are served with no problem. They all use
> > SSI
> and
> > Embperl, and are all significantly smaller than this page - less than
> 8K.
> The
> > affected page was trimmed down to 8100 bytes and served without error.
> > Disabling SSI for the file by unsetting the execute bit allows the
> > page to
> be
> > served without errors (but then the includes do not function). When
> > trimmed to 8101 the above errors started.
> >
> > The following backtrace was observed from Apache when the segfault
> > occurs:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> > pDomTree=0x7ffff84ca998, xNode=<value optimized out>,
> > pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
> > 3683 tNodeData * pNode = Node_self (pDomTree, xNode) ;
> > (gdb) bt
> > #0 0x00007fffefb07a98 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> > pDomTree=0x7ffff84ca998, xNode=<value optimized out>,
> > pRepeatLevel=0x7fffffffdc2e) at epdom.c:3683
> > #1 0x00007fffefb07be4 in EMBPERL2_Node_toString2 (r=0x7ffff8532888,
> > pDomTree=<value optimized out>, xNode=<value optimized out>,
> > pRepeatLevel=0x7fffffffdc7c) at epdom.c:3894
> > #2 0x00007fffefb08413 in EMBPERL2_Node_toString (r=<value optimized
> > out>, pDomTree=<value optimized out>, xNode=<value optimized out>,
> > nRepeatLevel=0) at epdom.c:3994
> > #3 0x00007fffefaeb65b in OutputToFile (r=0x7ffff8532888) at
> > epmain.c:1123
> > #4 0x00007fffefaee478 in EndOutput (r=0x7ffff8532888) at
> > epmain.c:1190
> > #5 embperl_RunRequest (r=0x7ffff8532888) at epmain.c:1401
> > #6 0x00007fffefaee9aa in embperl_ExecuteRequest
> > (my_perl=0x7ffff8260bf0, pApacheReqSV=<value optimized out>,
> > pPerlParam=0x0) at epmain.c:1486
> > #7 0x00007fffefaeaae7 in XS_Embperl__Req_ExecuteRequest
> > (my_perl=0x7ffff8260bf0, cv=<value optimized out>) at Embperl.xs:136
> > #8 0x00007ffff1891815 in Perl_pp_entersub () from
> > /usr/lib64/perl5/CORE/libperl.so
> > #9 0x00007ffff188fb06 in Perl_runops_standard () from
> > /usr/lib64/perl5/CORE/libperl.so
> > #10 0x00007ffff18375df in Perl_call_sv () from
> > /usr/lib64/perl5/CORE/libperl.so
> > #11 0x00007ffff1b6e0be in modperl_callback () from
> > /etc/httpd/modules/mod_perl.so
> > #12 0x00007ffff1b6e80b in modperl_callback_run_handlers () from
> > /etc/httpd/modules/mod_perl.so
> > #13 0x00007ffff1b6ee0f in modperl_callback_per_dir () from
> > /etc/httpd/modules/mod_perl.so
> > #14 0x00007ffff1b6875f in ?? () from /etc/httpd/modules/mod_perl.so
> > #15 0x00007ffff1b68913 in modperl_response_handler_cgi () from
> > /etc/httpd/modules/mod_perl.so
> > #16 0x00007ffff7fd6bb0 in ap_run_handler (r=0x7ffff85298c8) at
> > /usr/src/debug/httpd-2.2.15/server/config.c:158
> > #17 0x00007ffff7fda46e in ap_invoke_handler (r=0x7ffff85298c8) at
> > /usr/src/debug/httpd-2.2.15/server/config.c:376
> > #18 0x00007ffff7fe5b30 in ap_process_request (r=0x7ffff85298c8) at
> > /usr/src/debug/httpd-2.2.15/modules/http/http_request.c:282
> > #19 0x00007ffff7fe29a8 in ap_process_http_connection
> > (c=0x7ffff851da58) at
> > /usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190
> > #20 0x00007ffff7fde6b8 in ap_run_process_connection (c=0x7ffff851da58)
> > at
> > /usr/src/debug/httpd-2.2.15/server/connection.c:43
> > #21 0x00007ffff7fea977 in child_main (child_num_arg=<value optimized
> > out>) at /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:667
> > #22 0x00007ffff7feac46 in make_child (s=0x7ffff8212860, slot=0) at
> > /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:707
> > #23 0x00007ffff7feb293 in ap_mpm_run (_pconf=<value optimized out>,
> > plog=<value optimized out>, s=<value optimized out>) at
> > /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:983
> > #24 0x00007ffff7fc2900 in main (argc=2, argv=0x7fffffffe6d8) at
> > /usr/src/debug/httpd-2.2.15/server/main.c:760
> >
> > What's the next step to take to figure out the root cause of this issue?
> Can
> > SSI and Embperl be combined, and if so, is this done correctly with
> > the
> above
> > configuration?
> >
> > --
> > Edward Guldemond
> > Programmer / Analyst
> > MicroDecisions, Inc.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
>



** Virus checked by ECOS Mailfilter **

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