You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
heavy: tests for group-kill guard and signal-path container removal, plus hardening (from #687 reviews) #690
No test pins the guard's setsid (fork-kit/heavy/bin/heavy:379): removing it leaves all tests green, yet a kill -9 -PGID of heavy (how timeout and harnesses kill) then leaves a process and a container behind.
No test covers container removal on the signal path (bin/heavy:773: command outlives the grace time, or a second signal).
Also unpinned: the guard ignoring signals, the parent-gone refusal, kept scopes getting no guard, and the exact-label check (the fake ps already filters exactly).
Hardening (minor)
heavy docker-label prefers HEAVY_SCOPE over the process's real scope: a process that left the scope but kept the variable still gets heavy's label.
stop_scope's by-hand kill signals pids one at a time (pid reuse); writing cgroup.kill closes that gap.
A tree-kill (pkill -9 -P, npm tree-kill) also kills the guard; leftovers then wait for the sweep (a leak, not a wrong kill).
Rootless Docker reached only through docker context use counts as no Docker, silently.
The sweep accepts HEAVY_DOCKER without the absolute-path check bin/heavy has.
Every heavy run calls docker ps; with socket-activated Docker that starts a stopped daemon, and a hung daemon slows every run's end. Consider only checking when the scope labelled a container.
fork-ci-tests.txt weight for the heavy tests is ~52s; CI took 37 s.
Activity