You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remote OS Version: SUSE Linux Enterprise Server 15 (Cori computing system at NERSC)
Remote Extension/Connection Type: SSH
Steps to Reproduce:
Set noclobber in the remote .bashrc with set -o noclobber
Try to make a remote connection
If you have connected before, and a previous log file exists, then starring the remote process fails.
The connection fails because the server code assumes it can overwrite the existing file. This is demonstrated in my log file as follows. Here we see the server being started:
[01:13:06.508] > Starting server with command... /global/homes/c/cwalter/.vscode-server/bin/ea3859d4ba2f3e577a159bc91e3074c5d85c0523/server.sh --start-server --host=127.0.0.1 --enable-remote-auto-shutdown --port=0 &> "/global/homes/c/cwalter/.vscode-server/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.log" < /dev/null
But since I have set noclobber, and the file exists, it can't overwrite it as shown here:
01:13:06.616] stderr> main: line 476: /global/homes/c/cwalter/.vscode-server/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.pid: cannot overwrite existing file
[01:13:06.616] stderr> main: line 475: /global/homes/c/cwalter/.vscode-server/.ea3859d4ba2f3e577a159bc91e3074c5d85c0523.log: cannot overwrite existing file
But, the script continues anyway and the remote connection fails. Before determining the root cause of this issue, I had noted that if I only deleted the log file in the server directory I could connect. This was puzzling but similar behavior was reported in #2828 and worked on by @roblourens . I suspect some of those people may also have either set the option or had it set for them.
The solution for this problem is for the script to either turn off the option locally or use the '>|' method. Searching older issues for noclobber it looks like the container extension already does this.
Does this issue occur when you try this locally?: NA
Does this issue occur when you try this locally and all extensions are disabled?: NA
The text was updated successfully, but these errors were encountered:
Actually I see now I accidentally misread the other issues.. they are actually turning it on, not off, in the container case. If you do an issue search for "noclobber" about 10 or so issues will come up, most related to containers. That isn't the point of those issues, but if you look in the logs posted in those issues you will see entries like this:
10713 ms] Start: Run in container: set -o noclobber ; mkdir -p '/home/gidev/.vscode-server-insiders/data/Machine' && { > '/home/gidev/.vscode-server-insiders/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
This doesn't seem to repro in the extension anymore with default settings.
To attempt to repro, I added set -o noclobber to the remote machine's .bashrc and was able to connect multiple times without error (either visible, or in the logs). Upon connection it does appear noclobber is set:
Steps to Reproduce:
set -o noclobber
If you have connected before, and a previous log file exists, then starring the remote process fails.
The connection fails because the server code assumes it can overwrite the existing file. This is demonstrated in my log file as follows. Here we see the server being started:
But since I have set noclobber, and the file exists, it can't overwrite it as shown here:
But, the script continues anyway and the remote connection fails. Before determining the root cause of this issue, I had noted that if I only deleted the log file in the server directory I could connect. This was puzzling but similar behavior was reported in #2828 and worked on by @roblourens . I suspect some of those people may also have either set the option or had it set for them.
The solution for this problem is for the script to either turn off the option locally or use the '>|' method. Searching older issues for noclobber it looks like the container extension already does this.
Does this issue occur when you try this locally?: NA
Does this issue occur when you try this locally and all extensions are disabled?: NA
The text was updated successfully, but these errors were encountered: