Skip to content
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

Error 0x80070005 on startup #651

Closed
soda0289 opened this issue Jul 13, 2016 · 58 comments
Closed

Error 0x80070005 on startup #651

soda0289 opened this issue Jul 13, 2016 · 58 comments
Assignees
Labels

Comments

@soda0289
Copy link

soda0289 commented Jul 13, 2016

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

@soda0289
Copy link
Author

Possibly related to this:
#473 (comment)

Will test newer build

@benhillis
Copy link
Member

@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.

@Gabrielcarvfer
Copy link

Just got the same problem on build 14388.

@benhillis
Copy link
Member

@Gabrielcarvfer Are you doing anything with symlinks in your %localappdata%\lxss directory?

@Gabrielcarvfer
Copy link

Gabrielcarvfer commented Jul 14, 2016

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.

@soda0289
Copy link
Author

soda0289 commented Jul 14, 2016

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.

@sanmai-NL
Copy link

I do get the error

Error: 0x80070005

upon launching bash.exe from an SSH shell into the Windows host.

@NoFlames
Copy link

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.

@sunilmut
Copy link
Member

@NoFlames - Can you please collect the traces and share it out so that we can see what and where things are going wrong?

@ChristopherHammond13
Copy link

ChristopherHammond13 commented Jan 23, 2017

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.

lxcore_kernel_traces.zip

@NoFlames
Copy link

NoFlames commented Feb 2, 2017

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.

lxcore_kernel.zip

@sunilmut

@sunilmut
Copy link
Member

sunilmut commented Feb 6, 2017

Adding @benhillis to see if he can take a look at the traces.

@benhillis
Copy link
Member

@NoFlames - the issue you describe about not being able to see files you dropped into the lxss / home directory is addressed here.

@benhillis
Copy link
Member

@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.

@likan999
Copy link

@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?

@benhillis
Copy link
Member

benhillis commented Apr 13, 2017

@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.

@likan999
Copy link

@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?

@benhillis
Copy link
Member

@likan999 - I don't understand your question, I responded 15 minutes ago that we're looking into the handle leak.

@likan999
Copy link

likan999 commented Apr 14, 2017

@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?

@benhillis
Copy link
Member

@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.

@likan999
Copy link

likan999 commented Apr 14, 2017

@benhillis Reproduce steps are (I am not sure which steps cause the problem so I don't know how to reduce it to a smaller set of steps):

First, fully reinstall WSL
lxrun /uninstall /full
lxrun /install

Within WSL:

  1. Install prerequisites:
    sudo apt update &&
    sudo apt upgrade -y &&
    sudo apt install -y openjdk-8-jdk g++

  2. Install release version of bazel so that it can be used to build bazel itself from source:
    echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list &&
    curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - &&
    sudo apt update && sudo apt install -y bazel && sudo apt upgrade -y bazel

  3. Checkout bazel from git:
    git clone https://github.com/bazelbuild/bazel.git &&
    cd bazel &&
    git checkout -b release-0.4.5 0.4.5

  4. Repeatedly run the following commands (typically twice is sufficient to make it hang):
    bazel clean && bazel build //src:bazel

By saying it hangs, I don't mean the entire bash freezes. In fact, bazel is still running, giving outputs, but compilation doesn't make any progress. It keeps saying:

Still waiting for <N> jobs to complete:
  ......
  Compiling <some/path/something.cc>, <M> s

when M goes to several hundreds, it almost certainly hangs.

  1. (Important) Press Ctrl-C quickly 3 times to kill bazel, press Ctrl-D to quit WSL windows. Then open WSL again and it says "Error: 0x80070005. Press any key to continue...".

Once you reboot, the problem is gone, and you can start from step 4 to reproduce it.

@benhillis Let me know whether or not you can reproduce it on your machine. Thanks.

@benhillis
Copy link
Member

@likan999 - Thank you very much for the repro steps. I was able to reproduce the issue locally and will try to debug where the handle leak is coming from.

@skynode
Copy link

skynode commented Jun 13, 2017

Please has this problem been resolved?

@silencesys
Copy link

silencesys commented Jun 23, 2017

I was able to reproduce this issue by installing php7.0, Apache2 and oci8 extension for php. When I enabled oci8 extension in php.ini, started apache and visited one of mine projects, which uses oci, in browser, closed bash and tried to open it again, it resulted in error 0x80070005

Windows version 1703 (OS Build 15063.413)
Ubuntu 14.04.5 LTS

@juanlvo
Copy link

juanlvo commented Jun 27, 2017

I got the same error, in my case

  1. I have a folder in workspace
  2. in my Ubuntu bash terminal I was inside of that folder.
  3. I close the Ubuntu Bash Terminal
  4. I erase the folder from the Windows Explorer.
  5. I open the Ubuntu bash terminal
  6. I got the error.

I think is related with a mapping of the folders, but If I do the same in a Ubuntu client running Ubuntu I don't get that issue, maybe is related with someone new implemented.

@benhillis benhillis self-assigned this Jul 28, 2017
@adamfeldman-ris
Copy link

Also had this issue after running Oracle instant client. Just like others above, restarting into safe mode (hold shift and choose restart on the login screen or start menu) and deleting %LOCALAPPDATA%\lxss\temp fixed the problem.

@Jocala
Copy link

Jocala commented Feb 17, 2018

I still get the Error: 0x80070005 when I ssh into Windows 10 and run bash.

Surface Pro 3
winver 1709:16299.248
OpenSSH 7.6p1
v1.0.0.0-Beta
OpenSSH-Win64.zip

I did restart into safe mode and nuke the lxss\temp directory as mentioned above, no difference.

@huyuguang
Copy link

I just got the 0x80070005 when I run bash in cmd.
winver: 1703 15063.786

@JimMcHale
Copy link

ssh into win10 pro; type bash, and get the error.
1709 16299.371

@bryanlarsen
Copy link

@GuyGoldenberg
Copy link

Turning off device guard, credentials guard and HyperV worked for me

@snobu
Copy link

snobu commented May 9, 2018

Just upgraded Windows to 10.0.17134.1, WSL is gone,

C:\>lxrun /uninstall /full
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications, new applications,
and user data.

Type "y" to continue: y
Uninstalling...
Error: 0x80070002

Manually cleaned up %LOCALAPPDATA%\lxss, then:

C:\>lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms
available here: https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Error: 0x80070005

Clicking Launch:
image

How are you integration tests looking? :)

