live-share icon indicating copy to clipboard operation
live-share copied to clipboard

Live Share needs an ARM compile

Open dgazzoni opened this issue 5 years ago • 15 comments

Describe what happened: Live Share doesn't start when connected, via Remote-SSH, to a Linux/ARM target.

What was your system configuration? Product and Version [VS/VSCode]: VSCode OS Version[macOS/Windows]: host macOS (but this is irrelevant), Remote-SSH target Linux Live Share Extension Version: 1.0.3629 Target Platform or Language [e.g. Node.js]: CUDA (but this is irrelevant)

Steps to Reproduce / Scenario:

  1. Install and configure the Remote - SSH extension
  2. Connect, using Remote - SSH, to a Linux/ARM machine (in my particular case, a Jetson Nano)
  3. Click "Share" in the Live Share pane
  4. Rather than starting the Live Share session, nothing happens. Logs are attached below.

Please attach logs to this issue:

The relevant part of the "Remote Extension Host" logs is this:

[2021-02-08 00:53:03.603] [exthost] [error] Activating extension ms-vsliveshare.vsliveshare failed due to an error:
[2021-02-08 00:53:03.603] [exthost] [error] Error: Agent terminated with exit code: 0 and signal null: /bin/sh: 1: /home/xxxxx/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.3629/dotnet_modules/vsls-agent: Exec format error
	at ChildProcess.<anonymous> (/home/decio/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.3629/out/prod/extension-prod.js:186073:32)
	at ChildProcess.emit (events.js:327:22)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:443:11)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:674:12)

Afterwards, I ssh'd into the target Linux/ARM machine and ran the following command:

$ file /home/xxxxx/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.3629/dotnet_modules/vsls-agent
/home/xxxxx/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.3629/dotnet_modules/vsls-agent: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5b7bc4e1ec868672a1cf889bc66d7c604dbb1177, stripped

This proves that an x86-64 binary is being loaded into an ARM machine, so it's completely expected that Live Share wouldn't work in this scenario.

dgazzoni avatar Feb 08 '21 03:02 dgazzoni

same problem here, with Jetson Xavier NX

JayWiz avatar Mar 01 '21 15:03 JayWiz

Any updates?

dgazzoni avatar Apr 01 '21 03:04 dgazzoni

For Live Share to work there needs to be a build of the vsls-agent for the ARM architecture.

rbrisita avatar May 14 '21 04:05 rbrisita

I did a little more digging and it might be possible to run the program using QEMU with network options and chroot. I will look into this in the future but feel free to solve this if anyone has the time. My approach would be to create a directory with chroot and these needed libraries:

libpthread.so.0 libdl.so. libstdc++.so.6 libm.so.6 libgcc_s.so.1 libc.so.6 ld-linux-x86-64.so.2

Then qemu-system-x86_64 would need an x86 disk image to run vsls-agent inside the chroot'd directory. All my assumptions.

rbrisita avatar May 19 '21 18:05 rbrisita

I did a little more digging and it might be possible to run the program using QEMU with network options and chroot. I will look into this in the future but feel free to solve this if anyone has the time. My approach would be to create a directory with chroot and these needed libraries:

libpthread.so.0 libdl.so. libstdc++.so.6 libm.so.6 libgcc_s.so.1 libc.so.6 ld-linux-x86-64.so.2

Then qemu-system-x86_64 would need an x86 disk image to run vsls-agent inside the chroot'd directory. All my assumptions.

That's not a solution, just a hacky workaround if you desperately need the feature. Performance would suffer, and possibly memory usage as well (and both are often quite restricted in ARM systems, or at least those I work with).

There is a correct solution, and it is Microsoft supplying an ARM-compiled version of vsls-agent.

dgazzoni avatar May 19 '21 18:05 dgazzoni

@dgazzoni No where is it mentioned that this is the fix. This is a forum to propose solutions regardless if it is viewed as a "hacky workaround". I prefer to offer possible solutions to future readers than parrot complaints. Have a good day.

rbrisita avatar May 25 '21 05:05 rbrisita

@dgazzoni No where is it mentioned that this is the fix. This is a forum to propose solutions regardless if it is viewed as a "hacky workaround". I prefer to offer possible solutions to future readers than parrot complaints. Have a good day.

Wrong, try again. This is a bug reporting tool. We report bugs, Microsoft gathers any extra information they need, and then fix it. It’s not a place to write stuff that does not further the goal of Microsoft fixing the bug that I reported, as you did.

If you want to document your hacky workaround, go write a blog or ask and answer a question on Stack Overflow.

dgazzoni avatar May 25 '21 10:05 dgazzoni

@dgazzoni No where is it mentioned that this is the fix. This is a forum to propose solutions regardless if it is viewed as a "hacky workaround". I prefer to offer possible solutions to future readers than parrot complaints. Have a good day.

Wrong, try again. This is a bug reporting tool. We report bugs, Microsoft gathers any extra information they need, and then fix it. It’s not a place to write stuff that does not further the goal of Microsoft fixing the bug that I reported, as you did.

If you want to document your hacky workaround, go write a blog or ask and answer a question on Stack Overflow.

ROFL, sure keep on waiting and I'll keep moving forward and install when they actually do an ARM compile. Good day sir!

rbrisita avatar May 27 '21 05:05 rbrisita

  1. Any updates?

hihanley avatar Apr 02 '22 21:04 hihanley

@Davsterl

hihanley avatar Apr 02 '22 21:04 hihanley

@Mikejo5000

hihanley avatar Apr 02 '22 21:04 hihanley

Hi,

I also think it would be nice to have a solution for this. I use an rpi400 for light dev work. Same error as above.

kstabel avatar Apr 12 '22 16:04 kstabel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically in 2 days.

github-actions[bot] avatar Aug 15 '22 10:08 github-actions[bot]

Support for Live Share on ARM platforms is something that I would also like to see.

jrprnet avatar Aug 17 '22 08:08 jrprnet

Hitting the exact same issue here (on a remote Fedora ARM VM, running on an ARM Mac) :

file ~/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.5690/dotnet_modules/vsls-agent
.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.5690/dotnet_modules/vsls-agent: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5b7bc4e1ec868672a1cf889bc66d7c604dbb1177, stripped

Interestingly enough, on an ARM Mac, the binary is also a x86_64, but livesharing works 🤷 :

file  ~/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5690/dotnet_modules/vsls-agent
.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5690/dotnet_modules/vsls-agent: Mach-O 64-bit executable x86_64

DocEmmetBrown avatar Aug 23 '22 15:08 DocEmmetBrown

We’ve made improvements in this area since this issue was filed. Specifically, we recently removed the dependency on vsls-agent. We believe this may have improved your experience and are closing this issue. If this issue still persists for you, please reopen the issue and let us know. Thank you.

derekbekoe avatar Nov 11 '22 07:11 derekbekoe