Open jeremie-stripe opened 2 days ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.0. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
Thanks for the investigation! I'll add a check in there so we don't try to look at command lines that are so long.
You can turn off port discovery by setting "remote.autoForwardPortsSource": "output"
. We won't start watching the proc filesystem at all if that is set.
Does this issue occur when all extensions are disabled?: Not applicable
Steps to Reproduce:
Yeah so this is a fun one.
We have machines where we run VSCode that also happens to be running Java processes with ridiculously long command lines (classpaths and all). When I say long I literally mean command lines with > 100K characters. Those processes also end up opening several TCP listening ports (> 10).
What we have noticed is that when starting a new VSCode session, the extension host process would literally sit there completely stalled out for a few minutes. Extension loading request would go unanswered and the extension host process would go at 100% CPU in
htop
. Then at some point it would unstick itself and proceed as normal.After playing with
prof
and Node.js built-in--prof
, the culprit turned out to be surprising:The important part is:
212869 99.2% RegExp: .*\.vscode-server-[a-zA-Z]+\/bin.*
This regex is from https://github.com/microsoft/vscode/blob/71f16d9c134289a9d2f1951faab4183eab41b59f/src/vs/workbench/api/node/extHostTunnelService.ts#L107-L111 (the
~y
minified symbol in the profile trace maps toknownExcludeCmdline
)The explanation seems to be that because VSCode will initialize this service eagerly when the EH process is started and run the discovery process eagerly, it will:
End result: it stalls out
I did not see a way to disable this functionality by CLI arguments nor by settings, since we don't need it and we may be a special case, having one would solve the problem.