Repository navigation
Conversation
This simplifies debugging a lot. i.e. now you can see this
error if you hit it:
start-kubelet-containerd.sh[3601505]: {"error":" unable to get all container pids: readdirent /sys/fs/cgroup/kubepods.slice/kubepods-pod0be77e0a_037c_4209_b3cd_7d0cc20b4b57.slice/cri-containerd-c83c746184c42fbeb6fdd60f3679d068d9fde6692f8cf555394e7cabda90c54c.scope/churn.13.52: no such file or directory\n","id":"c83c746184c42fbeb6fdd60f3679d068d9fde6692f8cf555394e7cabda90c54c","level":"info","msg":"cleaning leaked shim process","namespace":"k8s.io","time":"2026-07-13T22:01:41.816709962Z"}
Link: containerd#13784
Signed-off-by: Andrew Halaney <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Improves debuggability of shim loading by including the PID query error in the “cleaning leaked shim process” log line, helping diagnose cases where shim cleanup is triggered due to shim.Pids() failures (as described in issue #13784).
Changes:
- Attach
pidErrto the “cleaning leaked shim process” log entry inShimManager.loadShim.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pInfo, pidErr := shim.Pids(ctx) | ||
| if sgetErr != nil && errors.Is(sgetErr, errdefs.ErrNotFound) && (len(pInfo) == 0 || errors.Is(pidErr, errdefs.ErrNotFound)) { | ||
| log.G(ctx).WithField("id", id).Info("cleaning leaked shim process") | ||
| log.G(ctx).WithField("id", id).WithError(pidErr).Info("cleaning leaked shim process") |
Member
There was a problem hiding this comment.
+1 to copilot's findings here. I would only want to log WithError if we guarantee that pidErr is non-nil
Member
|
It looks like this PR is a subset of #13790. Can we close this one and tackle the fix in the latter PR? |
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.
This simplifies debugging a lot. i.e. now you can see this error if you hit it:
Link: #13784