Page MenuHomeFreeBSD

don't stop in issignal() if P_SINGLE_EXIT is set
ClosedPublic

Authored by badger on Mar 5 2017, 1:57 AM.
Tags
None
Referenced Files
F80186039: D9890.diff
Thu, Mar 28, 11:01 PM
Unknown Object (File)
Tue, Mar 19, 4:13 AM
Unknown Object (File)
Tue, Mar 19, 2:59 AM
Unknown Object (File)
Jan 15 2024, 6:24 PM
Unknown Object (File)
Dec 20 2023, 12:53 AM
Unknown Object (File)
Dec 18 2023, 4:20 AM
Unknown Object (File)
Nov 25 2023, 4:37 AM
Unknown Object (File)
Nov 24 2023, 4:09 AM
Subscribers

Details

Summary

Suppose a traced process is stopped in ptracestop() due to receipt of a
SIGSTOP signal, and is awaiting orders from the tracing process on how
to handle the signal. Before sending any such orders, the tracing
process exits. This should kill the traced process. But suppose a second
thread handles the SIGKILL and proceeds to exit1(), calling
thread_single(). The first thread will now awaken and will have a chance
to check once more if it should go to sleep due to the SIGSTOP. It must
not sleep after P_SINGLE_EXIT has been set; this would prevent the
SIGKILL from taking effect, leaving a stopped orphan behind after the
tracing process dies.

Also add new tests for this condition.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7903
Build 8043: arc lint + arc unit

Event Timeline

badger retitled this revision from to don't stop in issignal() if P_SINGLE_EXIT is set.
badger updated this object.
badger edited the test plan for this revision. (Show Details)
badger added a reviewer: kib.
kib edited edge metadata.
This revision is now accepted and ready to land.Mar 5 2017, 11:26 AM
This revision was automatically updated to reflect the committed changes.