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

wsl hangs while doing operations on windows drives from linux #2613

Closed
Jivko1212 opened this issue Oct 27, 2017 · 26 comments
Closed

wsl hangs while doing operations on windows drives from linux #2613

Jivko1212 opened this issue Oct 27, 2017 · 26 comments

Comments

@Jivko1212
Copy link

I had several hangs while doing operations such as running a devops python script that copies files between directories. Here is how starting ubuntu looks after hanging:

capture

Bash cannot be killed from Task Manager or Process Explorer. The problem seemed really easy to trigger when I was working on a TrueCrypt drive. I assumed it might have something to do with TrueCrypt and unlinked it. Then it also happened on a regular drive that is linked in my home directory in linux.

My windows ver is: [Version 10.0.16299.19].

The hang is fixed by a system restart. One time, when I did system restart the system needed to be turned off from the power button because it hanged on restarting. Other times Windows restart worked ok.

Let me know if I can send any logs or additional information.

@Jivko1212
Copy link
Author

To leave an update. The problem does not occur if I used the linux filesystem, only when I symlink window drives and operate on them.

@rhinoceraptor
Copy link

This happens to me as well using Node, working in the Windows file system from WSL. NPM installs fail almost every time once WSL has been running for more than a couple minutes. I end up having to completely shut down and re-start my development environment several times a day.

Doing an rm -rf node_modules has killed my entire PC about a dozen times in the past month or so. I'm also running 10.0.16299.19.

Something is seriously busted with the file system in WSL.

@rhinoceraptor
Copy link

I just had to reboot my PC for the second time today due to disk intensive operations breaking WSL.

Maybe 2018 will be the year of the Windows desktop, when Windows is finally stable enough to use as a functioning workstation for developers. In the meantime, I would recommend Linux if you want a stable desktop OS with good software compatibility :)

@Jivko1212
Copy link
Author

Jivko1212 commented Nov 1, 2017 via email

@therealkenc
Copy link
Collaborator

It is very annoying that the bash process cannot be killed via task
manager.

I had hoped for a /nukeinstance feature back in September 2016, #1086 (message), which would unceremoniously tear down the stack as a last resort (like a hard reboot). Basically the equivalent reloading the lxcore/lxsys drivers and restarting LxssManager. Just linking for posterity; it doesn't help your instant problem, but I had the similar feeling back when I was having to reboot my machine. Back then the root problem with mv was ultimately addressed and the killswitch idea quietly faded. It would probably not be straightforward to implement such a thing. Or, that's what I've assumed anyway.

@BladeMF
Copy link

BladeMF commented Dec 11, 2017

I too have experienced such hangs from doing file system operations. One instance I traced to be trying to use chown/chmod, which caused it 100 out of 100 times.

@BladeMF
Copy link

BladeMF commented Dec 12, 2017

Guys, please check if you have a windows junction somewhere in the path passed to rm -rf or chown. I've had problems with both leading to freezes. The workaround is to use a Linux symlink. I've posted the issue here: #2746

@superherointj
Copy link

superherointj commented Dec 13, 2017

When running Webpack/BuckleScript on watch mode, WSL crashes, and won't start to Bash prompt, only recovers after a few restarts.

WSL Ubuntu
Version 10.0.16299 Build 16299

@rhinoceraptor
Copy link

My machine just crashed two times in a row doing a rm -rf node_modules inside of the WSL FS.

@sunilmut
Copy link
Member

@rhinoceraptor - If you can follow the instruction from here for BSOD's, that would be great.

@superherointj - Can you please post the Windows ver (ver from a CMD) and the repro steps, that would be useful?

@superherointj
Copy link

@sunilmut Screenshots of problem:

ubuntu-wsl-error

Current way to reproduce problem is to just use bucklescript/webpack in my project and eventually it crashes WSL with error: 0x80070040. I can't say exactly what is causing this.

Workaround is to restart computer several times. And WSL works again after a few attempts.

@WSLUser
Copy link

WSLUser commented Jan 21, 2018

