-
Notifications
You must be signed in to change notification settings - Fork 2.2k
umount all mount points in runc root dir #2843
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
Conversation
Signed-off-by: lifubang <[email protected]>
02be7e8
to
e76087a
Compare
You are talking about the What you propose is a workaround. I'd rather understand and fix the actual bug instead. |
@lifubang do you have a repro? Have you checked that there's no other runc processes running for this container? I stared at the code and can't think of any scenarios (except, obviously, for kernel bugs) in which this mount would be left mounted. |
Interesting, I just caught the same bug in CI (CentOS 7, from https://github.com/opencontainers/runc/pull/2848/checks?check_run_id=2089879609):
(the "cannot use unified on cgroup v1" error is expected) |
|
OK this happens because the child (runc init) is killed in the middle of setting up /proc/self/exe bindmount. |
...and we haven't seen it before because before #2812 the process was killed a tad earlier. I love those bugs that are exposed by adding a line of code here or there, disturbing the precise timing of events that resulted in things happened to work 😆 |
Sometimes,
umount
withMNT_DETACH
flag can't work in a small probability.So, maybe we should unmount all mount points in runc root dir when we remove this dir.
Signed-off-by: lifubang [email protected]