-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman attach does not exit when the container stops #8154
Comments
I'm not sure why it doesn't work but it seems to work if you add the |
@mheon Thoughts on this one? |
I'll take a look, see if I can reproduce |
Works fine over here. Your Dockerfile looks suspicious - you say you expect the container to exit after 10 seconds, but you have a |
Ahhh, nevermind, I see that it does reproduce when |
This is very interesting. The attach socket is completely removed, Conmon is dead, but Podman is still listening on it. |
We only use this channel in terminal attach, and it was not a buffered channel originally, so it would block on trying to send unless a receiver was ready. In the non-terminal case, there was no receiver, so attach blocked forever. Buffer the channel for a single bool so that it will never block, even if unused. Fixes containers#8154 Signed-off-by: Matthew Heon <[email protected]>
Got it - #8175 |
/kind bug
Description
When attaching to a self-quitting container (for example one with "CMD sleep 10") with
podman attach <id>
, thepodman attach
process does not exit once the container stops. This was different in the past and is unexpected. I use attach to see logs and wait for the container to finish.Steps to reproduce the issue:
podman run -d --name foo test
Describe the results you received:
podman attach
never returnsDescribe the results you expected:
podman attach
returns after approx. 10 secondsOutput of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
No
The text was updated successfully, but these errors were encountered: