Vscode-remote-release: Lockfiles in tmp prevent simultaneous multi-user connection

Created on 19 Dec 2019  路  7Comments  路  Source: microsoft/vscode-remote-release


  • VSCode Version:1.41.0
  • Local OS Version: CentOS 7
  • Remote OS Version: CentOS 7
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. check settings: Remote.SSH: Lockfiles In Tmp
  2. Two users connect to same remote
  3. The second user can not connect for using same file for lock /tmp/vscode-remote-lock.9579eda04fdb3a9bba2750f15193e5fafe16b959

Setting custom TMPDIR did not help.


Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

bug ssh verified

Most helpful comment

I added $USER to the lockfile name which should help here.

All 7 comments

The second user can not connect for using same file for lock

Can you explain what the issue is exactly? I assume that the file is owned by the first user or something. However after the lock is released, it should be deleted. Please give details and include the log from the Remote-SSH output channel.

Hi, Rob,

When the first user (jcyang) is connecting, the lock file do not be deleted.

When the second user (jcyang02) try to connect, it raises Permission denied because the lock file created by the first user.

The lock file will be deleted after the first user disconnected.

It prevents simultaneous multi-user connection.

Log from the second user:

[14:56:26.264] [email protected]
[14:56:26.264] linux x64
[14:56:26.266] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a2278323534222c2275736572223a226a6379616e673032227d", attempt 1
[14:56:26.266] SSH Resolver called for host: jcyang02@x254
[14:56:26.266] Setting up SSH remote "x254"
[14:56:26.277] Using commit id "26076a4de974ead31f97692a0d32f90d735645c0" and quality "stable" for server
[14:56:26.279] Testing ssh with ssh -V
[14:56:26.287] ssh exited with code: 0
[14:56:26.287] Got stderr from ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
[14:56:26.303] Running script with connection command: ssh -T -D 40968 -o ConnectTimeout=15 jcyang02@x254 bash
[14:56:26.303] Install and start server if needed
[14:56:27.274] > 1243a5da6a96: running
[14:56:27.275] Got some output, clearing connection timeout
[14:56:27.329] > Acquiring lock on /tmp/vscode-remote-lock.26076a4de974ead31f97692a0d32f90d735645c0
> bash: line 131: /tmp/vscode-remote-lock.26076a4de974ead31f97692a0d32f90d735645c0: Permission denied
> flock: 99: Bad file descriptor
> Installation already in progress...
> 1243a5da6a96##24##
[14:56:27.336] > flock: 99: Bad file descriptor
> flock: 99: Bad file descriptor
[14:56:27.588] "install" terminal command done
[14:56:27.588] Install terminal quit with output: flock: 99: Bad file descriptor
[14:56:27.588] Received install output: flock: 99: Bad file descriptor
[14:56:27.588] Stopped parsing output early. Remaining text: flock: 99: Bad file descriptor
[14:56:27.588] Failed to parse remote port from server output
[14:56:27.588] Resolver error: 
[14:56:27.591] ------

Why did you have to use the "lockfiles in tmp" setting? Really the "right" fix for multiple users logging in simultaneously is to have the lockfiles in the user dir which is the default.

Our home dir is in a NFS #885, so we have to use "lockfiles in tmp".
Is it possible to save the lock file in a custom TMPDIR or use different file name for each user?

I have the same problem.
I have to use "lockfiles in tmp" because a development server mounts the home directory with NFS.
Since multiple people connect to the development server at the same time, solutions such as changing the lock-file name for each user are needed.

I added $USER to the lockfile name which should help here.

Seems good after upgrading VSCode to 1.42! Thanks!

Was this page helpful?
0 / 5 - 0 ratings