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

executor: detect cgroup leaks #5382

Open
dvyukov opened this issue Oct 10, 2024 · 0 comments
Open

executor: detect cgroup leaks #5382

dvyukov opened this issue Oct 10, 2024 · 0 comments

Comments

@dvyukov
Copy link
Collaborator

dvyukov commented Oct 10, 2024

It's very easy to forget to uncharge a memory cgroup, as the result it will leaks and lead to memory leak.
It's hard/impossible to catch missing uncharges red handed. Instead we could try to check total number of cgroups in /proc/cgroups and catch leaked cgroups.
Unclear if it's feasible to do a normal non-snapshot mode. We would need to stop all test processes, wait for them, do full cleanup (including removing root cgroups), and then do the checking.
Maybe it's easier to do from time to time (e.g. during smash) in snapshot mode only.

Other cgroup types can be checked in a similar way.
Question: are there other resource types that can be checked for leaks in a similar way? (namely: in shapshot mode: kill/wait test process, do all possible cleanup, check that resource usage drops to the before-the-test level).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant