vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

[Remote-SSH Bug]: division by 0 (error token is "N/1000000") when using busybox tar (Yocto or Buildroot).

Open cafenroy opened this issue 2 years ago • 1 comments

Is there an existing issue for this bug?

  • [X] I have searched the existing issues

Required Troubleshooting Steps

  • [X] I have followed these troubleshooting steps
  • [X] I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

No response

Expected Behavior

I would expect the documentation at https://code.visualstudio.com/docs/remote/linux to include the tar requirements for Yocto-based systems.

Steps To Reproduce

With linux built with Buildroot 2024-02.

I had the same division by 0 error as described here (https://github.com/microsoft/vscode-remote-release/issues/4706) with a similar setup, Buildroot instead of Yocto, but almost the same. I figured that the server files were downloaded but not extracted. This was because the system I have did not have the prerequisites to extract the file. I am not sure what command is made by the system to extract the file, and I installed more than necessary on my system to fix the problem. But the main suspect is the Busybox version of tar that doesn't support the -z option. I have installed the GNU version of tar on my system and all the possible compression libraries, and it worked.

If you cannot update tar on your system, you may uncompress the archive manually on the target, but you'll have to do that every time VS Code releases an update. I suggest updating the documentation at https://code.visualstudio.com/docs/remote/linux to include requirements for Yocto-based systems. Also, the log output "division by 0" could be improved to be more descriptive and helpful.

Remote-SSH Log

Remote-SSH Log

tar --version:
tar (busybox) 1.36.1
tar: invalid tar magic"
[15:17:53.220] "install" terminal received data: "
main: line 58: 1719343034%N/1000000: division by 0 (error token is "N/1000000")
main: line 66: - : syntax error: operand expected (error token is "- ")
ERROR: tar exited with non-0 exit code: 0
Already attempted local download, failing
51ebe8113582: start
exitCode==37=="

Anything else?

No response

cafenroy avatar Jun 26 '24 17:06 cafenroy

I just reread my own post and realized I had overlooked this crucial line in the log: ERROR: tar exited with non-0 exit code: 0 I saw the division by 0 and the other line Already attempted local download, failing but had missed the error related to tar.

cafenroy avatar Jun 26 '24 17:06 cafenroy