-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
runc clone binary mount too slow boot shim boot timeout,then runc.XXXXXX residual #3885
Comments
Is there a repro? |
It's easy to repro.I modified the try_bindfd function, add sleep(2000) between "/proc/self/exe" mount to runc.XXXXXX and try_bindfd return. docker will return timeout and runc.XXXXXX will residual. ret = -EPERM;
if (mount("/proc/self/exe", template, "", MS_BIND, "") < 0)
goto out;
sleep(2000);
if (mount("", template, "", MS_REMOUNT | MS_BIND | MS_RDONLY, "") < 0)
goto out_umount;
/* Get read-only handle that we're sure can't be made read-write. */
ret = open(template, O_PATH | O_CLOEXEC);
|
I mean ... I don't really know what we can do here -- presumably containerd is doing a For what it's worth, I am working on a kernel patch that will eliminate the need for this userspace protection entirely, and I plan to remove bindfd in the next minor runc version (switching to always use memfds). EDIT: Yeah, containerd is |
ok,if always use memfds might solve this problem |
Description
docker starts or execs a container, runc starts the init process and needs to copy the runc binary to the temporary file runc.XXXXXX.During this period, if the mount operation is too slow and the shim startup times out and fails to return, the runc.XXXXXX file will not be deleted and remain
Steps to reproduce the issue
Describe the results you received and expected
container exit and no runc.XXXXXX file residual
What version of runc are you using?
[root@localhost ~]# runc --version
runc version 1.1.3
commit: d2cbb1a3afab8170d4942fc0be8d0275cb11642c
spec: 1.0.2-dev
go: go1.17.3
libseccomp: 2.5.3
Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: