Skip to content

fix: ignore vanished cgroup create events - #3933

Open
joejulian wants to merge 1 commit into
google:masterfrom
joejulian:fix/ignore-disappeared-cgroup-watch
Open

fix: ignore vanished cgroup create events#3933
joejulian wants to merge 1 commit into
google:masterfrom
joejulian:fix/ignore-disappeared-cgroup-watch

Conversation

@joejulian

Copy link
Copy Markdown
Contributor

Root cause

The raw watcher can receive a directory-create event after a short-lived cgroup has already been removed. watchDirectory then returns ENOENT, which currently propagates even though that create/remove ordering is expected.

Change

Only the dynamic ContainerAdd path treats os.IsNotExist returned by watchDirectory as this race and returns without emitting a container event. Every other watch or read error remains unchanged.

Tests

  • Covers a cgroup directory disappearing before its create event is processed.
  • Verifies that a non-ENOENT error (ENOTDIR) is still returned.

Related historical context: #3464. This narrowly addresses the disappeared-directory create-event race and does not claim to resolve every symptom discussed there.

Validation

  • Focused race-enabled tests
  • 43-package lib suite
  • Canonical make test
  • Repository-root go vet
  • Exact golangci-lint v2.6.2
  • Boilerplate, gofmt, and diff checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant