Bug 1291782
Summary: | deadlock when receiving SIGCHILD during free | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Paulo Andrade <pandrade> | |
Component: | zsh | Assignee: | Kamil Dudka <kdudka> | |
Status: | CLOSED ERRATA | QA Contact: | Jan Kepler <jkejda> | |
Severity: | high | Docs Contact: | Maxim Svistunov <msvistun> | |
Priority: | urgent | |||
Version: | 7.1 | CC: | fkrska, isenfeld, jkejda, kdudka, ovasik, zpytela | |
Target Milestone: | rc | Keywords: | Patch, ZStream | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | zsh-5.0.2-17.el7 | Doc Type: | Bug Fix | |
Doc Text: |
*zsh* no longer hangs when receiving a signal while processing a job exit
Previously, signal handlers were enabled while processing a job exit in *zsh*. Consequently, if a signal was received while using the memory allocator and its handler attempted to allocate or free memory, the *zsh* process ended up in a deadlock and became unresponsive. With this update, signal handlers are no longer enabled while processing a job exit. Instead, signals are queued for delayed execution of the signal handlers. As a result, the deadlock no longer occurs and *zsh* no longer hangs.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1337913 (view as bug list) | Environment: | ||
Last Closed: | 2016-11-03 23:02: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: | 1203710, 1295829, 1313485, 1337913 |
Description
Paulo Andrade
2015-12-15 15:19:25 UTC
I believe this could fixed by the following upstream commit: http://sourceforge.net/p/zsh/code/ci/93ca77f8 (In reply to Paulo Andrade from comment #0) > I believe a pseudo patch would be: > > Src/mem.c: > [...] > mod_export void > zfree(void *p, UNUSED(int sz)) > { > if (p) > + { > + queue_signals(); > free(p); > + unqueue_signals(); > + } > } Upstream discourages from wrapping [z]free() by signal queuing globally because it could hide unprotected accesses to global state and result in wrong behavior, which is actually worse (and more difficult to debug) than a deadlock. 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, 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://rhn.redhat.com/errata/RHBA-2016-2152.html |