-
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
docker-compose hangs #6678
Comments
@xcash Thank you for the ticket. We are going to investigate. Do you have any minimal |
@jcsirot No as it happens even when issuing a simple Btw the compose file mounts local volumes and uses default network. Uses a bitnami/nginx image. |
This happens to me as well, running on a Google Compute Engine instance with the same docker versions as above. Also Ubuntu 18.04. Even docker-compose --help does this, so no docker-compose.yaml is involved. |
Same behavior for me as well. I'm running on a Digital Ocean droplet running Ubuntu 18.04.2 LTS with 4.15.0-48-generic x86_64 GNU/Linux kernel. Installed via curl today. |
Same problem for me, Linode with Ubuntu 18.04.2. Going back to version 1.23.0 fixed it, although I had to recreate the containers. |
It seems like after the last update of Docker itself the problem is gone... can you guys (@hschalamonek @bitbuck3t @will-emmerson ) check it too? |
@xcash I'm running on Ubuntu 18.04.2LTS x64 with everything up to date as a work around: you must call |
@xcash was your If I
e.g. at the point you have a hang I have a child which is spawned and then exits. I think the The first exec looks to be some sort of self exec, and it then execs
I wonder if there is something which is slowing FWIW I was running |
On that machine (the only one I had with that problem) it disappeared and we use the same version :(
|
Sadly not.
I've seen the self extraction stuff before that line. In the output I evicted from the post.
Considering it is a VPS it's entirely possible something like that behind the scenes.
Should this happen again i will use your strace options. :) |
Thanks @xcash
FWIW one thing I considered mentioning before was that some of the lower tier virtual machines on AWS (and I presume other clouds) are scheduled in such a way that if they use all their "credit" for a given period they essentially hang (the whole VM is descheduled) until they rebuild up sufficient credit. I think this is probably not the case for you, since only So I think this is almost certainly not relevant to this case (at least to your particular instance), but worth mentioning just in case.
Thank you! BTW I think running |
I am still having the same problem, with upgraded everything, but can confirm that running |
@will-emmerson please can you try collecting some logs with |
I ran the following command and it created these files:
What should I do with them? I also ran
I've never used strace before. |
@will-emmerson easiest is probably to tar (or zip) them up and attach them here, thanks. |
I'm not sure I want to upload a bunch of logs to a public place when I don't really know what's in them. |
@will-emmerson hrm, yes, that's fair. please zip/tar them and mail them to ijc (at) docker.com. |
I've sent them. |
Received, thanks. |
So your process tree is:
The two processes 29718 and 29719 execute fully in <1s. e.g. dc.29718 is 6678-will-emmerson$ sed -n -e '1p;$p' dc.29718
10:33:59.478903 set_robust_list(0x7fa0b3052a20, 24) = 0
10:33:59.483282 +++ exited with 0 +++
6678-will-emmerson$ sed -n -e '1p;$p' dc.29719
10:33:59.597443 set_robust_list(0x7fa0b3052a20, 24) = 0
10:33:59.602154 +++ exited with 0 +++ Which I think rules out something slowing ldconfig down, at least in your case. It's the two main processes which take some time: 6678-will-emmerson$ sed -n -e '1p;$p' dc.29714
10:33:58.821291 execve("/usr/local/bin/docker-compose", ["docker-compose", "--version"], 0x7ffea9630aa8 /* 23 vars */) = 0
10:34:49.283590 +++ exited with 0 +++
6678-will-emmerson$ sed -n -e '1p;$p' dc.29717
10:33:59.145695 execve("/usr/local/bin/docker-compose", ["docker-compose", "--version"], 0xa6d630 /* 25 vars */) = 0
10:34:49.268734 +++ exited with 0 +++ In
Which seems to be the parent waiting for the child. In the child (
Aha! So the process is blocked in a The There is no use of Although I cannot reproduce the hang I can see the use of The maddest bit is that after blocking waiting for Well, thank you for those logs, they have at least given me a string to pull on and see where it takes me... |
No problem, it makes sense as it's a new VPS with very little use. And installing |
Not long before the With that knowledge this comment seems awfully telling: Which in turn seems to derive from: So I feel pretty sure in declaring that this isn't a compose issue as such, but some combination of Python's behaviour and lack of entropy on some systems. Installing haveged or some other entropy daemon or otherwise ensuring you have sufficient entropy seems like the right answer. I'm going to close since this does not appear to be a bug in compose, thanks for your help in getting to the bottom of the issue. FWIW https://lwn.net/Articles/693189/ is an interesting article on a related subject (I'm not sure whether or not this issue is the one being described there, but the symptoms are certainly similar). |
@ijc congrats for the troubleshoot Ian! :) |
Yeah! I had number 6 in Very strange issue, @ijc thank you for your investigation that issue was so unexpectable but interesting to discover. |
I don't understand the conclusion of this issue. At the end of it all, what can I do to not have my docker-compose commands from hanging?? |
You can try my patch here to keey away from |
If this was a problem for you please upvote #6931 so we can get better docs, which would have avoided lots of wasted time chasing down this problem. |
No, it didn't. Turns out my entropy was already high enough before installing that package. I installed anyway, but everything stands the same. |
Why should "docker-compose --help" require system entropy? |
That's a good point, and that's precisely what I'm experiencing.
Could be related to the amount of disk/memory the docker daemon needs to
operate?
…On Thu, 10 Oct 2019, 06:13 lazarcf, ***@***.***> wrote:
Why should "docker-compose --help" require system entropy?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6678?email_source=notifications&email_token=AA2U4TI3XX7K32WZAUW73ZDQN3W23A5CNFSM4HJC7I62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3QLBA#issuecomment-540476804>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2U4TJV42B34CKLBI5DW63QN3W23ANCNFSM4HJC7I6Q>
.
|
any update to the issue? |
Installing haveged fixed this problem for me. CentOS 7 |
I encountered this issue, but realized I was in a Python 3.8 virtualenv, ran |
I want to also confirm that installing Using Digital Ocean's Droplet, with:
We used this article to install I hope this helps anyone just in case. |
FWIW, installing jitterentropy-rngd on a small server running Ubuntu 20.04 (via Now |
I'm having exactly the same problem :( |
Same problem |
Have you tried checking available kernel entropy? Does increasing entropy generation, as described above, help? |
Hey @maidmariandev , I used apt-get to install docker, not snap.
|
Installing |
when using the docker-compose on digitalocean I realized this behaviour after trying to connect the host network. After removing it docker-compose up runs without any problem |
While this is a system issue, should docker compose do some reasonable check of available entropy, and issue a warning at least? As is, running a compose command locks the system. So even though it’s not a bug in compose, Trying to use compose is a killjoy. |
Check your path? You can also create a symbolic link.
Worked for me. |
Description of the issue
In a new server installation (on a VPS provided by OVH) running Ubuntu 18.x the Docker system works flawlessy and fast but docker-compose sometimes hangs indefinitely for no reason. And for every command, from version to ps, up, logs and so on.
I tried everything regarding DNS and name resolution, even disabling systemd-resolved.
When it works it is fast. When it hangs I can see the
/tmp/_Mxyz123123
directory created.Running with verbose hangs before any output. And then completes flawlessy.
Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
(Make sure to add the relevant
-f
and other flags)Steps to reproduce the issue
Observed result
Sometimes hangs
Expected result
Run fast.
Stacktrace / full error message
No stacktrace but i managed to strace the behavior.
Additional information
Linux vps[omit] 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 18.04.2 LTS
docker-compose installed with curl
I have lot of other docker-compose environments working and this is the first time I see this behavior. Any idea on what to check or where to look?
The text was updated successfully, but these errors were encountered: