Skip to content

shim: use goroutine to prevent event lost - #13543

Closed
ningmingxiao wants to merge 1 commit into
containerd:mainfrom
ningmingxiao:optimize_reap
Closed

ningmingxiao wants to merge 1 commit into
containerd:mainfrom
ningmingxiao:optimize_reap

Conversation

@ningmingxiao

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 06:32
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR makes SIGCHLD reaping notifications asynchronous and adds logging when notifying subscribers exceeds a 1-second timeout.

Changes:

  • Run exit notifications in a goroutine instead of blocking inside Reap().
  • Add a warning log when a notify doesn’t complete within 1 second.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/sys/reaper/reaper_unix.go Resolved
Comment thread pkg/sys/reaper/reaper_unix.go Outdated
Comment on lines +69 to +72
now := time.Now()
for _, e := range exits {
done := Default.notify(runc.Exit{
Timestamp: now,
Comment thread pkg/sys/reaper/reaper_unix.go Outdated
select {
case <-done:
case <-time.After(1 * time.Second):
log.L.Warnf("event with pid %d status:%d may may be lost", e.Pid, e.Status)
Comment thread pkg/sys/reaper/reaper_unix.go Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants