-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Zombie extension hosts running at 100% #194477
Comments
Can you take a process sample from the OS activity monitor, I hope the native stack can give a clue to what is happening. |
Just happening. This is the command line of such an EH
|
@deepak1556 This the process sample EH-spin-sample.txt |
@connor4312 Not sure about the |
It looks like we set that for all local EH process launches. Just having inspect-port doesn't put the process in debug mode. What you can do is use the "Debug: Attach to Node.js Process" command and select that process. This will fail, since the debugger won't then know what port it's listening on (if --inspect-port isn't given in the args, it always listens on 9229, and js-debug assumes that is what happens). But, then you can find it. AFter doing so you could grab a performance profile using the edge/chrome devtools on edge://inspect, or by attaching to that using an attach-type launch config VS Code and using the "take performance profile" command -- if the spin sample you recorded above isn't enough for Deepak to figure out what's going on. |
Does that use SIGUSR1? Asking cos I have tried that first and sending the signal kills the process. From the crash dumps we do know that the process already was shutting down |
Attaching the symbolicated sample EH-spin-sample-symbolicated.txt Going from the top, Moving further down most of the sample time is spent in There is another data point looking back at the screenshot from #194477 (comment), the zombie EH processes are titled
|
I attempted to setup a similar flow based on the stack with base Electron app but the utility process are cleaned up as expected. I can make a change in the destruction phase of the utility process to signal termination of isolate so that tasks which require to enter JS will not do so and I hope that resolves the long running draintask. I won't be able to make a new insiders build with this change until I am back from vacation but I can provide a custom electron build for local testing with OSS. @jrieken would that help to validate incase you face similar issue with OSS as well ? |
Ah, my bad, skimmed over that part. Disregard. (Yes, it sends SIGUSR1 on unix) |
I am seeing this for |
Having the exact same issue. utility-process is running at 100% all the time on M1 Max, very annoying. |
This bug might also exist in Linux build of vscode: (6% * 16 cores = 96%) Command line of "utility-process" is:
eu-stack of main thread of this process:
Noticed that |
Manually sampling with eu-stack running every second, for one minute. (And might related to nodejs/node#47748 and nodejs/node#47452) |
This comment was marked as spam.
This comment was marked as spam.
Thanks for the logs @taoky , the stack does look related. I wouldn't be surprised if the issue is also present on Linux since the shutdown path is same for both. |
Similar issue on my M1 Max, sometimes I observe even 3/4 zombie processes running in the background and have to kill them manually from process manager to stop them from draining battery. 2 more samples for such process: |
Checked log and it looks weird.
However, PID 1331811 still exists and is running at 100%. |
Another hang process today with log:
"Extension host with pid 1706525 started" =>
"Extension host with pid 1706525 exiting with code 0" =>
"Extension host with pid 1706525 exited with code: 0, signal: unknown." =>
|
Is there any temp workaround? any script or bash command that we can run to identify and kill those pid? I am interested to do it manually, because i have a M2 and i am rebooting my macbook after some hours because get soooo slow |
Restarting VS Code should already "fix" the problem because the extension host is a child process of the application. At least that does the job for me. Are you observing a different behavior? Note that "Reload Window" does not kill the zombie process (according to my observation). |
@NullEnt1ty @fenvalle @taoky @Maktel @ClockRide @nzhl Please help by posting the list of installed extensions. I am looking for similarities between our setups as this is possibly caused by an extension. This is my list
To get this list run |
|
Thanks for looking into this! I am also facing this issue quite frequently. Here are my installed extensions:
|
|
Thanks everyone. Looks like the intersection is
|
code --list-extensions
|
Yep, I'm using those extensions too. Here's the full list:
|
Forcefully kill extension host processes if they still exist (fixes #194477)
Forcefully kill extension host processes if they still exist (fixes #194477)
#196809 is not a very good workaround: what if the process exits, but another innocent process just takes this PID? |
It probably cannot do that as the pid is still taken? I agree it's not a great workaround, but until the root cause is clear it does solve the issue where a cpu is occupied. |
The text was updated successfully, but these errors were encountered: