-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Log tailing leaves behind a stale process when CTRL^C is used and the target container is not running #8749
Comments
Possibly related issues: #8564 |
Possible fix provided in #8726 ? |
Fixed in |
The issue persists if the container isn't running before |
new attempt: #8926 |
Seems to be solved in latest pre release. |
If I'm not mistaken #8926 is included in 2.2.0, but I still have the issue in that version in some cases. @nocive could you reproduce? It's harder than before, but with the following scenario I have the issue every single time.
version: '2.2'
services:
foo:
image: alpine
command: sh -c 'while true; do date; sleep 1; done'
bar:
image: alpine
command: sh -c 'while true; do date; sleep 1; done' commands: # first shell
$ docker-compose up -d
$ docker-compose logs -f
# second shell
$ docker-compose stop bar
$ docker-compose restart foo After the last command, the logs in first shell should show the logs of the new containers, but instead show nothing, and Ctrl^C does nothing as well (the process hangs). |
I can't reproduce. |
Hmm that's bizarre, when you stop Or do you mean that when you restart foo then the logs command exits? In which case adding a third container could help maybe. Do you think I should open a new ticket? |
@Rogdham to be fair, I didn't follow your exact reproduction steps and only tested this with a single container, which is also what's in this issue's description.
Perhaps that would be best, also because this one is not getting any attention from the maintainers :') |
ok, created in #8977, thank you for your feedback! |
Description
Steps to reproduce the issue:
docker compose logs -f SOME_CONTAINER
docker compose stop SOME_CONTAINER
Describe the results you received:
A zombie
docker-compose logs
process is left running with PPID 1 that needs to be force killed to be stoppedDescribe the results you expected:
No leftover processes after hitting CTRL^C
Additional information you deem important (e.g. issue happens only occasionally):
Consistently reproducible, happens with all versions of docker compose 2.x.
Output of
docker compose version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: