libpod: report cgroups deleted during Stat() call #24400

https://github.com/containers/podman/pull/24400

Merged libpod: report cgroups deleted during Stat() call #24400 openshift-merge-bot merged 1 commit into containers:main from giuseppe:fix-race-reading-cgroup-stats on Oct 29, 2024 +6 −0 Conversation 5 Commits 1 Checks 0 Files changed 1 Conversation @giuseppe Member giuseppe commented on Oct 29, 2024 The cgroup.Stat() operation is not atomic, so it’s possible that the cgroup is removed during the Stat() call. Catch specific errors that can occur when the cgroup is missing and validate the existence of the cgroup path. If the cgroup is not found, return a more specific error indicating that the container has been removed.

Closes: #23789

Does this PR introduce a user-facing change? None @giuseppe giuseppe added the No New Tests label on Oct 29, 2024 @openshift-ci openshift-ci bot added release-note-none approved labels on Oct 29, 2024 @giuseppe giuseppe mentioned this pull request on Oct 29, 2024 race? Failed to retrieve cgroup stats: open …/user.slice/sha.scope/memory.stats and pids.current: ENOENT #23789 Closed Luap99 Luap99 reviewed on Oct 29, 2024 libpod/stats_linux.go Outdated @giuseppe libpod: report cgroups deleted during Stat() call 1f44d0f @giuseppe giuseppe force-pushed the fix-race-reading-cgroup-stats branch from c93c6bb to 1f44d0f last year Luap99 Luap99 approved these changes on Oct 29, 2024 Member Luap99 left a comment LGTM

@openshift-ci Contributor openshift-ci bot commented on Oct 29, 2024 [APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details @baude Member baude commented on Oct 29, 2024 /lgtm

@openshift-ci openshift-ci bot assigned baude on Oct 29, 2024 @openshift-ci openshift-ci bot added the lgtm label on Oct 29, 2024 @openshift-merge-bot openshift-merge-bot bot merged commit 364761f into containers:main on Oct 29, 2024 @stale-locking-app stale-locking-app bot added the locked - please file new issue/PR label on Jan 28 @stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators on Jan 28 Merge info Pull request successfully merged and closed You’re all set — the branch has been merged.

Updated: