Error 0x80070005 on startup
A brief description
After closing all open bash windows. I cannot restart bash. I get this: Error: 0x80070005
Looking into the event viewer I see this logged: EFS service failed to provision a user for EDP. Error code: 0x80070005.
I have updated Ubuntu from Trust to Xenial and noticed this bug afterwards. Might be related to leaving tmux open. Will investigate more.
Windows build number
Windows 10 Version 1607 (OS Build 14372.0)
Commands required to reproduce the error
bash.exe
Required packages and commands to install
Ubuntu Xenial Possibly tmux
Possibly related to this: https://github.com/Microsoft/BashOnWindows/issues/473#issuecomment-224708711
Will test newer build
@soda0289 The issue you linked could definitely cause this issue. I'll be interested to hear if you hit this on build 14376 or newer.
Just got the same problem on build 14388.
@Gabrielcarvfer Are you doing anything with symlinks in your %localappdata%\lxss directory?
Nope, was rebuilding Chromium, trying to find a workaround to other issue. Executed it, with strace, killed the process, because it got stuck. Then I gave up for today, and was moving files to my external drive, but it seems that the file handles had some kind of problem, because Windows couldn't copy them ( error 0x80070780) and bash stopped working. After rebooting, bash returned, but Windows still can't copy some files.
I also updated to 14388 but have not been able to reproduce the error. I have tried to find steps to recreate the problem but have been unsuccessful. The only fix is to restart as trying to log in and out does not fix the problem. I'm guessing it's some service, maybe EFS, that is causing the issue.
I have collected lxcore trace etl files from the previous occurrence of this bug. Not sure if they be would help but can send/upload them if you wish.
I do get the error
Error: 0x80070005
upon launching bash.exe from an SSH shell into the Windows host.
I started getting this error after updating yesterday to cumulative update 14393.693. I tried uninstalling the feature and then reinstalling the feature but that didn't fix the problem.
@NoFlames - Can you please collect the traces and share it out so that we can see what and where things are going wrong?
I had this error today after closing off my bash windows. Collected traces here.
I tried deleting the lxss temp folder but it didn't seem to disappear before I ran these traces.
Many thanks! I am on 14393.693, running on a Surface Book.
I experienced this problem today and it happened without any update. It happened after a restart of the computer. Attached are the collected logs.
Removing the lsxx\temp folder did correct the problem for launching the bash shell. However there are missing files that I drop into the lsxx\home directory. They don't appear in the bash shell but are accessible from the Windows side. I noticed this when the git project within bash shell was reporting files missing. The missing files were ones that had been modified and saved before the restart of the computer.
@sunilmut
Adding @benhillis to see if he can take a look at the traces.
@NoFlames - the issue you describe about not being able to see files you dropped into the lxss / home directory is addressed here.
@NoFlames - took a look at your trace and it looks like something (possibly our driver) is holding onto a handle of the files in your temp directory so they cannot be deleted. Lots of changes to WSL have been made since the Anniversary Update build you are running and it's possible this has been resolved since then.
@benhillis, I am experiencing this in Creators Update so it is definitely not fixed. I fresh installed the WSL by using lxrun and installed a couple of packages before trying to build bazel. After I Ctrl-C to kill bazel for several times, bazel became slower and slower, eventually hung (I waited 1.5 hours and it didn't even finish compiling a single file), then I Ctrl-C again and quit all bash windows. Then I can no longer enter bash anymore, showing error 0x80070005.
If we already know something is holding a handle to files, how do we release the handle, without rebooting the machine?
@likan999 unfortunately since our driver is not unloadable the only way is to reboot the machine. We need to track down where the handles are being leaked in our driver.
@benhillis It's been two months since the last reply. I understand nobody reported this after Feb so you might think things get fixed. But I can confirm here that the problem still exists. Is there any going effort to fix this?
@likan999 - I don't understand your question, I responded 15 minutes ago that we're looking into the handle leak.
@benhillis Thanks for confirming you are looking into the issue. From your previous reply, 'We need to track down ...', it wasn't clear there were people actually looking into it.
I found the problem can be consistently reproducible on my machine. I fresh installed the WSL, installed prerequisite packages of bazel, downloaded the release version of bazel, then checked out the git source of bazel (switch to the release 0.4.5 version, see git tag) and repeatedly building it a few times(/path/to/bazel clean; ./compile.sh compile /path/to/bazel). It became slower and slower, eventually hangs. It is easy to tell it hangs, because bazel prints currently compiling sources and elapsed time. If you see a file has been compiling for several hundreds of seconds, it is almost certainly it hangs.
Then (important to reproduce) you need to Ctrl-C a few times to quit bazel, and then quit all windows of WSL. Then you try to open WSL again, it will show "Error: 0x80070005. Press any key to continue..."
@benhillis when do you think the problem can be fixed? Since Creator Update has been released a few days back, does it mean I need to wait for another half year or a year to get things fixed?
@likan999 - Narrowing down reproducible steps to get the system into this state is going to be the best way to track down this bug. It looks like you have a repro above, if you wouldn't mind could you expand on the repro with the exact commands you're running? I'm not familiar with bazel so some more detail on the steps would be great for us (even if they're obvious for you).
Regarding servicing we'll have to see how involved the fix is. As I mentioned above it's probably a simple handle leak, in that case it should be straightforward to convince the folks in charge of servicing to backport the fix to Creators Update.