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
docker exec can't get detail messages if runc init exited abnormally #4083
Comments
Seems like a Docker/containerd issue? runc outputs the error to stderr, it's up to Docker to format it as necessary. I suspect the issue is that our logs go to stdout but panics go to stderr, so containerd/docker only care about stdout. |
containerd-shim will read error log from run log.json(now just read "unable to start container process: read init-p: connection reset by peer" ), so I think it is necessary to save it into runc log.json, but I can't find any way to save it into log.json. |
One of the issues here is
In my tests, this happens frequent but not every time. I thought we worked around that by using Meaning, go runtime wants a new OS thread when we're already in the container cgroup (and are thus limited by the container's pids limit). From the cursory look I can't see where it may happen. ... or maybe I do. golang/go#24484 mentions that go runtime may need a new OS thread when doing a call to C function via cgo. This might be it:
|
if use the runc main branch ,docker exec will show error detail. |
Description
docker exec can't get detail messages
I try to print detail log at process_linux.go but it doesn't work.
Steps to reproduce the issue
1.docker run --pids-limit=10 --name test -d centos sleep 100000
2 .docker exec -it test bash
run follow command
3.open another terminal
docker exec test
4.use runc exec
runc exec will show runtime/cgo: pthread_create failed: Resource temporarily unavailable,we can know
Insufficient pid resources. but dockerd logs doesn't contain these logs
Describe the results you received and expected
show detail message
What version of runc are you using?
[root@host-226 ~]# runc -v
runc version 1.1.9
commit: v1.1.9-0-gccaecfc
spec: 1.0.2-dev
go: go1.20.7
libseccomp: 2.5.1
Host OS information
centos7
Host kernel information
5.10
The text was updated successfully, but these errors were encountered: