Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554794 - www-apache/mod_perl causes apache to segfault if used with perl-5.22
Summary: www-apache/mod_perl causes apache to segfault if used with perl-5.22
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Christian Ruppert (idl0r)
URL: https://rt.cpan.org/Public/Bug/Displa...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-13 21:48 UTC by Ladislav Laska
Modified: 2016-01-09 19:31 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ladislav Laska 2015-07-13 21:48:03 UTC
After starting the apache2, it fails early in the module initialization with this stacktrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeceaa47e in modperl_env_init () from /usr/lib64/apache2/modules/mod_perl.so
(gdb) bt
#0  0x00007fffeceaa47e in modperl_env_init () from /usr/lib64/apache2/modules/mod_perl.so
#1  0x00007fffece99c34 in modperl_hook_init () from /usr/lib64/apache2/modules/mod_perl.so
#2  0x0000000000448719 in ap_run_open_logs ()
#3  0x00000000004297a4 in main ()


the problem seem to be that perl-5.22 makes PL_vtbl_env const, and mod_perl tried to write into it. This causes the segfault. More info here:

https://rt.cpan.org/Public/Bug/Display.html?id=101962#txn-1508463

I suggest making mod_perl block perl-5.22, until the problem is resolved.

Reproducible: Always
Comment 1 Ladislav Laska 2015-07-13 21:57:45 UTC
This is the commit that causes the problem. Reverting it seem to fix the issue:

http://perl5.git.perl.org/perl.git/commit/c910fead78
Comment 2 Dan Goodliffe 2015-07-15 11:02:52 UTC
Confirmed that patching out the referenced commit does stop the segfault.
In my case this allows Apache to run until it hits #550972.
Comment 3 Timo Gurr (RETIRED) gentoo-dev 2015-07-17 08:57:22 UTC
(Adding URL to the upstream bug report about this issue for reference/tracking of progress.)
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2015-12-10 23:39:28 UTC
The upstream svn repo at https://svn.apache.org/repos/asf/perl/modperl/trunk has fixes committed, which will be in 2.0.10 (no release date known so far).

[Note that already 2.0.9 claims to work with any apache 2.0-2.4. If we need to stabilize this for Perl 5.22, what do we do with the apache dependency? Make separate stable/nonstable ebuilds for apache 2.2 and apache 2.4???]
Comment 5 Patrice Clement gentoo-dev 2015-12-28 10:36:42 UTC
Confirmed by our fellow Tobias Klausmann.
Comment 6 Mark Wagner 2016-01-05 03:17:22 UTC
Hacked up an svn-trunk-based ebuild at https://github.com/mark-wagner/portage/tree/master/www-apache/mod_perl

Seems to work for me under apache 2.4 and perl 5.22.
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2016-01-05 09:56:57 UTC
Please try www-apache/mod_perl-2.0.8-r3 (no keywords yet)
Comment 8 Fernando Cunha 2016-01-08 01:05:07 UTC
Andreas, 

I can confirm that www-apache/mod_perl-2.0.8-r3  fix the issue. Mod_perl running fine and no more segfaults. 

Thanks
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2016-01-09 19:31:02 UTC
OK, thanks, keywords restored.