umount all mount points in runc root dir#2843
Conversation
Signed-off-by: lifubang <lifubang@acmcoder.com>
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,
umountwithMNT_DETACHflag 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 lifubang@acmcoder.com