Commit 902bfc1
test(recovery): reap detached tree in live_process/dead_process too
Repeated/root verification of the prior fix surfaced two more recovery tests
that leak the same detached inner tree (2 procs each, every run):
- recovery_with_live_process cleans up via production remove(force=true), which
only signals the recorded outer bwrap;
- recovery_with_dead_process manually SIGKILLs the recorded outer bwrap.
Both leave the inner pid-ns bwrap + shim + VM alive (post-#851).
Arm a ShimReaper (pkill -9 -f <box id>) in both, matching the two pid-file
tests, so each reaps its whole tree on drop.
Verified as root, repeated: pid-file tests x10 -> 0 leak; full recovery suite
x3 -> 9 pass, 0 leak each. Compiles (--features krun,gvproxy); cargo fmt clean.
The underlying production leak (stop / rm -f only signal the outer bwrap, so a
detached box's inner tree survives; cgroup.kill reaps it) is a separate
runtime-side bug, handled in its own draft PR — this commit only keeps the
recovery suite from leaking.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 043f04f commit 902bfc1
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
| |||
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| |||
0 commit comments