Skip to content
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

terminating docker attach container prints context canceled error #5294

Closed
thaJeztah opened this issue Jul 24, 2024 · 7 comments · Fixed by #5295
Closed

terminating docker attach container prints context canceled error #5294

thaJeztah opened this issue Jul 24, 2024 · 7 comments · Fixed by #5295

Comments

@thaJeztah
Copy link
Member

Description

I noticed this while updating the docs in #5289. Terminating an attach (CTRL-c, killing the container) prints a context canceled error.

Based on the example I was updating (assuming the example was correct!), older versions did not print these errors, and as they don't provide much value to the user, we should probably not print them 🤔

docker run -d --name topdemo alpine /usr/bin/top -b

docker attach topdemo
Mem: 1397860K used, 6629032K free, 928K shrd, 168848K buff, 329628K cached
CPU:   0% usr   0% sys   0% nic  97% idle   1% io   0% irq   0% sirq
Load average: 0.25 0.16 0.08 1/342 6
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
    1     0 root     R     1712   0%   4   0% /usr/bin/top -b
^Ccontext canceled

I reproduced this with v27.0.3 and v27.1.1 (but haven't checked older versions)

@thaJeztah
Copy link
Member Author

cc @Benehiko @laurazard

@laurazard
Copy link
Member

Bisect says it was introduced in 3f0d90a (cc @Benehiko)

@laurazard
Copy link
Member

I can take a quick look, and add a test.

@laurazard laurazard self-assigned this Jul 24, 2024
@Benehiko
Copy link
Member

This should've been fixed in #5247

@thaJeztah
Copy link
Member Author

This should've been fixed in #5247

Oh! Hm.. need to double check now if I checked with 27.0 or 27.1 (or if there's still an issue at hand)

@laurazard
Copy link
Member

I don't think it is,attach uses different code paths from run. I've got a commit with some tests and a fix on the way :)

@Benehiko
Copy link
Member

I don't think it is,attach uses different code paths from run. I've got a commit with some tests and a fix on the way :)

oh you're right! I didn't look too closely at the issue my mind just went to the code that was problematic at the "attach" section in the run command 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants