WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Bash install hangs at "Extracting Filesystem"

Open tigerhawkvok opened this issue 10 years ago • 68 comments

It's been sitting on this for over 30 minutes

image

It sat there for a few hours the other day, and via this post I restarted and ran lxrun /uninstall /full before running bash again, which has repeated.

tigerhawkvok avatar Jun 22 '16 20:06 tigerhawkvok

Could you try to run this command and share the output?

bash.exe -c "ps auxf"

benhillis avatar Jun 22 '16 20:06 benhillis

21 minutes after typing the command ...

image

Even running it as an admin this time, in case it helped.

tigerhawkvok avatar Jun 22 '16 20:06 tigerhawkvok

Bash is apparently trying to do something, but not much?

image

Would a dump file of either bash or bash.exe be helpful?

Build 14367

image

tigerhawkvok avatar Jun 22 '16 20:06 tigerhawkvok

Something looks hung, could you try the command I suggested?

bash.exe -c "ps auxf"

Also, I noticed you're not using cmd.exe. Which terminal are you using? It's possible something is going wrong because of that. I can give it a try locally and see if I can reproduce your issue.

benhillis avatar Jun 22 '16 21:06 benhillis

I did run the command if you check the screenshot.

It's also cmd.exe, it's just in a terminal wrapper to give it tabs (ConEmu) with an extension for line-completion (Clink)

bashhang

Could Cygwin conflict?

tigerhawkvok avatar Jun 22 '16 21:06 tigerhawkvok

@tigerhawkvok I don't think Cygwin is conflicting. I'd like to try to reproduce your issue using the terminal wrapper, what is it called? Have you tried installing without the wrapper?

What would be useful is a trace of the install. Tracing instructions below

  1. Download the below two .txt files and rename them .cmd
  2. Run start_lxcore_trace.cmd from an admin command prompt
  3. Launch the install
  4. Wait ~10 minutes.
  5. Run stop_lxcore_trace.cmd from an admin command prompt
  6. You should now see three .etl files in the directory you ran the script from.
  7. Email the logs to: [email protected]. Include in the subject / message to forward to the WSL team. In the body of the email mention it is for russalex.

https://github.com/Microsoft/BashOnWindows/files/288621/start_lxcore_trace.txt https://github.com/Microsoft/BashOnWindows/files/288622/stop_lxcore_trace.txt

benhillis avatar Jun 22 '16 22:06 benhillis

Also attaching here for ease of tracking. I use the ConEmu terminal wrapper: https://conemu.github.io/

lxcore_trace_dumps.zip

I doubt there's anything I'd consider sensitive in there that I haven't put in a public profile. Email has been sent!

I haven't tried without the wrapper, but I can disable auto-attach (eg, spawned windows are brought into the wrapper) and try again.

tigerhawkvok avatar Jun 22 '16 22:06 tigerhawkvok

@tigerhawkvok Thanks I'll take a look. Agreed our tracing is unlikely to have anything personally identifiable in it, it's really more of a chain of custody precaution which applies much more to full memory dumps.

benhillis avatar Jun 22 '16 22:06 benhillis

Here's another without Clink or ConEmu running

image

lxcore_no_conemu.zip

tigerhawkvok avatar Jun 22 '16 23:06 tigerhawkvok

@tigerhawkvok Thanks for providing the traces. Unfortunately the only thing I've been able to determine is the following:

  1. Our service is successfully creating an instance and our init process is launching.
  2. The init process successfully forks and execs /bin/bash

After this there are no breadcrumbs, /bin/bash is clearly hanging on something but I'm at a loss as to what. I will check with some other developers on the team to see if they have any ideas how we can further diagnose this.

benhillis avatar Jun 23 '16 23:06 benhillis

FWIW, on 14371 I renamed my Cygwin folders (to break their paths) then tried this again, to the same result.

tigerhawkvok avatar Jun 26 '16 03:06 tigerhawkvok

I ran into this same problem today (build 14366) and after waiting 30 minutes I pressed ENTER in desperation. 😄 That immediately caused what appeared to unflushed output to print and everything was installed successfully.

carolynvs avatar Jun 27 '16 19:06 carolynvs

After much effort I was able to debug this. We have a bug in our driver if you have more than 2 NT pagefiles on your system. Any of you that are experiencing this issue could you please try disabling all but one of your pagefiles and trying to launch bash?

See #358 and #538 for more info.

benhillis avatar Jul 01 '16 23:07 benhillis

That worked, but creating a user initially threw an error:

screenshot 2016-07-05 17 05 02

This was fixed by renaming F:/TempFolder/temp to F:/TempFolder/Temp. The creation script should check for the case of the actual temp folder before trying to write to it in a case-sensitive manner.

tigerhawkvok avatar Jul 06 '16 00:07 tigerhawkvok

WSL is in kind of a strange place because it's case sensitive and the rest of NT sometimes doesn't play nicely. I have a change locally that will fix this.

benhillis avatar Jul 06 '16 00:07 benhillis

I confirm this issue installing Bash on build 14388, and disabling all pagefiles but one, fixed the problem.

gerardog avatar Jul 13 '16 23:07 gerardog

I just encountered this but only have a single pagefile. In fact, I have 'Automatically manage paging file size for all drives' checked. Build 14393.10.

Pressing Enter like @carolynvs suggested had no effect.

sysrage avatar Aug 03 '16 03:08 sysrage

@sysrage, please double check that the page file is set to 'none' on all drives except one and reboot. Leaving it as 'Managed by the system' one more than 1 drive caused this issue on my pc.

gerardog avatar Aug 03 '16 06:08 gerardog

I seem to have the same problem with version 14393, only have one drive and one pagefile.

I've noticed however that if I close the windows and run bash for windows it seems to work fine, however the default user is root and has no defined password.

defaultroot

Could this be related with the creation of users after install?

srctredien avatar Aug 03 '16 13:08 srctredien

Are you running Avast? I had the same problem, uninstalled Avast (disabling wont work) and now everything works perfectly.

freightrunner avatar Aug 03 '16 17:08 freightrunner