@WSLUser
Copy link

WSLUser commented May 9, 2018

@snobu There is an issue with running both the Store version and lxrun version. You need to remove the lxrun version and re-install the Store version. Aside from this, there has been an issue for some users in registering the distro with that error code. As I said though, the first step is to nuke your lxrun version. It's depreciated anyways so why continue to use it?

@snobu
Copy link

snobu commented May 9, 2018

That's what i'm trying to do, nuke it. But i can't nuke it since lxrun /uninstall /full breaks.

@WSLUser
Copy link

WSLUser commented May 9, 2018

Oh I see. Try restarting the lxss service (if it's started) and see if that helps. I don't believe it's related to leaks as was the issue here. Possibly related: #3020

@snobu
Copy link

snobu commented May 9, 2018

Unfortunately stopping that service didn't help and i can't turn off Device/Cred Guard. It's strange how this made me realize WSL is the only purpose of this Windows box :)

@WSLUser
Copy link

WSLUser commented May 9, 2018

Stopping lxss isn't the intent. It needs to run in order for WSL to work. It will produce the error code otherwise. I suggest following up on that issue and submit logs there.

@snobu
Copy link

snobu commented May 9, 2018

The LxssManager service is running. I'm not sure which logs should i be looking for..

@snobu
Copy link

snobu commented May 9, 2018

Are those ETL logs safe to share publicly?

@WSLUser
Copy link

WSLUser commented May 9, 2018

Scratch that, ETL logs should be sent to them as posted in the directions.

@snobu
Copy link

snobu commented May 9, 2018

I've sent them over to InsiderSupport@msft.

@WSLUser
Copy link

WSLUser commented May 9, 2018

Ok I updated my comment after further reading the instructions. Best let @benhillis know you sent them.

@willemdh
Copy link

Same issue here..

%LOCALAPPDATA%\lxss\temp doesn't exist, so can't delete it.

@sparsecoder
Copy link

I got the same error after a windows update.
I opened powershell as administrator and ran bash, It gave the updating message (but no error), then returned to the command prompt.
Then my non-admin shells worked fine.

I don't think it makes any difference, but I'm using Arch.

@kjonnala
Copy link

kjonnala commented Oct 1, 2018

Am getting the same error:

C:\WINDOWS\system32>bash
-- Beta feature --
This will install Ubuntu on Windows, distributed by Canonical
and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Windows Store... 100%
Extracting filesystem, this will take a few minutes...
Error: 0x80070005
Press any key to continue...

Machine details:

Edition: Windows 10 Enterprise
Version: 1703
OS Build: 15063.674

I tried a bunch of suggestions given here but no use.

@scimax
Copy link

scimax commented Oct 4, 2018

I got the same error when running
wsl
in elevated powershell. The same happens when typing bashin the prompt.

If I do the same as a normal user, it tells me that no distros are installed. But Ubuntu and suseLEAP are listed in the start menu and the installation via the store worked fine.

When starting ubuntu, an error message appears, and I figured out that the system tries to get access to a path to which it should not have access. I posted that here. Does someone know whether the issues are related?

@pkeir
Copy link

pkeir commented Oct 8, 2018

Same issue for me. Most recent Ubuntu on 64-bit Windows 10 Enterprise. Version 10.0.16299 Build 16299.
It's been with me for a few months now; sadly drifting back to Cygwin...

@shipof123
Copy link

I also had the same error:
Build: 18262.rs_prerelease.181012-1414

@chriswolf-nrg
Copy link

chriswolf-nrg commented Dec 10, 2018

Recursively deleting %localappdata%\lxss\temp worked for me, but I had to boot into safe-mode to do it due to permission errors (even as administrator). That temp directory gets recreated upon starting bash again.

This may or may not have anything to do with it, but this 0x80070005 error happened right after my active directory password expired and I was forced to change it.

Windoze: Version: 1703, Build: 15063.1356
WSL: Ubuntu 16.04.4 LTS

@maphew
Copy link

maphew commented Dec 23, 2018

I got this error running bash with Win10 Enterprise version 1803, build 17134.407.

Performing one-time upgrade of the Windows Subsystem for Linux file system for this distribution...
Error 0x80070005

The solution was to run Bash as Administrator. When I did that the one-time upgrade worked, and then I can launch bash normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests