microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.64k stars 285 forks source link

[Remote-SSH Bug]: find GLIBC >= v2.28.0 (but found v0.9000.0 instead) #10089

Open crrodriguez opened 2 months ago

crrodriguez commented 2 months ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It doesn’t connect successfully (same error message)

->

glibc version is 2.40 (release right now)

Expected Behavior

You should never ever compare glibc versions from distribution packages or by parsing any tool's options.

Steps To Reproduce

Upgrade glibc or have a slightly custom version applied.

Remote-SSH Log

Remote-SSH Log

``` [11:57:20.505] Log Level: 2 [11:57:20.535] VS Code version: 1.91.1 [11:57:20.536] Remote-SSH version: remote-ssh@0.113.2024072215 [11:57:20.536] win32 x64 [11:57:20.544] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a2274756d626c6577656564766d2e6c6f63616c222c2275736572223a226372726f6472696775657a227d", attempt 1 [11:57:20.544] "remote.SSH.useLocalServer": false [11:57:20.544] "remote.SSH.useExecServer": true [11:57:20.545] "remote.SSH.showLoginTerminal": false [11:57:20.545] "remote.SSH.remotePlatform": {"tumbleweedvm.local":"linux"} [11:57:20.545] "remote.SSH.path": undefined [11:57:20.545] "remote.SSH.configFile": undefined [11:57:20.545] "remote.SSH.useFlock": true [11:57:20.546] "remote.SSH.lockfilesInTmp": false [11:57:20.546] "remote.SSH.localServerDownload": auto [11:57:20.547] "remote.SSH.remoteServerListenOnSocket": true [11:57:20.547] "remote.SSH.showLoginTerminal": false [11:57:20.547] "remote.SSH.defaultExtensions": [] [11:57:20.548] "remote.SSH.loglevel": 2 [11:57:20.548] "remote.SSH.enableDynamicForwarding": true [11:57:20.549] "remote.SSH.enableRemoteCommand": true [11:57:20.549] "remote.SSH.serverPickPortsFromRange": {} [11:57:20.550] "remote.SSH.serverInstallPath": {} [11:57:20.555] "remote.SSH.permitPtyAllocation": false [11:57:20.556] "remote.SSH.preferredLocalPortRange: undefined [11:57:20.571] SSH Resolver called for host: crrodriguez@tumbleweedvm.local [11:57:20.571] Setting up SSH remote "tumbleweedvm.local" [11:57:20.580] Using commit id "f1e16e1e6214d7c44d078b1f0607b2388f29d729" and quality "stable" for server [11:57:20.588] Install and start server if needed [11:57:20.595] Checking ssh with "C:\Program Files\Eclipse Adoptium\jre-11.0.23.9-hotspot\bin\ssh.exe -V" [11:57:20.604] Got error from ssh: spawn C:\Program Files\Eclipse Adoptium\jre-11.0.23.9-hotspot\bin\ssh.exe ENOENT [11:57:20.605] Checking ssh with "c:\program files\openssh\ssh.exe -V" [11:57:20.677] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 [11:57:20.690] Running script with connection command: "c:\program files\openssh\ssh.exe" -T -D 52658 "crrodriguez@tumbleweedvm.local" bash [11:57:20.693] Terminal shell path: C:\WINDOWS\System32\cmd.exe [11:57:21.759] > 95ce05e7fa88: running > ]0;C:\WINDOWS\System32\cmd.exe [11:57:21.759] Got some output, clearing connection timeout [11:57:21.766] > Installing to /home/crrodriguez/.vscode-server... > 95ce05e7fa88%%1%% [11:57:21.786] > Downloading with curl [11:57:21.800] > % Total % Received % Xferd Average Speed Time Time Time Current > Dload Upload Total Spent Left Speed > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 [11:57:22.294] > 100 162 100 162 0 0 336 0 --:--:-- --:--:-- --:--:-- 336 [11:57:22.760] > 100 8754k 100 8754k 0 0 9656k 0 --:--:-- --:--:-- --:--:-- 9656k > Download complete > 95ce05e7fa88%%2%% > tar --version: [11:57:22.921] > tar (GNU tar) 1.35 > Copyright (C) 2023 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later . > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law.Written by John Gilmore and Jay Fenlason. > [11:57:23.137] > code 1.91.1 (commit f1e16e1e6214d7c44d078b1f0607b2388f29d729) > Starting VS Code CLI... "/home/crrodriguez/.vscode-server/code-f1e16e1e6214d7c44d078b1f0607b2388f29d729" command-shell --cli-data-dir "/home/crrodriguez/.vscode-server/cli" --on-socket --parent-process-id 2358 &> "/home/crrodriguez/.vscode-server/.cli.f1e16e1e6214d7c44d078b1f0607b2388f29d729.log" < /dev/null > printenv: > SHELL=/usr/bin/zsh > SSH_AUTH_SOCK=/tmp/ssh-XXXXyHJzPV/agent.2357 > PWD=/home/crrodriguez > LOGNAME=crrodriguez > XDG_SESSION_TYPE=tty > MOTD_SHOWN=pam > HOME=/home/crrodriguez > VSCODE_AGENT_FOLDER=/home/crrodriguez/.vscode-server > SSH_CONNECTION=fe80::1cec:4066:6fb4:bea9%eth0 52660 fe80::215:5dff:fe00:50c% > %eth0 22 > XDG_SESSION_CLASS=user > USER=crrodriguez > SHLVL=1 > XDG_SESSION_ID=23 > XDG_RUNTIME_DIR=/run/user/1000 > SSH_CLIENT=fe80::1cec:4066:6fb4:bea9%eth0 52660 22 > PATH=/home/crrodriguez/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus > GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2:glibc.pthread.stack_hugetlb=0:glibc.m > mem.decorate_maps=1 > OLDPWD=/home/crrodriguez/.vscode-server > _=/usr/bin/printenv [11:57:23.145] > > Spawned remote CLI: 2403 [11:57:23.159] > Waiting for server log... [11:57:23.174] > [11:57:23.202] > Exec server process not found > [2024-07-22 11:57:23] error This machine does not meet Visual Studio Code Server > r's prerequisites, expected either... > - find GLIBC >= v2.28.0 (but found v0.9000.0 instead) for GNU environments > - find /lib/ld-musl-x86_64.so.1, which is required to run the Visual Studio Co > ode Server in musl environments > 95ce05e7fa88: start > SSH_AUTH_SOCK==/tmp/ssh-XXXXyHJzPV/agent.2357== > DISPLAY==== > listeningOn==== > osReleaseId==opensuse-tumbleweed== > arch==x86_64== > vscodeArch==x64== > bitness==64== > tmpDir==/run/user/1000== > platform==linux== > unpackResult==success== > didLocalDownload==0== > downloadTime==951== > installTime==414== > serverStartTime==68== > execServerToken==1aaa1111-a1aa-1111-aa11-11aa11111111== > 95ce05e7fa88: end [11:57:23.203] Received install output: SSH_AUTH_SOCK==/tmp/ssh-XXXXyHJzPV/agent.2357== DISPLAY==== listeningOn==== osReleaseId==opensuse-tumbleweed== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1000== platform==linux== unpackResult==success== didLocalDownload==0== downloadTime==951== installTime==414== serverStartTime==68== execServerToken==1aaa1111-a1aa-1111-aa11-11aa11111111== [11:57:23.203] Failed to parse remote port from server output [11:57:23.205] Resolver error: Error: at g.Create (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:501055) at t.handleInstallOutput (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:498377) at t.tryInstall (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:622639) at async c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:582210 at async t.withShowDetailsEvent (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:585476) at async k (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:579097) at async t.resolve (c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:582887) at async c:\Users\crrodriguez\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.2024072215\out\extension.js:2:850176 [11:57:23.211] ------ ```

Anything else?

No response

crrodriguez commented 2 months ago

With the risk of repeating myself or souding as pedantic as I should be:

YOU SHOULD NEVER PARSE AND PARTICULARY NOT MAKE WORKS OR NOT DECISIONS on anything that a distribution tells you about the glibc version, the ouput of any tool, been a package manager, the output of ld-so or whatever, no exceptions! this is intended for human consumption and not scripts/machines or to make live or die decisions:

Expected behaviour:

IT works: The binary loads and the program continues.

It does not work: symbol lookup error, the binary really does not work here.

crrodriguez commented 2 months ago

touch /tmp/vscode-skip-server-requirements-check workarounds the issue and things keep going..

connor4312 commented 2 months ago

Upgrade glibc or have a slightly custom version applied.

Upgrading glibc should not present any issues, as we check only for a minimum version, not a maximum.

You should never ever compare glibc versions from distribution packages or by parsing any tool's options.

The version is determined via the gnu_get_libc_release library function.

If you have a custom version that does not match the standard scheme, then the prerequisite check will fail. This was a decision we made quite some time ago for our servers to provide parsable and deterministic failure reason to users. We also need to take different actions depending on the glibc version.