[Bug 947444] New: PerlIO dead-locks with threaded fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=947444

            Bug ID: 947444
           Summary: PerlIO dead-locks with threaded fork
           Product: Fedora
           Version: 18
         Component: perl
          Severity: unspecified
          Priority: unspecified
          Assignee: mmaslano@xxxxxxxxxx
          Reporter: ppisar@xxxxxxxxxx
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
                CC: cweyl@xxxxxxxxxxxxxxx, iarnell@xxxxxxxxx,
                    jplesnik@xxxxxxxxxx, kasal@xxxxxx, lkundrak@xxxxx,
                    mmaslano@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx,
                    psabata@xxxxxxxxxx, rc040203@xxxxxxxxxx,
                    tcallawa@xxxxxxxxxx
          Category: ---

Created attachment 730746
  --> https://bugzilla.redhat.com/attachment.cgi?id=730746&action=edit
Test case

As reported to upstream, there is a possible dead lock when using fork from
threads and PerlIO <https://rt.perl.org/rt3/Public/Bug/Display.html?id=106212>.

This has been fixed in commit:

>From 4da80956418bbe1fdc23cad0b1cbb24cd7b87609 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrik=20H=C3=A4gglund?= <patrik.h.hagglund@xxxxxxxxxxxx>
Date: Sat, 2 Feb 2013 20:21:05 +0100
Subject: [PATCH] PATCH [perl #106212] Add PL_perlio_mutex to
 atfork_lock/unlock

Using threads + fork() on Linux, and IO operations in the threads, the
PL_perlio_mutex may be left in a locked state at the call of fork(),
potentially leading to deadlock in the child process at subsequent IO
operations. (Threads are pre-empted and not continued in the child
process after the fork.)

Therefore, ensure that the PL_perlio_mutex is unlocked in the child
process, right after fork(), by using atfork_lock/unlock.

(The RT text gives ways to reproduce the problem, but are not easily
added to Perl's test suite)


Probably all Fedoras are affected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=9NtTx6GUfV&a=cc_unsubscribe
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux