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

Niko Tyni ntyni at debian.org
Sat Sep 10 18:41:38 UTC 2011


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 :)

Thanks again,
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Reinit-mutex-after-a-fork.patch
Type: text/x-diff
Size: 3234 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20110910/f0d4042d/attachment.patch>


More information about the Perl-maintainers mailing list