You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nerdctl attach freezes the terminal sessions randomly. #4374
When attaching two terminal sessions using nerdctl attach and executing commands, the terminal randomly freezes and doesn't display the commands being entered.
Same root cause as #3570, as @apostasie suspected: a FIFO has one queue, so two sessions reading the container's stdout each get a random subset of it. Nothing is dropped, it is just handed to whichever reader asked first, which is why one terminal looks frozen while the other prints characters it never asked for.
I have posted a design proposal for fixing this properly in #3570, since that is the tracking issue for it. Happy to take the discussion there.
Activity
apostasie commentedon Jun 25, 2025
Yeah, this is unfortunate:
https://github.com/containerd/nerdctl/blob/v2.1.2/cmd/nerdctl/container/container_attach.go#L44-L48
Limitation of the original implementation: #2108
Duplicate of #3570 I believe.
apostasie commentedon Jun 25, 2025
Help is welcome in fixing this...
Note this is likely quite involved and requires a good grasp of IO.
ChengyuZhu6 commentedon Jul 2, 2025
@apostasie I‘d like to take it on.
ekalinin commentedon Aug 31, 2026
Same root cause as #3570, as @apostasie suspected: a FIFO has one queue, so two sessions reading the container's stdout each get a random subset of it. Nothing is dropped, it is just handed to whichever reader asked first, which is why one terminal looks frozen while the other prints characters it never asked for.
I have posted a design proposal for fixing this properly in #3570, since that is the tracking issue for it. Happy to take the discussion there.
feat(attach): support multiple concurrent attach sessions
feat(attach): support multiple concurrent attach sessions
feat(attach): support multiple concurrent attach sessions