fix(lifecycle): tolerate NotFound from Kill when process exits naturally - #9
Merged
dmcgowan merged 1 commit intoJul 28, 2026
Conversation
austinvazquez
force-pushed
the
fix/lifecycle-kill-not-found
branch
2 times, most recently
from
July 28, 2026 02:22
eab9df5 to
11728a9
Compare
dmcgowan
approved these changes
Jul 28, 2026
The Lifecycle test verifies a container's full create/start/kill/wait/delete
cycle. After the container prints its expected output, the test sends SIGKILL
to clean up. On fast runners (especially macOS arm64), the init process may
exit before the Kill RPC arrives, causing the shim to return NotFound ("process
already finished"). The test was treating that as a hard failure.
NotFound from Kill means the process is already in a terminal state — there is
nothing to kill and the remaining Wait/Delete/Shutdown sequence still works
correctly. Treat it as a benign race and continue rather than failing the test.
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
dmcgowan
force-pushed
the
fix/lifecycle-kill-not-found
branch
from
July 28, 2026 03:58
11728a9 to
a4c9d3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Lifecycleconformance test drives a container throughcreate → start → state → kill → wait → delete → shutdown and verifies
it prints expected output. After the container produces its output the
test calls
Kill(SIGKILL)to clean up.On fast runners (observed on macOS arm64 CI) the init process can exit
before the Kill RPC arrives. The shim correctly returns
NotFound / process already finished, but the test was treating anynon-nil error from
Killas a hardt.Fatal, causing a spuriousfailure even though the container had completed its work successfully.
NotFoundfromKillmeans the process is already in a terminal state— there is nothing to kill and the remaining
Wait/Delete/Shutdownsequence still works correctly. This is a benign race, not a shim bug.
Changes
NotFoundfromKillintestLifecycleusingerrgrpc.ToNative+errdefs.IsNotFound(both packages are alreadydirect dependencies).
Test plan
macos-arm64 (the platform where this race was observed).