New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault opening vscode on Arch Linux ARM64 #153849
Comments
This is fixed in Electron 19.0.0, while vscode is still on 18.3.5. It should start working once Electron is updated (unless there are other issues). |
The issue has been addressed in vscode insiders and the fix will also be available in |
Hello Friends, Today code 1.69.0 binary dropped on AUR and i was able to test and unfortunately both 1.69.0 and insiders build 1657150868-1 gave me the same segfault. I was able to install electron trough npm and running code by forcing electron 19 trought |
Could you folks confirm that 18.3.2 or more recent is being used? The issue persists in 1.69.0. |
Seems that 18.3.2 still has this issue. Testing with 19 to confirm. |
Confirmed that it's working with electron19 only. The issue persists. cc.: @deepak1556 |
VS Code 1.69 did NOT fix this problem. It still sticks to 4 Ki. To be successfully loaded, every
The AUR package simply points to the official VS Code release. source_aarch64 = code_arm64_1.69.2.tar.gz::https://update.code.visualstudio.com/1.69.2/linux-arm64/stable
sha256sums_aarch64 = 9c53ff087ffcccda4ee0b210795bd95306a03824d668be6215c840341c0a4ffe Let's check its program header. readelf --program-headers ./code
Evidently, it's 4 Ki-aligned, thus, cannot run on a 16 Ki system. Meanwhile, is also NOT fixed. Chromium still does not support 64 Ki page size; Thus, Electron doesn't; Thus, VS Code doesn't. |
This is a different problem then. The Chromium bug related to internal support for >4K sizes in their allocator/etc. If the binary is being built with 4K segment alignment, that's a toolchain/build environment issue with the official VSCode binaries. |
Yes, the problem is rooted in Electron v An app built with Electron v In other words, the PR doesn't work as expected, because it only backported the Chromium Change 3545665. However, prior to that Change, there were modifications to Chromium's build system during M102, Change 3542265. |
Thanks for the clarification @Lemmingh , I only backported the allocator CL that was linked in the chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=1301788, didn't know there was a compile time page size reduction that was checked in. We will be updating to Electron 19 this week which has the relevant compiler fixes #154092 |
@Lemmingh @deepak1556 You folks are awesome! Thanks for not giving up on the issue <3 |
This bug has been fixed in the latest release of VS Code Insiders! @h0m3, you can help us out by commenting If things still don't seem right, please ensure you're on version 7ed02a6 of Insiders (today's or later - you can use Happy Coding! |
Can anyone here confirm that this is working again for them? @deepak1556 I take it this is gonna be a hard one to verify if I don't have an Arch Linux ARM64 setup available 😅 |
@TylerLeonhardt I can confirm! |
Hi ! I just tried to install vscode using this methode "https://linuxhint.com/install_visual_studio_code_arch_linux/" and i got this error "/opt/visual-studio-code/bin/code: line 62: 29630 Segmentation fault ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --ms-enable-electron-run-as-node "$@" Someone got any idea to resolve that ? |
Confirmed, The issue is fixed. Sorry for the delayed response. |
Looks like the error of an older version, make sure you're trying to run the latest insiders. Probably the AUR you've followed in the tutorial is the stable version or its outdated. |
Yeah thanks i was just trying to launch standard vscode and not insiders version. With the insider version all is perfectly fine. Thanks ! |
Does this issue occur when all extensions are disabled?: Yes
Hello Friends,
I'm running vscode from Arch Linux ARM (Asahi) on my MacBook Air M1 and its giving me a segfault before it opens.
/opt/visual-studio-code/bin/code: line 62: 16644 Segmentation fault ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --ms-enable-electron-run-as-node "$@"
I have never opened code before on this system and I think it may be related to the fact that the M1 uses a 16K address page (chromium had a similar issue and maybe a similar patch can be applied) instead of a 4K. More info in the Asahi wiki.
I know its a very niche case on a probably unsupported platform but since more ARM systems would start using pages bigger than the standard x86 4K for the big performance improvement it may be worth it the report.
Steps to Reproduce:
/usr/bin/code --unity-launch %F
or simplycode
.The text was updated successfully, but these errors were encountered: