Bug 771228

Summary: POSIX::pause() and POSIX::sigsuspend() race with safe signals
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perlAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: cweyl, iarnell, kasal, lkundrak, mmaslano, ppisar, psabata, rc040203, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://rt.perl.org/rt3//Public/Bug/Display.html?id=107216
Whiteboard:
Fixed In Version: perl-5.14.2-195.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-23 02:23:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Upstream fix ported to 5.14.2 none

Description Petr Pisar 2012-01-02 17:05:15 UTC
As reported to upstream <https://rt.perl.org/rt3//Public/Bug/Display.html?id=107216>, POSIX module functions pause() and sigsuspend() do not deliver Perl safe signals just after returning from kernel. This can create race in delivering signals.

This is fixed by commit:

commit 20120e59a6c5263ac45ce593c462604c5b9d9b09
Author: Leon Timmermans <fawaka>
Date:   Mon Dec 26 19:06:54 2011 +0200

    Signal handlers must run before sigsuspend returns

    The whole point of sigsuspend and pause is to wait until a signal has
    arrived, and then return *after* it has been triggered. Currently
    delayed/"safe" signals prevent that from happening, which might cause
    race conditions.
    
    This patch prevents that (as far as possible) by running the signal
    handlers ASAP.

Perl 5.14.2 and probably older ones are affected.

Comment 1 Petr Pisar 2012-02-06 13:42:46 UTC
Created attachment 559634 [details]
Upstream fix ported to 5.14.2

Comment 2 Petr Pisar 2012-02-06 16:16:04 UTC
Fixed as perl-5.14.2-211.fc17 in F17.

Comment 3 Fedora Update System 2012-02-07 16:47:35 UTC
perl-5.14.2-195.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-5.14.2-195.fc16

Comment 4 Fedora Update System 2012-02-07 17:27:01 UTC
perl-5.12.4-165.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-5.12.4-165.fc15

Comment 5 Fedora Update System 2012-02-08 02:26:10 UTC
Package perl-5.14.2-195.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-195.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1429/perl-5.14.2-195.fc16
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-02-23 02:23:02 UTC
perl-5.12.4-165.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-02-23 02:24:58 UTC
perl-5.14.2-195.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.