1/20: I would like to add to this discussion that it's not just bash that's the issue. Any linux process found in Task Manager is unable to be killed in the Task Manager. Nor does using taskkill /im some_linux_process /t /f Interestingly enough, Using PS tools, specifically ./pskill -t PID of the linux process says "Process PID killed." but when you look in Task Manager, it's still there. I tried using the name of the process instead but it just hangs. This is both CMD and Powershell. From what I've researched, you've have to kill the process using Linux but since WSL hangs, I can't get into Ubuntu or OpenSuse to kill it. In fact, I tried to reinstall both distros and the install portion fails. (Figured if the distros were uninstalled, the process would die because the path no longer exists to execute) but the process still lives. I'm going to try that restart computer several times workaround mentioned above and hope it works. Oh and for purpose of record, the specific process I'm having issues with is qdbus which is generated by QT Creator. Apparently it can cause WSL to hang when it randomly crashes. First major breakage I've experienced (usually stayed away from doing things that cause known issues like the plague).

1/23: Update: Verified the workaround works. Recommend rebooting without logging in at least 4 times (I did 6) as logging in seems to keep it persisting.

@rivaros
Copy link

rivaros commented Jan 23, 2018

hangs

@rivaros
Copy link

rivaros commented Jan 23, 2018

Another one. Yes I use symlinks from Windows.

@codehtmai
Copy link

I am also seeing this issue when developing with Node/Webpack in WSL but the code directory in Windows. I'm on Version 10.0.16299.371.

@jamezrin
Copy link

This also happens to me when using Node or Ruby, I'm on 17713

@WSLUser
Copy link

WSLUser commented Aug 13, 2018

This was fixed in 17134. I'm able to kill any process I want under Task Manager, including init. So it appears there was a regression (hope it's fixed before next stable or I'll be forced to stay with current stable).

@mtwilliams
Copy link

This is affecting me on my workstation. I'm on 17134. Not using symlinks or junctions, just prodding a few files with Python. Seems like all I/O eventually dies.

@superherointj
Copy link

superherointj commented Feb 1, 2019

#2746
Was this fixed in #2746?

"I was not able to reproduce this in 17711, and I suspect this is fixed in 1803 (17134). Please reopen if you can hit this on 1803."

Please try to reproduce this bug in 1803. And report back.

@therealkenc
Copy link
Collaborator

Let's call it #2746 for lack. There is no repro for "running a devops python script that copies files between directories" out of the gate.

@innovoix
Copy link

innovoix commented Mar 22, 2019

WSL hangs (is idle) on first launch of WSL "WSL is installing, this can take a few minutes" and when installing software with apt (apt install). Installation starts but stops in the middle of some operation, I can proceed by hitting enter key. This happens frequently even when running other types of commands.

@emretuna
Copy link

Add your project dir and C:\Users\username\Appdata\Local to Windows defender exclusion list.
It helps on some cases but not a permanent fix.

@GiancarloZ
Copy link

Was there a fix for this? I am having same issue with Ubuntu in general. I've uninstalled both VS COde and Ubuntu several times. Still have issue. Have only ubuntu installed, when open it works for few seconds/minutes and then it hangs and mutliple init, or bash, or env open in task manager making cpu 100%.

@lukasrusty
Copy link

lukasrusty commented Mar 2, 2020

Exactly the same behavior for me as for @GiancarloZ .

Couple minutes everything works. Then when opening bash or running command from already opened terminal - hangs, CPU usage 100%, bash and init processes cannot be killed. Only restart helps. Very frustrating.

The issue started today.

Enable/disable Windows Subsystem for Linux, reinstall of Ubuntu didnt help.

@GiancarloZ
Copy link

@lukasrusty I just tried using Debian instead of Ubuntu thinking that was the issue and I got the same problem. Maybe its the windows 10 Subsystem for Linux?

@GiancarloZ
Copy link

@lukasrusty check out thread below. Seems to have solved the issue.....for now.

#4936

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

No branches or pull requests