Skip to content
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

cgroup: avoid using pid for cgroup name #91

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

Snaipe
Copy link
Member

@Snaipe Snaipe commented Jan 23, 2024

This commit eliminates all issues around pid reuse in the cgroup name.

Normally, the native cgroup cleaner (or systemd) would be responsible for garbage-collecting the cgroup of a previous bst invocation, but if we burn enough PIDs fast enough, it's also entirely possible for a new bst to start while the cleaner of an older invocation is busy cleaning up the old cgroup.

To fix the problem, we use a random 128-bit identifier instead of the pid in the name of the cgroup.

This commit eliminates all issues around pid reuse in the cgroup name.

Normally, the native cgroup cleaner (or systemd) would be responsible
for garbage-collecting the cgroup of a previous bst invocation, but if
we burn enough PIDs fast enough, it's also entirely possible for a new
bst to start while the cleaner of an older invocation is busy cleaning
up the old cgroup.

To fix the problem, we use a random 128-bit identifier instead of the
pid in the name of the cgroup.
@yabberyabber yabberyabber merged commit e352189 into aristanetworks:main Jan 23, 2024
3 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.

2 participants