Repository navigation
Commit 2065ac7
committed
fix(sandbox): defer freeze descendant scans off the supervisor lock
transport_disconnected froze the workload while holding the
supervisor_connection mutex, and the freeze signaled every descendant
through up to four synchronous /proc scans, so losing the supervisor
stalled a runtime worker and the lock for as long as the scans took,
which grows with the number of processes in the sandbox.
Freeze and resume now stop and continue the registered root groups
synchronously, so a confirmed recovery still implies the roots were
continued, and defer the descendant sweeps to a dedicated thread: the
shared blocking pool can be fully occupied, and a sweep queued behind
it would leave detached children running while the boundary reports
itself frozen. If thread creation itself fails, the sweep runs
synchronously rather than leave the freeze unenforced. Each sweep
collects the owned set without holding any lock and applies the
signal under a signal mutex only while the transition generation it
captured is still current, so a stale deferred SIGSTOP can never land
after a resume SIGCONT. A sweep that fails to deliver reports the gap
as an OCSF process activity naming the recovery.
The scans now run under neither supervisor_connection nor the signal
mutex; a transition that immediately follows another waits at most one
signal application, never a scan.
Closes #5184
Signed-off-by: Emilien Macchi <emacchi@redhat.com>1 parent 6c7d0a7 commit 2065ac7
2 files changed
Lines changed: 1527 additions & 61 deletions
0 commit comments