Skip Menu |

This queue is for tickets about the forks CPAN distribution.

Report information
The Basics
Id: 49878
Status: open
Priority: 0/
Queue: forks

People
Owner: RYBSKEJ [...] cpan.org
Requestors: bjohnson [...] symetrix.com
Cc: mibarra [...] msg.com.mx
AdminCc:

Bug Information
Severity: Important
Broken in: 0.33
Fixed in: (no value)



Subject: make test fails with assertion
$ perl -v This is perl, v5.10.0 built for i386-linux-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. + make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/forks00-sigtrap.t .. ok Assertion ((sv)->sv_flags & (0x00200000|0x00400000|0x00800000)) failed: file "mg.c", line 88 at /usr/lib/perl5/vendor_perl/5.10.0/Sys/SigAction.pm line 132. Compilation failed in require at t/forks01.t line 14. BEGIN failed--compilation aborted at t/forks01.t line 14. ^C
This appears to be a Perl core issue, documented in RT#75150: http://rt.perl.org/rt3/Public/Bug/Display.html?id=75150
A possible workaround is this patch from Tuukka. The comment is not very reassuring though: "This little stupid patch fixes things but I don't know why!" :) Also, seems like hes wrong when saying it's a forks problem. https://bugzilla.novell.com/show_bug.cgi?id=527537#c3
On Tue Nov 15 04:36:41 2011, http://was.id.ly/ wrote: Show quoted text
> > A possible workaround is this patch from Tuukka. The comment is not very > reassuring though: "This little stupid patch fixes things but I > don't know why!" :) > > Also, seems like hes wrong when saying it's a forks problem. > > https://bugzilla.novell.com/show_bug.cgi?id=527537#c3 >
The bug is unfortunately in Perl, as noted earlier in this thread. This is fixed in Perl 5.14. The specific Perl patch is here: http://perl5.git.perl.org/perl.git/commitdiff/17cffb3718693d45499c002f0f50df9196858f28 ?hp=8df6b97c1de8326d50ac9c8cae4bf716393b45bb The core issue is sigaction would crash/assert with a replaced %SIG, e.g.: *SIG = {}; POSIX::sigaction(SIGHUP, POSIX::SigAction->new); # <-- crash without patch So commenting out that block in forks::signals only prevents forks from using sigaction. But any user code can still call sigaction, leading to a crash. So perhaps I need a Perl 5.10-5.12 "mitigation" patch: install forks.pm CHLD early (the only signal forks.pm requres with flags via sigaction); then warn users not to use POSIX::sigaction in their code, which is quite uncommon anyway, especially in ithread-aware code where you shouldn't be fork'ing anymore. Or vendors can apply the above mentioned bleed patch to their Perl 5.10 or 5.12 distribution.