Bug#628493: perl: FTBFS on kfreebsd-i386: t/op/threads failed

Dominic Hargreaves dom at earth.li
Sun Jun 10 22:18:35 UTC 2012


On Sat, Sep 10, 2011 at 09:41:38PM +0300, Niko Tyni wrote:
> On Mon, Aug 08, 2011 at 12:36:22PM +0200, Petr Salinger wrote:
> > >perl -Mthreads -e 'threads->create(sub {})->detach; fork'
> > >
> > >which crashes non-deterministically about half the time for me.
> 
> > The problem might be in usage of "pthread_atfork(lock, unlock, unlock)".
> 
> [...]
> 
> > It should suffice to add into util.c
> 
> > Perl_atfork_reinit(void)
> 
> > and
> 
> > --- miniperlmain.c
> > +++ miniperlmain.c
> > @@ -101,7 +101,7 @@
> >       * --GSAR 2001-07-20 */
> >      PTHREAD_ATFORK(Perl_atfork_lock,
> >                     Perl_atfork_unlock,
> > -                   Perl_atfork_unlock);
> > +                   Perl_atfork_reinit);
> >  #endif
> 
> Thanks, and sorry for the delay!
> 
> I finally found the time to try this out, but unfortunately it does
> not seem to fix the problem.  Even the crash trace looks the same.
> (I did check that Perl_atfork_reinit() actually gets run.)
> 
> I'm attaching the full patch I used based on the above. Most of it is
> generated by regen.pl in the source top level directory after editing
> embed.fnc.
> 
> Running 'debian/rules perl.debug' after applying this should be enough to
> do a test build. Alternatively, I'm happy to try out other suggestions,
> hopefully with a shorter turnaround time than with this one :)

The test case:

perl -Mthreads -e 'threads->create(sub {})->detach; fork'

ran 10,000 times without crashing on my kfreeBSD KVM (SMP) VM, using
5.14.2-11 and up-to-date sid from today.

Can you reproduce this? If so, perhaps the problem has been solved
by some change in kFreeBSD.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)






More information about the Perl-maintainers mailing list