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

Bash.exe hangs and the bash is unusable #703

Closed
denru01 opened this issue Jul 30, 2016 · 54 comments
Closed

Bash.exe hangs and the bash is unusable #703

denru01 opened this issue Jul 30, 2016 · 54 comments

Comments

@denru01
Copy link

denru01 commented Jul 30, 2016

Please use the following bug reporting template to help produce actionable and reproducible issues:

  • A brief description: bash.exe hangs and never finishes
  • Expected results: A workable "Bash on Ubuntu on Windows"
  • Actual results (with terminal output if applicable): An unusable "Bash on Ubuntu on Windows" (empty, black window) and a never finished bash.exe
  • Your Windows build number: 14393
  • Steps / commands required to reproduce the error: just install WSL and run bash.exe
  • Strace of the failing command
  • Required packages and commands to install

See our contributing instructions for assistance.

I am using the build 14393 and I encountered two problems:

  1. When I switched to developer mode, I got the error "Developer mode package failed to install. Error code 0x80004005".
    I have tried
    http://answers.microsoft.com/en-us/windows/forum/windows_10-update/error-0x80004005-window-10-update-failure/156adfb8-e7e1-46fa-b5c6-cbd5dcfebbb9
    http://forums.hololens.com/discussion/1530/fix-enabling-windows-10-developer-mode-get-error-code-0x80004005-after-build-14383
    Neither worked.
  2. I turned on "Windows subsystem for Linux" via "Control Panel -> Programs -> Turn Windows features on or off" and switched to developer mode (with that error in problem 1). I can successfully run the program bash.exe and get the "Bash on Ubuntu on Windows". However, bash.exe hanged for more than 1 hour after I entered my password and it showed "the password is updated successfully". It never finished and when I clicked "Bash onUbuntu on Windows" it just gave me an empty window. When I tried to run "lxrun /uninstall /full" to uninstall it and installed it again. It just showed uninstalling and never finished again.

How can I solve these? My device is SP4 i7/16GB/512GB.
Thanks.

@benhillis
Copy link
Member

Do you by chance have multiple NT page files on your system?

@denru01
Copy link
Author

denru01 commented Jul 30, 2016

Hi benhillis,

I don't quite understand what is "NT page files" and how can I know whether I have multiple NT page files.
After uninstalling and installing WSL for several times, I am able to uninstall Bash by using "lxrun /uninstall /full". Howerver, I try to run bash again and it still hangs after showing "passwd: password updated successfully" (it already takes more than 1 hour).

"-- 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...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: James
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
"

Thanks.

@fpqc
Copy link

fpqc commented Jul 31, 2016

Control Panel > System > Advanced > Performance > Advanced > Virtual memory Change...

Should list all Windows pagefiles.

@denru01
Copy link
Author

denru01 commented Aug 1, 2016

The setting is "Automatically manage paging file size for all drives".
And only in C: there are paging files. (but it does not show whether there is only 1 or not).
Thanks.

@benhillis
Copy link
Member

Do you happen to have Kaspersky Internet Security or another Third Party firewall installed? I've seen instances like #705 where this can cause issues.

@denru01
Copy link
Author

denru01 commented Aug 1, 2016

Thank you, benhillis.
You are correct.
I have tried to disable Kaspersky, but Bash still did not work.
Following the comment in #705, when I "closed" Kaspersky, it works!

@benhillis
Copy link
Member

Thanks for confirming. Does anybody have a contact with Kaspersky so we can sync up with them and figure out why they are blocking our pico processes?

@denru01
Copy link
Author

denru01 commented Aug 2, 2016

I found this contact link online:
http://support.kaspersky.com/us/b2c#region0

@Lapasos
Copy link

Lapasos commented Aug 2, 2016

I had the same issue.
Also when I "closed" Kaspersky, it works fine.

@ioweb-gr
Copy link

ioweb-gr commented Aug 3, 2016

I've contacted Kaspersky regarding the issue and they've forwarded my input to their HQ.

@degoya
Copy link

degoya commented Aug 3, 2016

i just talked to the technical support, the girl on the line didn't know what the linux subsystem is.
now i will get contact by mail :)

@freightrunner
Copy link

image
I'm having a different problem, no matter what I try it always hangs on "extracting filesystem.." for eternity. Anyone have any ideas?

Not using Kapersky, using Avast - I have it disabled but that's not working either.

Thanks in advance

@freightrunner
Copy link

To anyone else having this issue - you need to uninstall avast if you have it on your computer. See #718

@ioweb-gr
Copy link

ioweb-gr commented Aug 4, 2016

A new update from Kaspersky, it seems we've stumbled upon a bug in their 2017 version which they'll resolve asap so I guess we just have to be a bit patient.

@wordelma
Copy link

wordelma commented Aug 5, 2016

I have done this twice now. It hung for hours on "Extracting filesystem, this will take a few minutes..." Without stopping it, I started a new (admin) command window and typed "bash". This told me to "Please create a default UNIX user account by running lxrun.exe /setdefaultuser. I did this, and it set the password and updated it successfully. Then, I could launch bash from the start menu or from the taskbar and it basically worked fine (as far as I could tell). So, yes, the installer can hang and this a bug, and I'm hoping they will fix this soon, but, nevertheless, in my experience you can get going with bash on Windows 10 anyway.

@wullxz
Copy link

wullxz commented Aug 6, 2016

Just a side information about Antivirus like Kaspersky: I've had that problem often, that Kaspersky (and other AVs) are blocking something and don't stop blocking even though they're deactivated.
If you ever run into issues with AVs, stop or uninstall them completely to verify that it's or it's not the AV.

@askmrsinh
Copy link

Facing the same issue. Only uninstalling the AV software worked.

@BoardWatcher
Copy link

There is a process manager called LsxxManager which controls Bash. I too have Kaspersky, and when disabling the AV, the Bash command was still a blank window. Recycling this service fixed Bash. You can find it under the Services tab in Task Manager.

@c-lipka
Copy link

c-lipka commented Sep 1, 2016

I was also seeing problems with bash and Kaspersky (KIS 2016 in this case); after querying the new password, bash fell silent; closing the window and restarting bash didn't help either.

Closing Kaspersky (KIS 2016) I found that I could run bash successfully, so it seems Kaspersky is indeed to blame.

The good news: Next thing I did was to close bash, restart KIS, and try again, just for giggles -- and now it appears to work just fine, even with Kaspersky running.

Edit: You know what -- scratch that. Possibly after doing something trivially wrong (tried to mv a directory while it was opened by Windows Explorer) the Blocked Bash is back with a vengeance: Now it won't even run with KIS shut down.

I guess for now I'm back to VirtualBox.

@erichiller
Copy link

Same here, multiple times now I mave tried to mv <dir> <dir> and it just locks up ^C does nothing too. The only antivirus I have is Windows Defender

@fpqc
Copy link

fpqc commented Sep 5, 2016

Btw are you guys getting this using tmux? I've had tmux lock up the whole WSL and leave it unusable and unkillable til reboot.

@erichiller
Copy link

@fpqc - no - but I am within ConEmu, or at least I was just now, I think other times I had been right within powershell though.

@fpqc
Copy link

fpqc commented Sep 6, 2016

@erichiller hm, my lockup was happening inside of an X terminal running tmux, but I'm also on yakkety, so idk what the problem could be. I'll see if it continues to happen without running tmux.

@ilyaigpetrov
Copy link

ilyaigpetrov commented Sep 6, 2016

On non-system disk G: mv foo/ bar hangs, but mv foo bar doesn't!
AV uninstalled, Windows Defender's real time and cloud based protections are off, paging file is system managed on C: and None on G:.
Only system reboot helps, relaunching bash or sing out/in doesn't work, stopping LxssManager service takes forever.

bash-for-win-hangs

@ghost
Copy link

ghost commented Sep 6, 2016

Seeing same issue a couple people were having above.

Cannot mv mydir/ newdir, you have to do a mv mydir newdir without the slash. Otherwise I get some garbled characters mixed in with the directory names during the move, so fails.

Also, I attempted to move a directory structure from one location to another and bash just hung. I cannot launch any new bash shells, they all just hang. After killing off all bash.exe, still hangs. Guessing I have to reboot to get it working again.

This system is cool, but it doesn't seem to be ready for prime time if a basic mv operation doesn't even work. Gonna power up my real VM so I can get something done. I'll try back in a few months.

@onomatopellan
Copy link

onomatopellan commented Sep 6, 2016

If it hangs after using mv then you probably did hit this bug. #765

This only happens on Anniversary Update, it was already fixed on Insider builds.

@chathurawidanage
Copy link

Disabling page files in multiple partitions fixed the issue for me. At least there is no need of reinstalling the subsystem. Just disable page files in multiple partitions.

@chathurawidanage
Copy link

@Martmists Do you have page files enabled in multiple partitions?

@Martmists-GH
Copy link

It's set to System Managed on C:/ and None for D:/

@sunilmut
Copy link
Member

I am marking this as duplicate of #475. See #475 for further details.

@Martmists-GH
Copy link

Fixed mine by reinstalling and waiting about 3 hours

@odvios
Copy link

odvios commented Nov 23, 2016

I have no AV other than Windows Defender.

Bash hangs even after multiple restarts.
I'm running build 14393.447.
It seems to have started after I attempted to mv a directory: eg. mv foo/ bar/

@nojaf
Copy link

nojaf commented Nov 28, 2016

Having the same problem as odvios. Got an error unduring uninstall

C:\WINDOWS\system32>lxrun /uninstall /full
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: 0x80080005

@lumen82
Copy link

lumen82 commented Feb 9, 2017

Having the same problems whit you two !!! @odvios @nojaf

@adrianchifor
Copy link

Had nothing to do with AV for me. Just make sure that in any startup script (.bashrc) you don't run anything that contains ~.

@sunilmut
Copy link
Member

sunilmut commented Mar 2, 2017

@adrianchifor - Thanks for your post. Can you give an example of what you put in .bashrc that contained ~, which hosed your bash? On Insider build 15046, I added some simple shell scripts to .bashrc with a path containing ~ and it worked fine.

@sunilmut
Copy link
Member

sunilmut commented Mar 2, 2017

@nojaf and others who are seeing error 0x80080005, can you try deleting the %localappdata%\lxss\temp folder and seeing if that makes a difference?

@t0069p
Copy link

t0069p commented Mar 12, 2017

gvfs command such as gvfs-move gvfs-rename works just fine. Alias mv to gvfs-move, then one may use mv as before

@briglx
Copy link

briglx commented Mar 24, 2017

  • A brief description: Copying folders caused bash.exe to hang and now opens to a blank screen
  • Expected results: A workable "Bash on Ubuntu on Windows"
  • Actual results: Empty, black window
  • Your Windows build number: 14393.953
  • Steps / commands required to reproduce the error:

@fpqc
Copy link

fpqc commented Mar 24, 2017

@briglx Switch to insiders or wait until the April release of CU. We're already at the "release preview" stage for CU (timebomb and evaluation text have been removed).

image

Build 1703 means that the final fork from the development branch was made in March. We're fast-approaching the next release (likely some time in April, going by the AU release schedule (1607 means July 2016, RTM in August with selected rollouts, and general availability by September iirc).

@jtanton
Copy link

jtanton commented May 16, 2017

This is still an issue post April CU. I started a mv dir1 ../ and it froze.

@benhillis
Copy link
Member

@jtanton - Are you certain you're on Creators Update? Can you run ver from the windows command line and paste the output?

@jtanton
Copy link

jtanton commented May 16, 2017

Microsoft Windows [Version 10.0.14393]

@fpqc
Copy link

fpqc commented May 16, 2017

^that's AU. CU should be 10.0.15063.

@ideal2545
Copy link

I'm also getting the 0x80080005 on Windows 10 Creators Update (running in VMWare Fusion)

@csteres-cpi
Copy link

I have been using Ubuntu for Windows on Windows 10 for nearly a year. Today, I tried to mv a directory and the command hung. I exited the bash window and tried restarting, but never get a bash prompt. Also running "bash" directly from a Windows command window hangs indefinitely. I have rebooted Windows, closed all other applications, disabled Windows Defender; I have also tried uninistalling with "lxrun /uninstall", both with and without the "/full" flag, but after confirming the uninstall, the command thinks for a few seconds and reports "Error: 0x80080005". I found this issue here but it does not really seem relevant. Any suggestions on next steps?

@fpqc
Copy link

fpqc commented Nov 20, 2017

@csteres-cpi update to win 10 fall creators update. You hit a bug that is a year and a half old.

@kalexmills
Copy link

Same issue here. Bug is a year and a half old, eh? Guess it is time to update.

@odick
Copy link

odick commented Mar 29, 2018

Currently I'm using bash to develop web apps, when some script on bash hang, I always restart the pc.
Because force close the terminal and start bash again, it still not working, but it will work if the PC restart
How to restart bash only when it's hang without log out or restart windows? Like using Ubuntu on hyper V

@kevinn
Copy link

kevinn commented May 7, 2018

Starting having this behavior as well.

Win10 Home
Version 1803
OS Build 17134.1

I launch bash with "Bash on Ubuntu on Windows" shortcut. CLI window launches but hangs with a title "Select bash on Windows". Blank cli, no bash prompt, cannot close the window. I can open another instance and bash prompt will show successfully. But cannot close or terminate the first window.

After a system restart then it'll work on launch.

Should've saved a screenshot but will amend this comment when it happens again.

@WSLUser
Copy link

WSLUser commented May 7, 2018

@kevinn If it happens again, instead of rebooting, try running as elevated. This worked for me which it showed up yesterday on my personal machine.

@therealkenc
Copy link
Collaborator

The OP here was "Developer mode package failed to install. Error code 0x80004005" with the fault placed on Kasperov/Avast, for better or worse. Duped #111 by Sunil.

@kinpol
Copy link

kinpol commented Sep 19, 2019

Hope it can help. My av software recognized file of "c:\windows\Temp" as a abnormal file and isolated it. then you know, bash is stuck. And by restoring file to system, everything works well. What a beautiful day!!!

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

No branches or pull requests