-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
session leaked due to missed inotify of cgroup becoming empty #20198
Comments
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Jul 12, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
Might be related to #20136 |
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Jul 12, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Jul 14, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Jul 14, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Jul 23, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Aug 4, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
ddstreet
pushed a commit
to ddstreet/systemd
that referenced
this issue
Aug 5, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198
codepeon
pushed a commit
to codepeon/systemd
that referenced
this issue
Aug 30, 2021
While reexec/reload, we drop the inotify watch on cgroup file(s), so we need to re-check them in case they changed and we missed the event. Fixes: systemd#20198 (cherry picked from commit 869f52f)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
To reproduce, the last process in a session's cgroup needs to exit while pid1 is performing a reexec or reload, during the period between removing its inotify watch on the 'cgroup.events' file, and adding the inotify watch again after the reexec/reload.
One way is to create a large number of sessions and then perform reloads while those sessions exit:
many (but not all) sessions will have 'leaked'. Checking if the session cgroups are empty show they are:
Simply writing to them will bump their mtime and generate the missed inotify event, causing systemd to clear them all out:
The text was updated successfully, but these errors were encountered: