-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Every time I hit "Restart to update" in VSCodium and have multiple windows open to the same remote SSH destination, the server install script fails. Trace below. Upon inspection, the downloaded vscode-server.tar.gz file is usually corrupt.
What resolves the issue is to delete the folder .vscodium-server/bin/[git commit hash] on the remote server and retry installing in one VSCodium window, then the remaining ones.
I believe this happens due to a race condition of multiple remote processes trying to wget and write to the same file.
I propose to add the following lines to the server install script, right above the platform check. flock acquires an exclusive file descriptor lock. Failing that, for example when run by a second script instance, it will wait up to 30s to acquire the lock or fail if it can't. This should allow for sequential execution of the server install script.
I can't test this since I don't know how to setup a dev-environment for this extension, so any tests would be appreciated.
LOCKFILE="$TMP_DIR/server_install.lock"
exec 42>"$LOCKFILE"
# wait 30s to acquire lock, otherwise fail
flock -x -w 30 42 || print_install_results_and_exit 1
trap 'flock -u 42' EXIT
# Check if platform is supported
[Trace - 11:30:10.484] Server install command stderr:
2025-10-22 13:30:08 URL:https://release-assets.githubusercontent.com/github-production-release-asset/144590939/f626a0bd-57d6-49b1-8809-9ea51f3db712?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-10-22T12%3A02%3A53Z&rscd=attachment%3B+filename%3Dvscodium-reh-linux-x64-1.105.17075.tar.gz&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-10-22T11%3A02%3A00Z&ske=2025-10-22T12%3A02%3A53Z&sks=b&skv=2018-11-09&sig=h%2FZP21nXN1AFq2ldw5hNf4gBddm8SS9n3UdmQOnDarU%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc2MTEzNDM1MywibmJmIjoxNzYxMTMyNTUzLCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.0hoHX96jvvuQJ1-oschtj50gz3REugBvH3Uk1NwjU7w&response-content-disposition=attachment%3B%20filename%3Dvscodium-reh-linux-x64-1.105.17075.tar.gz&response-content-type=application%2Foctet-stream [63983888/63983888] -> "vscode-server.tar.gz" [1]
[Trace - 11:30:10.484] Server install command stdout:
0e8286e760ef072c13402294: start
exitCode==0==
listeningOn==42009==
connectionToken==18efa49b-d653-4570-8878-bc088367585e==
logFile==/home/gandalf/.vscodium-server/.14bd1561ce547502e6ff1968090dc18c49160aab.log==
osReleaseId==ubuntu==
arch==x86_64==
platform==linux==
tmpDir==/run/user/1000==
0e8286e760ef072c13402294: end