Re: Bug#628493: perl: FTBFS on kfreebsd-i386: t/op/threads failed
- To: Niko Tyni <ntyni@debian.org>, 628493@bugs.debian.org
- Cc: debian-bsd@lists.debian.org
- Subject: Re: Bug#628493: perl: FTBFS on kfreebsd-i386: t/op/threads failed
- From: Dominic Hargreaves <dom@earth.li>
- Date: Sun, 10 Jun 2012 23:18:35 +0100
- Message-id: <[🔎] 20120610221835.GD5397@urchin.earth.li>
- In-reply-to: <20110910184138.GA15125@madeleine.local.invalid>
- References: <20110529150148.GD5263@urchin.earth.li> <20110802133138.GA10651@madeleine.local.invalid> <20110804084827.GA21961@madeleine.local.invalid> <alpine.LRH.2.02.1108081011530.10288@sci.felk.cvut.cz> <20110910184138.GA15125@madeleine.local.invalid>
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)
Reply to: