unprotected check ... clear race on caught signals count in nih_signal_poll() may cause deadlocks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libnih |
Triaged
|
Medium
|
Unassigned | ||
libnih (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Ubuntu lucid
libnih 1.0.1-1
nih_signal_
However, a signal can arrive after nih_signal_poll() decides not to run the handler (because signals_
The signal pipe will have been written, which does ensure that nih_main_loop() is guaranteed to wake up again on the next round, but because signals_
The attached patch may serve as a workaround, but it's not been extensively tested.
I know of no real-world deadlock caused by this bug, but I spotted it when investigating a separate deadlock issue.
This bug was found while investigating the following issue, but is probably not directly related:
* https:/
description: | updated |
description: | updated |
Changed in libnih: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Yeah, I've known about this race for ages; it's the reason for the "switch to signalfd()" TODO item. I actually have a fair rewrite of the libnih core code to switch to epoll(), timerfd, signalfd, etc. all pending - just haven't had time to sit down and merge it all in yet.
(And this bug doesn't affect Upstart in any important way, so hasn't got priority :p)