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

uriTransformer.js script uses 100% CPU when VS code connected to a remote SSH host via another SSH host #3857

Closed
tysonite opened this issue Oct 16, 2020 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH

Comments

@tysonite
Copy link

tysonite commented Oct 16, 2020

  • VSCode Version:
Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
  • Remote OS Version: Linux on OrangePI One
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial
$ uname -a
Linux 4.13.15-sunxi #1 SMP Tue Nov 21 23:35:46 MSK 2017 armv7l armv7l armv7l GNU/Linux
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Have SSH configuration in VS code:
Host intermediate_host
  HostName XX.XX.XX.XX
  User mkulin
  ForwardAgent yes

Host final_host
  User mkulin
  ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -q intermediate_host nc YY.YY.YY.YY 22
  1. Connect to a final_host using VS code

  2. Observe high CPU usage. It is not happening if connected directly to final_host without proxying through intermediate_host. Also, surprisingly, it is possible to open, edit and save files.

The process that eats CPU:

mkulin   15442 15327 95 13:43 ?        00:01:52 /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/server/uriTransformer.js

image

No high CPU usage observed in process explorer:
image

Enabled extensions:
image

Log (Window) has repeating message like that:

[2020-10-24 19:49:06.175] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
[2020-10-24 19:49:06.176] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] waiting for 5 seconds before reconnecting...
[2020-10-24 19:49:11.176] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] resolving connection...
[2020-10-24 19:49:11.176] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] connecting to 127.0.0.1:49276...
[2020-10-24 19:49:11.997] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] reconnected!
[2020-10-24 19:49:28.141] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:200:27)
[2020-10-24 19:49:32.000] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
[2020-10-24 19:49:32.000] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] waiting for 5 seconds before reconnecting...
[2020-10-24 19:49:37.011] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] resolving connection...
[2020-10-24 19:49:37.011] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] connecting to 127.0.0.1:49276...
[2020-10-24 19:49:37.835] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] reconnected!
[2020-10-24 19:49:53.993] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:200:27)
[2020-10-24 19:49:57.842] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
[2020-10-24 19:49:57.843] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] waiting for 5 seconds before reconnecting...
[2020-10-24 19:50:02.844] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] resolving connection...
[2020-10-24 19:50:02.844] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] connecting to 127.0.0.1:49276...
[2020-10-24 19:50:03.656] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] reconnected!
[2020-10-24 19:50:19.851] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:200:27)
[2020-10-24 19:50:23.660] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
[2020-10-24 19:50:23.661] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] waiting for 5 seconds before reconnecting...
[2020-10-24 19:50:28.664] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] resolving connection...
[2020-10-24 19:50:28.664] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] connecting to 127.0.0.1:49276...
[2020-10-24 19:50:29.485] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] reconnected!
[2020-10-24 19:50:45.672] [renderer1] [error] read ECONNRESET: Error: read ECONNRESET
	at TCP.onStreamRead (internal/stream_base_commons.js:200:27)
[2020-10-24 19:50:49.493] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
[2020-10-24 19:50:49.494] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] waiting for 5 seconds before reconnecting...
[2020-10-24 19:50:54.507] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] resolving connection...
[2020-10-24 19:50:54.507] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] connecting to 127.0.0.1:49276...
[2020-10-24 19:50:55.322] [renderer1] [info] [remote-connection][ExtensionHost][a915e…][reconnect] reconnected!

Few errors in log of remote SSH server:

$ cat .vscode-server/.d2e414d9e4239a252d1ab117bd7067f125afd80a.log


[13:04:59] Extension host agent started.
Error: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/spdlog/build/Release/spdlog.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1021:18)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at Module.patchedRequire [as require] (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/spdlog/index.js:3:35)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at Module.patchedRequire [as require] (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at t.load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:17:960)
    at e.load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:13:941)
    at o (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:31:189)
    at Object.errorback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:31:313)
    at e.triggerErrorback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:14:306)
    at /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:14:10
    at ReadFileContext.callback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:18:342)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13) {
  phase: 'loading',
  moduleId: 'spdlog',
  neededBy: [ '===anonymous3===' ]
}
[13:05:04] [10.134.10.161][c2d1306a][ManagementConnection] New connection established.
[13:05:04] [10.134.10.161][377814fe][ExtensionHostConnection] New connection established.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
tput: No value for $TERM and no -T specified
[13:05:07] [10.134.10.161][377814fe][ExtensionHostConnection] <4674> Launched Extension Host Process.
EXTHOST-LOG:::::
["Error: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/spdlog/build/Release/spdlog.node)\n    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1021:18)\n    at Module.load (internal/modules/cjs/loader.js:811:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:723:14)\n    at Function.t._load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/server/remoteExtensionHostProcess.js:1082:776)\n    at Function.i._load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/server/remoteExtensionHostProcess.js:1052:486)\n    at Module.require (internal/modules/cjs/loader.js:848:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at bindings (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/bindings/bindings.js:112:48)\n    at Object.<anonymous> (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/spdlog/index.js:3:35)\n    at Module._compile (internal/modules/cjs/loader.js:955:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)\n    at Module.load (internal/modules/cjs/loader.js:811:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:723:14)\n    at Function.t._load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/server/remoteExtensionHostProcess.js:1082:776)\n    at Function.i._load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/server/remoteExtensionHostProcess.js:1052:486)\n    at Module.require (internal/modules/cjs/loader.js:848:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at t.load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:17:960)\n    at e.load (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:13:941)\n    at o (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:31:189)\n    at Object.errorback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:31:313)\n    at e.triggerErrorback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:14:306)\n    at /home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:14:10\n    at ReadFileContext.<anonymous> (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/out/vs/loader.js:18:342)\n    at ReadFileContext.callback (/home/mkulin/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/node_modules/graceful-fs/graceful-fs.js:115:16)\n    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13)"]

Also, the same issue as in #3848 observed.

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Oct 16, 2020
@bamurtaugh bamurtaugh added the bug Issue identified by VS Code Team member as probable bug label Nov 4, 2020
@roblourens
Copy link
Member

roblourens commented Nov 6, 2020

I think that is the real error, version 'GLIBCXX_3.4.22' not found

Do you know if you have an older version of this available that was used in earlier vscode, do we require a newer version now, @deepak1556 do you know?

@roblourens roblourens added the info-needed Issue requires more information from poster label Nov 6, 2020
@tysonite
Copy link
Author

tysonite commented Nov 7, 2020

Yeah, on my OrangePI, libstdc++ has only those versions:

$ strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBC_2.4
GLIBC_2.18
GLIBC_2.17
GLIBCXX_DEBUG_MESSAGE_LENGTH
$ dpkg --list|grep libstdc++6
ii  libstdc++6:armhf                   5.4.0-6ubuntu1~16.04.12                    armhf        GNU Standard C++ Library 

@roblourens
Copy link
Member

This is probably related to #2998

@tysonite
Copy link
Author

tysonite commented Nov 13, 2020

I could test vscode-server if you give me it built against GLIBC <= 3.4.21 for armv7l.

@mariokostelac
Copy link

I see the same problem connecting from OS X to amazon linux Linux a-2zurb4h4bbny 4.14.203-156.332.amzn2.x86_64 #1 SMP Fri Oct 30 19:19:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux.

Is there any debug information I can provide to help resolving this?

It happens both when I use the ssh option or remote into a container on that Linux machine.

@deepak1556
Copy link

underlying issue is narrowed down in #2998, lets continue the discussion there.

@deepak1556 deepak1556 added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Nov 17, 2020
@RoyCohay
Copy link

This solves the 100% CPU issue.
Go to extension and mark this option 'off'.
image

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

6 participants