Bug 695656
Summary: | possible race condition when using trap, signal is lost | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Stancek <jstancek> | |
Component: | bash | Assignee: | Roman Rakus <rrakus> | |
Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | |
Severity: | low | Docs Contact: | ||
Priority: | low | |||
Version: | 6.1 | CC: | lizf, mkyral, prc, tsmetana | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | bash-4.1.2-12.el6 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1025764 (view as bug list) | Environment: | ||
Last Closed: | 2013-02-21 08:07:24 UTC | Type: | --- | |
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: | 1025764 |
Description
Jan Stancek
2011-04-12 10:40:31 UTC
Thanks for the report. Looks like the bug in re-setting signal handler. I will investigate it deeper. For some reason bash set signal to be ignored before it set it to be handled and you hit the situation when it is ignored. Answer from upstream: http://www.mail-archive.com/bug-bash@gnu.org/msg09078.html So it won't be changed. And I think it's not good set up trap many times if you can set it once at start. Is there any reason to set up trap in every loop run? Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. As for the cgroups tests in question
(./testcases/kernel/controllers/cgroup/test_*.sh), I don't see any reason to
keep it in loop. I'll CC author of the test.
Theoretically, you might want to change trap to use different handlers. Say you
want to handle signals coming at odd seconds with different handler than
signals coming at even seconds. One way would be to modify trap by switching
between 2 handlers.
> So it won't be changed. And I think it's not good set up trap many times
Sounds like a remark which could be added to man page.
(In reply to comment #5) > As for the cgroups tests in question > (./testcases/kernel/controllers/cgroup/test_*.sh), I don't see any reason to > keep it in loop. I'll CC author of the test. > > Theoretically, you might want to change trap to use different handlers. Say you > want to handle signals coming at odd seconds with different handler than > signals coming at even seconds. One way would be to modify trap by switching > between 2 handlers. Or one handler which will check the seconds? > > > So it won't be changed. And I think it's not good set up trap many times > Sounds like a remark which could be added to man page. Yes. It could be documented. The possible solution is to block the signal while the trap string and handler are being modified. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative. Fixed in bash-4.1.2-12.el6 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. http://rhn.redhat.com/errata/RHBA-2013-0306.html |