bugfix: handle duplicate exit events via task status#52156
Merged
cpuguy83 merged 1 commit intomoby:masterfrom Mar 10, 2026
Merged
bugfix: handle duplicate exit events via task status#52156cpuguy83 merged 1 commit intomoby:masterfrom
cpuguy83 merged 1 commit intomoby:masterfrom
Conversation
Contributor
Author
|
Thanks for the fix! It looks correct to me. |
cpuguy83
reviewed
Mar 9, 2026
| return false | ||
| } | ||
|
|
||
| ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) |
Replace timestamp-based duplicate exit detection for running containers with a live containerd task status check, and ignore exits only when the task is still `Running`. Also simplify restarting-state handling by always treating exit events as duplicates while restart processing is in progress, and add warning logs for task status lookups. This avoids relying on wall-clock timestamps that can move backward (e.g., NTP), which could misclassify duplicate exit events. Signed-off-by: Wei Fu <[email protected]>
cpuguy83
approved these changes
Mar 9, 2026
Contributor
Author
|
the test case failed but it seems it's not related to my change. |
dmcgowan
approved these changes
Mar 9, 2026
Contributor
Author
|
Is it ready to get merged? :) |
corhere
approved these changes
Mar 10, 2026
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.
- What I did
Fixes: #52153
- How I did it
Replace timestamp-based duplicate exit detection for running containers with a live containerd task status check, and ignore exits only when the task is still
Running.Also simplify restarting-state handling by always treating exit events as duplicates while restart processing is in progress, and add warning logs for task status lookups.
This avoids relying on wall-clock timestamps that can move backward (e.g., NTP), which could misclassify duplicate exit events.
- How to verify it
Manually run container and force containerd-shim to publish duplicated events
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)