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
{{ message }}
Repository navigation
Segmentation fault opening vscode on Arch Linux ARM64 #153849
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.
VS Code Version: Both 1.68.1 and Insiders build 1656566876
OS Version: Arch Linux Asahi ARM64 (MacBook Air M1) - Linux 5.17.0-rc7-asahi-next-20220310-5-2-ARCH
Steps to Reproduce:
Open visual studio code with command /usr/bin/code --unity-launch %F or simply code.
The issue has been addressed in vscode insiders and the fix will also be available in 1.69.0 stable release next week , you can refer to #145527 (comment) for context.
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 npx electron /opt/visual-studio-code/resources/app --ms-enable-electron-run-as-node --unity-launch
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.
This bug has been fixed in the latest release of VS Code Insiders!
Artur Paiva (@h0m3), you can help us out by commenting /verified if things are now working as expected.
If things still don't seem right, please ensure you're on version 7ed02a6 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.
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.
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 !
Activity
marcan commentedon Jun 30, 2022
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).
deepak1556 commentedon Jul 1, 2022
The issue has been addressed in vscode insiders and the fix will also be available in
1.69.0stable release next week , you can refer to #145527 (comment) for context.h0m3 commentedon Jul 7, 2022
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
npx electron /opt/visual-studio-code/resources/app --ms-enable-electron-run-as-node --unity-launchayr-ton commentedon Jul 28, 2022
Could you folks confirm that 18.3.2 or more recent is being used? The issue persists in 1.69.0.
ayr-ton commentedon Jul 28, 2022
Seems that 18.3.2 still has this issue. Testing with 19 to confirm.
ayr-ton commentedon Jul 28, 2022
Confirmed that it's working with electron19 only. The issue persists. cc.: Robo (@deepak1556)
Lemmingh commentedon Aug 1, 2022
Robo (@deepak1556)
VS Code 1.69 did NOT fix this problem. It still sticks to 4 Ki.
To be successfully loaded, every
AlignofLOADheaders of a ELF file has to be equal to or greater than the systemPAGESIZE.0x100040960x4000163840x1000065536The AUR package simply points to the official VS Code release.
Let's check its program header.
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.
marcan commentedon Aug 1, 2022
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.
Lemmingh commentedon Aug 1, 2022
Yes, the problem is rooted in Electron v
18, including the latest v18.3.6.An app built with Electron v
18for Linux ARM64 is still 4 KiB-aligned.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.
deepak1556 commentedon Aug 1, 2022
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
6 remaining items
ayr-ton commentedon Aug 1, 2022
Lemmingh Robo (@deepak1556) You folks are awesome! Thanks for not giving up on the issue <3
vscodenpa commentedon Aug 24, 2022
This bug has been fixed in the latest release of VS Code Insiders!
Artur Paiva (@h0m3), you can help us out by commenting
/verifiedif things are now working as expected.If things still don't seem right, please ensure you're on version 7ed02a6 of Insiders (today's or later - you can use
Help: Aboutin the command palette to check), and leave a comment letting us know what isn't working as expected.Happy Coding!
TylerLeonhardt commentedon Aug 26, 2022
Can anyone here confirm that this is working again for them?
Robo (@deepak1556) I take it this is gonna be a hard one to verify if I don't have an Arch Linux ARM64 setup available 😅
ayr-ton commentedon Aug 29, 2022
TylerLeonhardt I can confirm!
It's working as expected now. Thanks :-)
nwOLXTYv commentedon Aug 30, 2022
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 ?
h0m3 commentedon Sep 14, 2022
Confirmed,
The issue is fixed. Sorry for the delayed response.
h0m3 commentedon Sep 14, 2022
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.
nwOLXTYv commentedon Sep 15, 2022
Yeah thanks i was just trying to launch standard vscode and not insiders version. With the insider version all is perfectly fine. Thanks !