Bug 279226

Summary: sort(1) can deadlock with poorly timed signal
Product: Base System Reporter: Kyle Evans <kevans>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

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.