moby: Exception when calling docker daemon commands in Windows
Actual behavior
Docker throws an exception everytime I run a command that accesses the daemon (e.g. docker -v
works since it’s client-side only).
Information
- Diagnostic ID: AD497577-51CA-4C56-B6F8-08A16B9710EC/2016-10-11_08-39-38
- Second Diagnostic ID: D5D7C5E8-58B0-4E45-A45D-DFED839BEFB1/2016-10-11_14-50-44
- a reproducible case: it happens everytime, cannot use Docker at this moment
- host distribution and version (Windows version, build number, etc): Microsoft Windows 10 Pro, Version 10.0.14393 Build 14393
Steps to reproduce the behavior
$ docker version
Exception 0xc000001d 0x0 0x0 0x18000890c
PC=0x18000890c
syscall.Syscall(0x7ffb27dadc40, 0x2, 0x274, 0x3, 0x0, 0x264, 0x0, 0x0)
/usr/local/go/src/runtime/syscall_windows.go:163 +0x5c
github.com/Microsoft/go-winio.setFileCompletionNotificationModes(0x274, 0x203, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/zsyscall.go:88 +0x70
github.com/Microsoft/go-winio.makeWin32File(0x274, 0xc08202f6e8, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/file.go:76 +0xf8
github.com/Microsoft/go-winio.DialPipe(0xc0820a9148, 0x16, 0xc08202f870, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/pipe.go:186 +0x81d
github.com/docker/go-connections/sockets.DialPipe(0xc0820a9148, 0x16, 0x773594000, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/go-connections/sockets/sockets_windows.go:12 +0x54
github.com/docker/go-connections/sockets.ConfigureTransport.func2(0xced7b0, 0x3, 0xc0822fd060, 0x19, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/go-connections/sockets/sockets.go:29 +0x6e
net/http.(*Transport).dial(0xc0820b06c0, 0xced7b0, 0x3, 0xc0822fd060, 0x19, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:662 +0x9d
net/http.(*Transport).dialConn(0xc0820b06c0, 0x0, 0xcea578, 0x4, 0xc0822fd060, 0x19, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:765 +0x1e44
net/http.(*Transport).getConn.func4(0xc0820b06c0, 0x0, 0xcea578, 0x4, 0xc0822fd060, 0x19, 0xc08230c6c0)
/usr/local/go/src/net/http/transport.go:709 +0x6d
created by net/http.(*Transport).getConn
/usr/local/go/src/net/http/transport.go:711 +0x269
goroutine 1 [select]:
github.com/docker/engine-api/client/transport/cancellable.Do(0x2be86f0, 0xc082008d88, 0x2bed900, 0xc0822fc880, 0xc082056700, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/transport/cancellable/cancellable.go:56 +0x4a4
github.com/docker/engine-api/client.(*Client).sendClientRequest(0xc08230c420, 0x2be86f0, 0xc082008d88, 0xce5800, 0x3, 0xcf2180, 0x8, 0x0, 0x0, 0x0, ...)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/request.go:106 +0x510
github.com/docker/engine-api/client.(*Client).sendRequest(0xc08230c420, 0x2be86f0, 0xc082008d88, 0xce5800, 0x3, 0xcf2180, 0x8, 0x0, 0x0, 0x0, ...)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/request.go:75 +0x2e3
github.com/docker/engine-api/client.(*Client).get(0xc08230c420, 0x2be86f0, 0xc082008d88, 0xcf2180, 0x8, 0x0, 0x0, 0xc08230a900, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/request.go:33 +0xad
github.com/docker/engine-api/client.(*Client).ServerVersion(0xc08230c420, 0x2be86f0, 0xc082008d88, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/version.go:12 +0xa1
github.com/docker/docker/api/client/system.runVersion(0xc08206a510, 0xc0823005a0, 0x0, 0x0)
/go/src/github.com/docker/docker/api/client/system/version.go:87 +0x41c
github.com/docker/docker/api/client/system.NewVersionCommand.func1(0xc082307200, 0x113d5e8, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/api/client/system/version.go:49 +0x3c
github.com/spf13/cobra.(*Command).execute(0xc082307200, 0x113d5e8, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/spf13/cobra/command.go:593 +0x705
github.com/spf13/cobra.(*Command).ExecuteC(0xc08206d8c0, 0xc082307200, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/spf13/cobra/command.go:683 +0x563
github.com/spf13/cobra.(*Command).Execute(0xc08206d8c0, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/spf13/cobra/command.go:642 +0x34
github.com/docker/docker/cli/cobraadaptor.CobraAdaptor.run(0xc08206d8c0, 0xc08206a510, 0xc0820081e0, 0x7, 0xc082004690, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/cli/cobraadaptor/adaptor.go:118 +0x266
github.com/docker/docker/cli/cobraadaptor.CobraAdaptor.Command.func1(0xc082004690, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/docker/cli/cobraadaptor/adaptor.go:126 +0x93
github.com/docker/docker/cli.(*Cli).Run(0xc0822fab10, 0xc082004690, 0x1, 0x1, 0x0, 0x0)
/go/src/github.com/docker/docker/cli/cli.go:81 +0x352
main.main()
/go/src/github.com/docker/docker/cmd/docker/docker.go:72 +0x4b1
goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:116 +0x139
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x1f
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x3e
goroutine 7 [select]:
net/http.(*Transport).getConn(0xc0820b06c0, 0xc082056700, 0x0, 0xcea578, 0x4, 0xc0822fd060, 0x19, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:714 +0x4f6
net/http.(*Transport).RoundTrip(0xc0820b06c0, 0xc082056700, 0xc0820b06c0, 0x0, 0x0)
/usr/local/go/src/net/http/transport.go:314 +0x7f0
net/http.send(0xc082056700, 0x2be44e0, 0xc0820b06c0, 0x0, 0x0, 0x0, 0xc08230e740, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:260 +0x6be
net/http.(*Client).send(0xc0822faf30, 0xc082056700, 0x0, 0x0, 0x0, 0xc839a0, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:155 +0x18c
net/http.(*Client).doFollowingRedirects(0xc0822faf30, 0xc082056700, 0xe69930, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:475 +0x8ab
net/http.(*Client).Do(0xc0822faf30, 0xc082056700, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:188 +0x106
github.com/docker/engine-api/client/transport/cancellable.Do.func1(0x2bed900, 0xc0822fc880, 0xc082056700, 0xc08230c660)
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/transport/cancellable/cancellable.go:49 +0x3c
created by github.com/docker/engine-api/client/transport/cancellable.Do
/go/src/github.com/docker/docker/vendor/src/github.com/docker/engine-api/client/transport/cancellable/cancellable.go:52 +0x106
goroutine 9 [syscall, locked to thread]:
syscall.Syscall6(0x7ffb27da6bf0, 0x5, 0x264, 0xc08231bf54, 0xc08231bf58, 0xc08231bf60, 0xffffffff, 0x0, 0x1, 0x1, ...)
/usr/local/go/src/runtime/syscall_windows.go:174 +0x5c
github.com/Microsoft/go-winio.getQueuedCompletionStatus(0x264, 0xc08231bf54, 0xc08231bf58, 0xc08231bf60, 0xffffffff, 0x0, 0x0)
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/zsyscall.go:76 +0xb1
github.com/Microsoft/go-winio.ioCompletionProcessor(0x264)
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/file.go:127 +0x7c
created by github.com/Microsoft/go-winio.initIo
/go/src/github.com/docker/docker/vendor/src/github.com/Microsoft/go-winio/file.go:55 +0xb3
rax 0x0
rbx 0x111fe08
rcx 0x274
rdi 0x256000
rsi 0xc08202f5f8
rbp 0x0
rsp 0x8fd88
r8 0x1
r9 0x0
r10 0x274
r11 0x13c4d48
r12 0x2
r13 0xe66316
r14 0x3
r15 0x8
rip 0x18000890c
rflags 0x10246
cs 0x33
fs 0x53
gs 0x2b
Things I tried
I tried re-installing docker, ran “Reset to factory defaults”, restart, nothing worked, I get the same exception all the time. Also tried switching from beta to stable and back to beta, nothing changes here as well. I’m using PowerShell (with and without Administrator), and also tried cmd.exe, all the same.
Go - Windows issue
Apparently this is a Go - Windows issue, and it’s actually reported in a few places like https://github.com/syncthing/syncthing/issues/3432 https://github.com/golang/go/issues/13541. I think this is related to kernel32.dll
, and the problem is originating in Microsoft/go-winio:zsyscall.go#L88
I encountered a similar Exception when I ran one of my own tools written in Go (using Cgo), but it only happened the first time. Second time (and then on) it worked without problems, unlike docker
which fails every time the daemon is called by a client command.
I originally reported this issue here https://github.com/docker/for-win/issues/140 but, as noted, I added it here as well for tracking purposes.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 99 (30 by maintainers)
@jhowardmsft
I uninstalled Web Companion by Lavasoft and now docker is working 100% fine. How about that
Steps I took to get docker working This was definitely a fluke and by no means a solution but it might help some other people out there that are still experiencing this problem, and it might help the developers figure out a potential fix somewhere along in the steps i took.
Running any docker command I would get the original error.
I then went to Task Manager -> Services tab -> com.docker.service, right click and restart.
I ran the command
docker version
and got the following:I then tried running DockerCli.exe (found in “C:\Program Files\Docker\Docker\DockerCli.exe”) as an admin by right clicking -> properties -> compatibility -> tick “run this program as an administrator”. I did the same for dockerd.exe (found in “C:\Program Files\Docker\Docker\resources\dockerd.exe”)
Running
docker version
still gave me the same error.I restarted Docker for Windows from the system tray by right-clicking on the docker icon -> settings -> reset -> restart docker…
Still same issue running
docker version
.After searching online I tried running
$env:DOCKER_HOST="tcp://localhost:2375"
which then I got the following error:I then decided to just give up and try reproduce the original issue again by resetting docker back to factory default settings by right-clicking the icon in the system tray -> settings -> reset -> reset to factory defaults…
Then I decided to run
docker version
to check what was happening and surprisingly it worked properly so I trieddocker ps
which also works fine. So now docker seems to be working without issues 😃Hope this helps someone else having the same problem as me and/or helps the developers fix this bug!
Uninstalling WebCompanion fixed Docker on Windows 10
OK, that confirms it. Thanks for your patience and assisting root causing this. TBH, I’m not sure whether to “fix” docker by looking to see if there is a non-IFS BSP or LSP installed and skip FILE_SKIP_COMPLETION_PORT_ON_SUCCESS, or not. Looking at https://en.wikipedia.org/wiki/Lavasoft, it sounds like alerting people to malware by failing might be a better solution… 😇
OMG, just found out that WebCompanion was installed on my PC, too. Deleted it - and now Docker seems to be working fine.
Thanks to @clns, running
& "C:\Program Files\Docker\Docker\resources\bin\docker.exe" -D -H tcp://127.0.0.1:2375
helped me to come up with this solution.This is a hack for anyone whose is still having issues.
So in my case I created a file dockerish.cmd and put in the content
@echo off DOSKEY dk= “C:\Program Files\Docker\Docker\resources\bin\docker.exe” -D -H tcp://127.0.0.1:2375 $*
Note don’t forget the $ * Then add the file to registry
Hit start and type run. In the box that appears, type regedit and press ok.
When the registry editor opens, go to Computer -> HKEY_CURRENT_USER ->SOFTWARE -> MICROSOFT ->COMMAND PROCESSOR.
Right Click on command processor -> NEW ->STRING VALUE.
Type
Autorun
as the key.After right click on the key you just entered and select modify
The doskey created should now be available to and any cmd you open. (NOTE U CANNOT RUN IT POWER SHELL directly, u would have to run cmd in power shell first).
-open cmd in administrator mode
so now if u type
dk info
you should get something like the following,All docker commands now become
dk
followed by argumentsExample
docker ps
becomedk ps
below is my screen after installing redis
Hope it helps someone.
I’ve been experiencing the same issue as the original post. I’ve tried everything mentioned in this thread and nothing seems to work. I can’t try reinstalling windows as this is a work computer. I have noticed though that this version of Windows 10 Pro is an upgraded version from Windows 7 Pro and was upgraded using the Windows 10 Upgrade Assistant. Would this have any link as to why docker isn’t working? Anyone else also using an upgraded os?