-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idea: use CLONE_NEWCGROUP to fix racey cgroup assignment #2
Comments
The proper link would be https://go.dev/cl/417695 (and the feature should be available in Go 1.20+). Also please note this only works for cgroup v2 and requires Linux kernel >= v5.17. |
Just realized I made a typo, I meant Linux kernel >= 5.7 (released in June 2020). Also, Go 1.20 is out :) |
Thanks @kolyshkin I should have time to pull this little project off the shelf again in the next couple of weeks. And also thanks for all the work you do! |
This PR changes the exec of the task child process to belong to its own cgroup during its creation, fixing the race condition of moving the PID into the cgroup after starting. Adds new e2e test asserting the child process is launched in its own cgroup. Fixes #2
This PR changes the exec of the task child process to belong to its own cgroup during its creation, fixing the race condition of moving the PID into the cgroup after starting. Adds new e2e test asserting the child process is launched in its own cgroup. Fixes #2
This PR changes the exec of the task child process to belong to its own cgroup during its creation, fixing the race condition of moving the PID into the cgroup after starting. Adds new e2e test asserting the child process is launched in its own cgroup. Fixes #2
This PR changes the exec of the task child process to belong to its own cgroup during its creation, fixing the race condition of moving the PID into the cgroup after starting. Adds new e2e test asserting the child process is launched in its own cgroup. Fixes #2
Instead of using a supervisor like the comment suggests, we should be able to just fork/exec the subprocess into
the cgroup created for it. Looks like this will be available in an upcoming version of Go
golang/go#51246
golang/go@3204e62
The text was updated successfully, but these errors were encountered: