Skip to content

LinuxContainer.stop() fails on empty threaded child cgroups in 0.53.0 - #991

Open
StefanPrintezis wants to merge 2 commits into
apple:mainfrom
StefanPrintezis:fix/threaded-cgroup-cleanup
Open

StefanPrintezis wants to merge 2 commits into
apple:mainfrom
StefanPrintezis:fix/threaded-cgroup-cleanup

Conversation

@StefanPrintezis

Copy link
Copy Markdown

Summary

The VM stops, but LinuxContainer.stop() throws EOPNOTSUPP and leaves the container object errored. The severity or effect on the consuming application depends on how it handles that failure.

Cause

Normal cleanup calls delete(force: true). The initial kill at the container’s domain cgroup covers the whole subtree, but recursive cleanup kills each child again.

Linux supports threaded cgroups, but rejects writing directly to their cgroup.kill files with EOPNOTSUPP. Cleanup therefore fails on a valid cgroup layout.

Fix

Remove the redundant per-child kills. Keep the initial subtree kill, directory-removal error handling and existing removal retries.

Reproduction

Run make reproduce or just read the small repro i made here:
https://github.com/StefanPrintezis/apple-containerization-threaded-cgroup-repro

child kills that fail with EOPNOTSUPP on threaded cgroups.

Keep the root kill, recursive directory removal, and existing error handling.

This branch has not been deployed

No deployments
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