Repository navigation
core/runtime/v2: add timeout to shim.delete during loadShims - #13852
Closed
HarshalPatel1972 wants to merge 2 commits into
Closed
HarshalPatel1972 wants to merge 2 commits into
HarshalPatel1972 wants to merge 2 commits into
Conversation
Fixes containerd#13848 When loadShims cleans up abandoned shims during daemon startup, it calls shim.delete() with the daemon's startup context, which lacks a deadline. If a single leftover shim process never replies to the Delete gRPC request, containerd hangs forever on startup. This wraps the context with the existing cleanupTimeout (5s) to ensure the daemon can recover and continue starting even if a shim is wedged. Signed-off-by: Harshal Patel <[email protected]>
HarshalPatel1972
force-pushed
the
fix-loadshims-hang
branch
from
July 25, 2026 19:40
d1b5f24 to
6f33a01
Compare
Signed-off-by: Harshal Patel <[email protected]>
HarshalPatel1972
force-pushed
the
fix-loadshims-hang
branch
from
July 29, 2026 19:44
b30d437 to
5c8ec1e
Compare
Member
|
Hi @HarshalPatel1972 , I was actually looking at a similar issue with loading a wedged / leaked shim preventing containerd startup in my use case. I authored #13954 and added you as a co-author since we were circling the same issue in my opinion. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
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.
Fixes #13848
when loadShims cleans up abandoned shims during daemon startup, it calls shim.delete() using the daemon's startup context. this context doesn't have a deadline.
if a single leftover shim process never replies to the Delete grpc request (like what happens in #13848), containerd just hangs forever on startup.
this wraps the context with the existing cleanupTimeout (5s) before deleting the shim, ensuring the daemon can recover and continue starting even if a shim is wedged.