Bug 2177235
| Summary: | glibc: system() erroneously block SIGCHLD forever when called concurrently | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Arjun Shankar <ashankar> |
| Component: | glibc | Assignee: | Florian Weimer <fweimer> |
| Status: | CLOSED ERRATA | QA Contact: | Sergey Kolosov <skolosov> |
| Severity: | unspecified | Docs Contact: | Jacob Taylor Valdez <jvaldez> |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | ashankar, ayi, codonell, cperl, dj, fweimer, glibc-bugzilla, jvaldez, markobri, pfrankli, qe-baseos-tools-bugs, sipoyare, skolosov |
| Target Milestone: | rc | Keywords: | Bugfix, Patch, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | glibc-2.34-67.el9 | Doc Type: | Bug Fix |
| Doc Text: |
.The `glibc` `system()` function now restores the previous signal mask unconditionally
Previously, if the `glibc` `system()` function was called concurrently from multiple threads, the signal mask for the `SIGCHLD` signal might not be restored correctly. As a consequence, the `SIGCHLD` signal remained blocked after the return from the `glibc` `system()` function on some threads.
With this update, the `glibc` `system()` function now restores the previous signal mask unconditionally, even when parallel `system()` function calls are running. As a result, the `SIGCHLD` signal is no longer incorrectly blocked if the `glibc` `system()` function is called concurrently from multiple threads.
|
Story Points: | --- |
| Clone Of: | 2176707 | Environment: | |
| Last Closed: | 2023-11-07 08:37:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2176707, 2188641 | ||
|
Description
Arjun Shankar
2023-03-10 14:17:32 UTC
Upstream fix:
commit 436a604b7dc741fc76b5a6704c6cd8bb178518e7
Author: Adam Yi <ayi>
Date: Tue Mar 7 07:30:02 2023 -0500
posix: Fix system blocks SIGCHLD erroneously [BZ #30163]
Fix bug that SIGCHLD is erroneously blocked forever in the following
scenario:
1. Thread A calls system but hasn't returned yet
2. Thread B calls another system but returns
SIGCHLD would be blocked forever in thread B after its system() returns,
even after the system() in thread A returns.
Although POSIX does not require, glibc system implementation aims to be
thread and cancellation safe. This bug was introduced in
5fb7fc96350575c9adb1316833e48ca11553be49 when we moved reverting signal
mask to happen when the last concurrently running system returns,
despite that signal mask is per thread. This commit reverts this logic
and adds a test.
Signed-off-by: Adam Yi <ayi>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella>
setting r_d_t Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (glibc bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:6582 |