Skip to content

Fix OOM detection on cgroup v2#581

Merged
jnovy merged 1 commit intocontainers:mainfrom
jnovy:426
Sep 1, 2025
Merged

Fix OOM detection on cgroup v2#581
jnovy merged 1 commit intocontainers:mainfrom
jnovy:426

Conversation

@jnovy
Copy link
Collaborator

@jnovy jnovy commented Sep 1, 2025

  • Use separate counters for oom and oom_kill events
  • Handle race condition when systemd removes cgroup
  • Prevent buffer corruption in getline() usage
  • Add comprehensive test coverage

Fixes: #426

@jnovy
Copy link
Collaborator Author

jnovy commented Sep 1, 2025

@kolyshkin PTAL

- Use separate counters for oom and oom_kill events
- Handle race condition when systemd removes cgroup
- Prevent buffer corruption in getline() usage
- Add comprehensive test coverage

Fixes: containers#426

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@jnovy jnovy merged commit 480c811 into containers:main Sep 1, 2025
34 checks passed
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.

OOM detection on cgroup v2 not always working

2 participants