-
Notifications
You must be signed in to change notification settings - Fork 834
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 **Client** Hang on Windows Subsystem for Linux (WSL) #1123
Comments
Hi @MicahZoltu , thanks for reporting this! It sounds very similar to #575 to me; possibly with #610 or #616 as the underlying cause. (I realize that you're reporting a client problem; those tickets discuss a problem with TCP connections such as the connection between a WSL docker client and a remote docker server.) Could you take a look at those tickets? If you agree that one of them is a duplicate, could you close this as a dupe and follow up there so that we can have all discussion in the same place? If not, please post some more detail to help understand how these issues differ. |
I don't believe #575 is related as I am able to do most docker operations, just not this one. #610 and #616 I don't believe I have enough knowledge/understanding of the underlying root cause to be able to identify as duplicates or not. If someone more knowledgeable than I about the inner workings of docker and/or those tickets believes this is a dupe then I support closing this as a dupe. |
Regarding #575 , for what it's worth, I believe the issue with most commands was due to a misconfiguration that was corrected; the problem that's being tracked is a hang in |
Any news on this? Quite a blocker. |
It's possible. I just tried the repro posted by @MicahZoltu, but got stuck at :~# ~/docker/docker -H tcp://0.0.0.0:2375 build |
@sunilmut Yeah, you need Docker for Windows installed for step 8 to work. Step 8 attempts to use the docker client inside of the Linux subsystem to communicate with the docker server running inside a Linux Hyper-V VM that Docker for Windows installs/sets up. |
@sunilmut Oh, also it appears you are missing the trailing |
I believe you do need Docker for Windows installed. I think you also need a |
Improved the repro steps some more. This time the steps explicitly create a "Step 8" discussed above is now Step 10. |
Thanks guys for the help. The issue repro'd even with the fix. I substituted "Docker for Windows" with "Docker for Linux", which should also be a viable option. I could see the |
@sunilmut -- what do you mean by "Docker for Linux"? Is the Docker server expected to work correctly on Linux now? (If so, that's unexpected but really cool :-) ) |
I'm assuming he meant he had a linux box with docker on it and he connected up to it with |
@MicahZoltu correct. |
Sorry for the delay in getting back to you @sunilmut
It just sits on that last line forever. I have never used |
For comparison, here is the same Dockerfile being built with an essentially empty context (no data to transfer into the image):
|
Hm... @MicahZoltu -- could you try omitting The full (unfiltered) strace output can be quite verbose. You may wish to use |
Here is the broken one (has non-trivial context): https://gist.github.com/MicahZoltu/4f80319472d3872931d467134f9434c1#file-working-no-context-txt |
Both of those actually say "Successfully built"... Did one of them fail? |
They are two files in the same gist, here is the end of the broken file: https://gist.github.com/MicahZoltu/4f80319472d3872931d467134f9434c1#file-broken-with-context-txt-L607 |
I believe I have a related issue. If you try to It transfers some but then hangs. You can easily reproduce but simply using I use a 15MB file so that it happens 100% of the time. |
I have also experienced hangs with large Git repos. I ran a "git add" on a very large folder in WSL and the process hung. |
@bitstrings @AaronFriel - Hang/incomplete transfer on large files is a known issue, documented in #610, #616. Fix for that is inbound. This issue seems to be a bit different because I don't see anywhere in the trace uploaded by @MicahZoltu, where socket send/recv is happening. |
Can confirm that I have the same problem. I run the docker engine on windows and the docker client on bash on windows. I can run and see docker containers with no problems, but it hangs when trying to build an image. Hopefully this issue gets fixed soon! |
I ran in to this issue yesterday and was just about to comment here today with some details on my setup and findings from digging though the logs, but I noticed I could no longer reproduce this issue since my PC updated to Windows 10 build 15002 overnight. Microsoft did release a bunch of updates and fixes for WSL with this build[1], a few related to TCP connection bugs as well. Perhaps that resolved the underlying issue here. |
@DvdGiessen - Thanks for validating and the comment. It's helpful to know. @MicahZoltu, @AaronFriel, @laurensV - if you can also validate your scenario with 15002 and see if it works, then I will happily close this issue out. |
I am running 15007 17017-1846 with WSL along with "Docker For Windows" with a LinuxVM in HyperV. I installed docker through WSL with: sudo apt-get update && sudo apt-get install -y docker.io Success! |
@sunilmut: I just updated to official Windows 10 release version 1607 build 14393.693 and the problem persists. I believe version 15002 is an insider build (I don't think it ever landed on my system)? Perhaps this means a future official update will resolve the issue? @derekbelrose: the problem isn't with running docker images, it is with building them when they have large contexts. I recommend following the instructions in the original post and see if you experience the hang described there, I have updated the instructions a few times during the life of this issue and they should be pretty easy to follow at this point. |
@MicahZoltu -- WSL updates are (for the most part) only available in Insider builds right now. You're correct, as I understand it, that this means that they will be available in a future stable release. |
@MicahZoltu Well, besides using apt-get install docker.io instead of downloading docker in a tarball, I just followed your instructions to a T. It worked. I even went a bit further and copied the 21MB file into the image being built and I was able to build it exactly the same way in about 3 seconds. I cannot reproduce this on 15007. WSL is actively being worked on in the insider builds and does do as expected in this scenario. |
|
I am closing this issue out since it seems to be fixed. If anyone experiences any problem here, please speak out and we will gladly reopen the issue. |
It's there a mechanism for getting notification when whatever insider code has this fix is merged to the mainline builds? I was using this issue to monitor for a fix so I could verify once it was released officially (non-insider). Originally, I assumed that insider builds were betas for mainline releases, but that isn't the case as there have been mainline releases of Windows 10 since this was fixed in insider, yet the problem persists on mainline Windows 10. |
@MicahZoltu - The current plan of record is to update mainline WSL with the standard Windows ship cadence (which we're targeting twice a year). There are different Insider levels that mean different things. "Release Preview" is what you describe, where you're essentially trying out things that will be later released as Windows Updates to mainline Windows. Those will primarily be security and reliability fixes. For new feature work "Insider slow" or "Insider fast" are the levels you should use. This will have features that will not reach general availability until the next Windows release. |
@benhillis Ah, OK. So if a bugfix like this is part of insider slow/fast, I should not expect to see it in the regular windows updates (the ones my computer is constantly doing in the background on what seems like a weekly basis) but instead expect to see it in the next full release, like the Anniversary update or the upcoming Creators Update. |
@MicahZoltu - In general, yes, unless the bugfix is for a critical security issue or a major blocker. In which case we try to backport the fix to the last Windows full release. |
NOTE: This is a problem with running the docker CLIENT inside of WSL. This is NOT a problem with running the docker daemon inside WSL which I recognize should not be expected to work at all.
A brief description
After downloading the docker client in WSL I am able to run most commands (run, ps, images, rm, etc.). However, when I try to do a docker build it hangs while copying the context.
Expected results
I expected it to build my image.
Actual results (with terminal output if applicable)
It sits here indefinitely. I once let it sit for a while (not sure how long, maybe 30-60 minutes) and it never moved on. The number of MB it gets to before failing varies slightly each time, though it is usually within a few MB of 12MB. When running docker client in windows, it indicates a 53MB context.
Your Windows build number
Windows 10 Enterprise N with latest patch.
Steps / All commands required to reproduce the error from a brand new installation
cd ~
wget https://get.docker.com/builds/Linux/x86_64/docker-1.13.0.tgz
tar -xzvf docker-1.12.1.tgz
echo FROM alpine:latest > Dockerfile
dd if=/dev/urandom of=file.txt bs=1048576 count=20
~/docker/docker -H tcp://0.0.0.0:2375 build .
Related docker issue (unclear whether the problem is Docker or WSL): moby/moby#26889
Additional Notes
The problem appears to only occur with large contexts (over 12MB). With a trivially small context everything works. Some details on the exact failure can be found in this comment: moby/moby#26889 (comment)
The text was updated successfully, but these errors were encountered: