The process cannot access the file 'C:\WINDOWS\TEMP\<some file>' because it is being used by another process.
Expected behavior
When starting machine, Docker should start normally.
Actual behavior
Docker icon indicates it's initializing. After several minutes I get the following exception. The filename is always different. The temp file indicated is always created at bootup, it's creation and modified date correspond to when I log into my machine after clean boot.
The process cannot access the file 'C:\WINDOWS\TEMP\kmrua3r5.sbk' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at Docker.Backend.MobyCommand.RunDocker(String arguments, IDictionary2 envVariables, String stdin, Int32 timeoutMs, String cidFile) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 139
at Docker.Backend.MobyCommand.Run(String commandLine, IDictionary2 envVariables, Boolean load, String stdin, Int32 timeoutMs) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 49
at Docker.Backend.SambaShare.MountInMoby(String mount, String drive, Credential cred, CredentialInfo credInfo, String options, String ip) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 197
at Docker.Backend.SambaShare.MountInMoby(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 168
at Docker.Backend.SambaShare.Mount(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 65
at Docker.Backend.BackendServer.
Information
- Diagnostic ID: A5DA733E-F0E6-4FCE-9066-01021758BEA2/2017-06-13_09-28-37
- Docker Edge Build 17.06.0-rc2-ce-win14 (12510)
- Windows 10 Enterprise 1703, Build 15063.332
Steps to reproduce the behavior
- Cold boot Windows
- Docker crashes trying to access a locked temp file.
Hi @slafave Do you have any antivirus or endpoint protection utilities running that would be scanning the windows\temp folder ?
Hi @jasonbivins -
We're running Windows Defender but I have the Windows\Temp folder excluded from all scanning.
For what it's worth, I've been getting this since loading Edge. Windows\Temp is not the best folder to exclude from AV scanning. I'm going to try setting an exclusion by process instead (Docker.Service). Will update this thread with results.
So far, excluding the Docker.Service process from AV scanning appears to be preventing the TEMP error...
Queue sad trombones, got the temp file access error again... Is there another process besides Docker.Service I can try excluding?
Crash report: C7ED5F5F-3273-4BDE-9A44-A018CA0CBD67/2017-06-18_09-54-59
Stack trace:
The process cannot access the file 'C:\WINDOWS\TEMP\iypofhvz.ase' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at Docker.Backend.MobyCommand.RunDocker(String arguments, IDictionary`2 envVariables, String stdin, Int32 timeoutMs, String cidFile) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 139
at Docker.Backend.MobyCommand.Run(String commandLine, IDictionary`2 envVariables, Boolean load, String stdin, Int32 timeoutMs) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 49
at Docker.Backend.SambaShare.MountInMoby(String mount, String drive, Credential cred, CredentialInfo credInfo, String options, String ip) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 197
at Docker.Backend.SambaShare.MountInMoby(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 168
at Docker.Backend.SambaShare.Mount(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 65
at Docker.Backend.BackendServer.<Run>b__5_11(Object[] args) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\BackendServer.cs:line 54
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 145
OK, I'm also affected by this issue. After a little bit of investigation, I doubt it's the AV. Here's my reasoning:
I'm running 17.06.0-ce-rc5-win16 (12604) on the Edge channel. Crash report: 7375E156-29B2-468B-9C4C-F8C65221B099/2017-06-27_09-37-38 Stack trace:
The process cannot access the file 'C:\WINDOWS\TEMP\w3mbvm1u.z2u' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at Docker.Backend.MobyCommand.RunDocker(String arguments, IDictionary`2 envVariables, String stdin, Int32 timeoutMs, String cidFile) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 139
at Docker.Backend.MobyCommand.Run(String commandLine, IDictionary`2 envVariables, Boolean load, String stdin, Int32 timeoutMs) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\MobyCommand.cs:line 49
at Docker.Backend.SambaShare.MountInMoby(String mount, String drive, Credential cred, CredentialInfo credInfo, String options, String ip) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 197
at Docker.Backend.SambaShare.MountInMoby(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 168
at Docker.Backend.SambaShare.Mount(String drive, Credential credential, Settings settings) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\SambaShare.cs:line 65
at Docker.Backend.BackendServer.<Run>b__5_11(Object[] args) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\BackendServer.cs:line 54
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 145
Using Process Explorer (from the Sysinternals suite, https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx), I searched for processes having open handles containing w3mbvm1u.z2u (from the Find -> Find Handle or DLL... menu). I found one docker.exe process (a child of the com.docker.service process) that was just sitting taking very little CPU (under 1% every now and then). This process has the command line:
"C:\Program Files\Docker\Docker\Resources\bin\docker.exe" run --rm --privileged --pid=host -i -e USER --cidfile="C:\WINDOWS\TEMP\w3mbvm1u.z2u" d4w/nsenter /bin/sh -c "export PASSWD=$(cat); if ! nc -zv -w1 10.0.75.1 445; then exit 253; fi; (umount -vl /c || true) && (umount -vl /C || true) && (rmdir /c || true) && (rmdir /C || true) && mkdir -p /c && mkdir -p /C && mount -t cifs //10.0.75.1/C /c -v -o noperm,iocharset=utf8,nobrl,mfsymlinks,vers=3.02,domain=upsilon&& mount -t cifs //10.0.75.1/C /C -v -o noperm,iocharset=utf8,nobrl,mfsymlinks,vers=3.02,domain=upsilon"
Once the stack trace window with the error is dismissed, I can successfully restart Docker (from the Reset tab of the settings dialog), and everything comes up as expected.
That's the cifs-mount container. cc @simonferquel @ebriney
Same error, right after the latest udpate.
And I confirm, after the error windows, clicking Restart works.
@gtardif - did this actually get fixed? @NicolasDorier just mentioned that he was still seeing the error after the current update, and that restarting Docker worked. The error, however, still exists.
No it's not in the actual version. I'll be fixed in the next one, sorry for the convenience.
My version is
Version 17.06.0-ce-win18 (12627)
Channel: stable
d9b6651
I can report that this also went away for me with the latest update on edge, 17.06.0-ce-win17 (12626).
For me this just started happening after a docker update to latest 17.06:
The process cannot access the file 'C:\WINDOWS\TEMP\0fq3fmla.c4l' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at Docker.Backend.MobyCommand.RunDocker(String arguments, IDictionary`2 envVariables, String stdin, Int32 timeoutMs, String cidFile)
at Docker.Backend.MobyCommand.Run(String commandLine, IDictionary`2 envVariables, Boolean load, String stdin, Int32 timeoutMs)
at Docker.Backend.SambaShare.MountInMoby(String mount, String drive, Credential cred, CredentialInfo credInfo, String options, String ip)
at Docker.Backend.SambaShare.MountInMoby(String drive, Credential credential, Settings settings)
at Docker.Backend.SambaShare.Mount(String drive, Credential credential, Settings settings)
at Docker.Backend.BackendServer.<Run>b__5_11(Object[] args)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
Tried reset factory defaults, and this fixed it.
I currently have Docker version 17.06.0-ce, build 02c1d87. And I have the same problem that the others mention. I see that they say that reestablishing the defaults is fixed, but in realizad I do not see it as a solution because this destroys all the containers I currently have. I hope you can support me with this inconvenience.
The process cannot access the file 'C:\Windows\TEMP\qxtcclj4.f0m' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) at Docker.Backend.MobyCommand.RunDocker(String arguments, IDictionary
2 envVariables, String stdin, Int32 timeoutMs, String cidFile) at Docker.Backend.MobyCommand.Run(String commandLine, IDictionary2 envVariables, Boolean load, String stdin, Int32 timeoutMs) at Docker.Backend.SambaShare.MountInMoby(String mount, String drive, Credential cred, CredentialInfo credInfo, String options, String ip) at Docker.Backend.SambaShare.MountInMoby(String drive, Credential credential, Settings settings) at Docker.Backend.SambaShare.Mount(String drive, Credential credential, Settings settings) at Docker.Backend.BackendServer.b__5_11(Object[] args) at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
Im not sure if it destroys running contaiers. But you shouldn't even store Important state in your containers in the first place.
Started happening after last update. Reset to defaults helps but after reboot it's not working again.
Restart odkcer using gui helped.
Still going on with the stable version: Version 17.06.0-ce-win18 (12627) Channel: stable d9b6651 Reset fixes the problem... Is there ETA on a Stable release fix for this?
gave docker-users permission to write into temp folder. works good for now.