Bug 279226 - sort(1) can deadlock with poorly timed signal
Summary: sort(1) can deadlock with poorly timed signal
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 17:35 UTC by Kyle Evans
Modified: 2024-05-23 15:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2024-05-22 17:35:13 UTC
sort(1) has a semapahore to protect the tmp file list, and it catches numerous signals to trigger tmp cleanup before bailing out.  If we receive a signal while tmp_files_sem is held, we can easily deadlock sort(1) as the signal handler tries to take it again.