microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.68k forks source link

`vsce-sign` pegging CPU as extension update hangs #210361

Open AwlsomeAlex opened 5 months ago

AwlsomeAlex commented 5 months ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Start an Ubuntu 22.04 (x86_64) VM locally on Apple Silicon Mac (I used OrbStack)
  2. Launch VSCode on macOS and remotely connect to it via SSH using VSCode
  3. Have an extension installed with an available update. Attempt to update the SSH-side extension.
  4. Let run for a couple... notice that macOS VM usage is at 100% utilization and that top on the guest reveals vsce-sign as the culprit.

I noticed that some extensions had updates and that the GUI says "Installing" but don't seem to actually being installed... gets stuck like that too. The number of processes seem to be the same as the number of "Installing" extensions.

    472 awlsome+  20   0  260.6g  76300  26240 S  24.3   1.9  14:05.48 vsce-sign      
    478 awlsome+  20   0  260.6g  77112  26368 S  24.3   1.9  14:05.46 vsce-sign      
    493 awlsome+  20   0  260.6g  76612  26240 S  24.3   1.9  14:05.28 vsce-sign      
    473 awlsome+  20   0  260.6g  76400  26240 S  23.9   1.9  14:05.48 vsce-sign      
image
xzhseh commented 4 months ago

I encountered the exact same issue with VS Code version 1.89.1 and macOS Ventura 13.3.

It happens when I'm sshing my local OrbStack instance (i.e., Ubuntu 22.04 X86_64) via VSCode, when the "remotely" installed extensions are being updated - they are simply hanging there saying "installing", with a 100% usage CPU core of "vsce-sign" (could be monitored by htop or top).

After manually kill -9 <pid> the corresponding processes (i.e., vsce-sign), VSCode prompts for re-connect - everything is now good after reloading the window.

masalim2 commented 4 months ago

I am experiencing the same issue. Noticed after it began draining battery rapidly on my development machine.

Running the following VS Code build:

Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

With Remote-SSH opened in one Orbstack Ubuntu VM, top in the VM shows two vsce-sign processes with CPU pegged at 100%, even after the VS Code application is closed on the host:

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1683 misha     20   0  260.7g  75296  25728 S 100.0   0.6     33,58 vsce-sign
   1625 misha     20   0  260.9g  75500  25856 S  99.7   0.6     33,58 vsce-sign