-
Notifications
You must be signed in to change notification settings - Fork 838
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
WSL2: init process consumes 100% #5285
Comments
Try Also if possible I recommend to uninstall the old Kali distro, run |
I would like to find out what the I had these issues in the past, but I couldn't keep that state permanent. I still have the same process sitting there after seven days now and could still get any additional information. |
@firewave - An empty strace usually means the program is spinning in usermode, typically a loop with a bad exit condition. Do you have any more detailed instructions so I can try to reproduce this locally? Any output in dmesg? Thanks! |
Thanks for the information. No idea how to reproduce it - it suddenly was like this. In the future I might come across something, but because of several issues I have to revert to WSL 1 soon, so I wanted to get all the possible information as long as I can.
I assume the socket ones are related to FYI the system is working "fine" aside from the one |
To rule out a faulty user profile try |
I experience the same thing on my wsl2 Ubuntu 18.04 distro. Also closing every terminal window or user process inside wsl2 doesn't help. Sorry that I can't be more specific... |
Hi. |
I too have issues with rogue /init processes consuming ~100% CPU, and I'm running an IntelliJ product as well. My "solution", so far, has been to kill the runaway processes using htop, so a little faster than restarting WSL, but not really a useful solution in the long run, as the offending processes seem to reappear. |
Also happening here on build 21390.2025 and 22000.100 (both on WSL2 Also interestingly, the rogue Here is the output of
As an additional note, it only happens on a single distro (in this case it is Ubuntu 21.04 server WSL image). I got several distros here, all started, but not actively used: only the Ubuntu 21.04 was used actively. Other distros are chilling at 0% CPU usage. |
@jamestut With |
I have this issue about once a day. I also use JetBrains products, and the project is on the WSL filesystem, opened via
I do not have a definitive repro yet, but it happens quite often to me. Let me know I anybody here has some idea what we could check. EDIT: The next day. I have the same morning routine, turn on the machine, open chrome, attend meeting, and fire up WebStorm on a Restarting WebStorm fixes it, that init process stops. What is interesting, if I close everything and shut down WSL2, and start WebStorm again, it does not happen again. It only happens after I reboot the laptop. |
I attached GDB to one of the runaway init processes, it looks like its stuck in a very short loop, around:
@onomatopellan please tell me what other information can I provide. |
I experience slowness in Git Extensions running on Windows with repo in WSL 2, init process in WSL consumes more that 100% CPU. I found an easy way to reproduce the issue: clone WSL2-Linux-Kernel and run 'git status' from Windows. In WSL2 Ubuntu:
In Windows console:
|
@tuhlmann said:
I am seeing that with Ubuntu 20,04. I closed PHPStorm (closely related to IntelliJ), and the problem went away. I think that they can be at least one cause for this problem. |
@derekrprice yep, it's their problem.. or just problem with communication between windows and WSL filesystem |
I've been having this issue as well. Windows 10 19044.1415 21H2. WSL 2. Kali-linux. |
Just as @PioPh described: opening a WSL tab in Windows Terminal causes 100% CPU usage by |
Yep exactly the same for me. Started about two weeks ago out of nowhere after a Windows update I believe. |
Same problem on my workstation, with ubuntu 18 and wsl2. Like @romkatv it just happens opening a tab in Windows Terminal |
I've asked my friends and it appears that the problem reproduces for everyone:
The version of Ubuntu doesn't seem to matter. It's possible that the choice of distro also doesn't matter. Edit: There is one more necessary step:
|
I had success fixing this with resetting the Userhome Path in Windows terminal to default and then back to my wsl Userhome. |
Confirmed. Opening a WSL tab in Windows Terminal when I've changed |
quick and dirty fix, waiting for the real fix:
|
Confirming that the Windows Terminal starting directory was the issue for me (WSL, Ubuntu 18.04): changing from If you use the "open windows from previous session" as your Windows Terminal startup mode, the issue will come back for any sessions that you started prior to fixing the starting directory. Close each of those and start new sessions once, then they should work correctly upon Windows Terminal restart. |
Fyi on none of my machines was I able to reproduce the issue for the past couple of months. High CPU usage stops after 1-2 minutes, it is practically indistinguishable from boot load in my case now (previously it didn't stop on itself, not even after 30 minutes). Edit: just after I wrote this, it started happening again, quite reliably, I am finding init processes with 19h CPU time even though I restart the machine every day. |
I think I've figured out the problem. I don't know what's wrong with Windows Terminal (I'm using Preview 1.12.3472.0), but here's how to work around it. TL;DRIn your Terminal profile, the starting directory must be Fix your shellNow, to fix how the shell is reporting the current working directory to Terminal. This is the directory that is used by Terminal for the Make sure you don't also have a DetailsIf the
|
I hava the same problem, and I didn't use any software about dirty solveI found some other ways, and it works fine for me:
Now I got a new problem that I can't use straceIt seems to fall into the dead cycle, looking forward to official solution
|
I agree with @kstauffer that the problem is related with the starting path. Init began to consume 100% of one CPU after I changed the starting path to /home/vlad. Therefore, I restored the old value and I just added a simple "cd" at the end of my .bashrc file. That was my workaround. |
@vvaltchev Did you try setting the starting path to the Windows equivalent of |
@kstauffer I just did. Using |
It seems there is two problems then, one with So if you have a problem with high CPU and are running an instance of PhpStorm WebStorm or any other jetbrains product from time to time, some git tasks or indexing task seems to get stuck, in which case restarting the stuck instance is enough to solve it Can't speak for |
I use JetBrains products also and I'm having the same issue with |
Hit this again today and What's even more scary is that it doesn't show up in the Task manager and this cpu usage is only visible with htop in wsl, so my computer was getting crazy hot to the point of burning and I couldn't figure out why. This seems like this could be a big security issue as well, as there is no visibility on the CPU usage of wsl from windows |
Okay, I have a suspicion, but nothing is proven yet. I started to think Jetbrains products can get stuck in some loop when using Git on the Windows host to analyze repositories on Today I had the CPU usage issue again, so opened up Procexp and saw that Webstorm was firing up many git subprocesses per second in a loop. Keep in mind, Webstorm is running on Windows, but the project files live in I just learned that Jetbrains has WSL2 git support, so I changed Webstorm settings to use git from WSL2 (as described here: IDEA-172253) and the problem went away for now. UPDATE: didn't take long, the CPU usage came back, so this seems to be a sidetrack. |
@sorgloomer it's unlikely this will solve the issue, as like you I'm running jetbrains from Windows on a project in WSL, but I've already always been using the git from WSL and not Windows and still had this issue. Except its even worse because then the cpu of WSL git doesn't show on Windows task manager |
I ran into the same issue (busy
successively then the rogue † I am not using JetBrains at all, and also I doubt it is due to Windows Terminal simply because such an issue never happened during my few months experience in Windows terminal. |
I came by the same issue. In my case the setup was the following:
Linux OS was Ubuntu 22..04.1 updated from 20.04 through I managed to overcome the issue by making a fresh install of Ubuntu 22.04.1 LTS from Microsoft Store as a second instance. That does not have any issues with the |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
I updated by Windows installation to 2004 and converted my existing Kali installation to WSL 2. Just leaving it running causes an
init
process to consume 100% CPU all the time. I already closed all applications which make use of my WSL instance (WSL shells, Docker and CLion) and the issue persists.When attaching
strace
to that process it just generates an empty log:My Windows version is 10.0.19041.264.
The text was updated successfully, but these errors were encountered: