Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPrebuilt Electron binaries segfault at startup on Arch Linux with glibc 2.28 #13972
Comments
This comment has been minimized.
This comment has been minimized.
welcome
bot
commented
Aug 7, 2018
|
To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
K900
referenced this issue
Aug 7, 2018
Closed
Issues with VSCode on ArchLinux (Electron 2.0.x) #55934
This comment has been minimized.
This comment has been minimized.
eli-schwartz
commented
Aug 7, 2018
•
|
The electron package from the Arch Linux community repository was actually built using glibc 2.27, nice try. ;) (glibc tries pretty hard to maintain ABI compatibility, you should never need to rebuild software in order to work with newer glibc -- the fact that this breaks indicates either a glibc bug or a something in the software stack that depends on private details of glibc when it shouldn't.)
So, it's entirely likely that rebuilding it on Arch Linux with glibc 2.28 would have the same issues, and that the issue lies in the build process. For the record, our package is built using https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/electron and you can see various patches we apply in order to use system dependencies, in the same directory of the git repository as the PKGBUILD file. |
This comment has been minimized.
This comment has been minimized.
eli-schwartz
commented
Aug 7, 2018
|
More context: https://bugs.archlinux.org/task/59550 (Arch Linux bugreport). it would appear to be coming from libnode.so, and it's not just electron either -- sone R packages do the same. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
So I've done some testing and posted the results on the VSCode issue linked: Microsoft/vscode#55934 TL;DR:
|
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
Another update: did a clean build outside of the Arch packaging tools, but with most of the Arch patches applied, and it worked (which isn't really surprising). I'm not quite sure where the Debian sysroot images are coming from or how they are produced, but upgrading glibc in those might be an interesting thing to try. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
I might actually just try bisecting glibc and seeing when it started crashing. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
•
|
I've bisected glibc to this commit. The versions before it run fine, the version including it cause a segfault. I'm not entirely sure what the reason is. Trying to build the latest glibc-2.28 tag now with it reverted. Edit: disregard that, I messed up. Re-testing now... |
This comment has been minimized.
This comment has been minimized.
eli-schwartz
commented
Aug 8, 2018
•
|
Per discussion with azanella on freenode's #glibc channel:
And the conclusion was that this should be brought up for discussion on libc-alpha. |
This comment has been minimized.
This comment has been minimized.
zatrazz
commented
Aug 8, 2018
|
Could you check by reverting e7feec374c635b6a29d65c39ae5e1855528fed39 ? I would to get some freedback before address it on libc-alpha. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
This is the commit that I traced it down to when bisecting too. I'll try just reverting it and see what happens. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
•
|
Just reverting that commit (on top of the latest 2.28 tag) seems to fix things. Doesn't explain how the binary got so messed up though... |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
Also, repo Electron's
|
This comment has been minimized.
This comment has been minimized.
zatrazz
commented
Aug 8, 2018
|
Does Electron's libnode.so work correctly with glibc 2.28? |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
The one in the official binary releases from this repo does not; the one in the Arch package does, as it's built with a different toolchain. I'm actually trying to build upstream Electron with Arch clang right now, will see where this goes, as it seems like an Electron issue and not a glibc issue to me. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
So yeah, it's definitely a toolchain issue, more specifically a linker issue. Simply replacing |
This comment has been minimized.
This comment has been minimized.
zatrazz
commented
Aug 8, 2018
|
Right, I saw reports where libnode.so is also failing on other projects and it seems to be the same issue. I was trying to reproduce the build failure with GNU linkers, but without much success. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
It seems to be an LLD bug. I'm trying a build with a newer prebuilt clang (and thus lld) version now. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
Good news: the tests pass with an updated lld, and the resulting libnode.so isn't horribly bugged. |
This comment has been minimized.
This comment has been minimized.
K900
commented
Aug 8, 2018
|
@pcc on #llvm IRC found the exact revision that fixed it: llvm-project/lld@1adba6d |
CrossR
referenced this issue
Aug 8, 2018
Closed
Oni segfaults on startup after upgrading to glibc 2.28 #2497
deepak1556
added
platform/linux
bug/crash 💥
2-0-x
status/confirmed
labels
Aug 9, 2018
Zelldon
referenced this issue
Aug 10, 2018
Closed
Segmentation fault on arch linux with latest modeler (1.16.2) #877
This comment has been minimized.
This comment has been minimized.
mwik
commented
Oct 25, 2018
•
Another workaround that worked for me in 18.10 was to simply replace libnode.so with a newer version. For slack replace /usr/lib/slack/libnode.so with e.g libnode.so found in https://github.com/electron/electron/releases/download/v2.0.12/electron-v2.0.12-linux-x64.zip Edit: Celebrated too soon. Slack becomes unstable and crashes and restarts every now and then with the updated lib. |
christianbundy
referenced this issue
Oct 29, 2018
Closed
AppImage release causes segmentation fault under Ubuntu 18.10 #880
conraid
referenced this issue
Nov 1, 2018
Open
Electron 2.0.3 and glibc 2.28 segfault at startup #312
This comment has been minimized.
This comment has been minimized.
brpaz
commented
Nov 4, 2018
|
Just updated my laptop to Ubuntu 18.10 and now almost all my Electron based apps crash. This is a very serious issue and I suspect it affects hundreds of applications, many of them might not be actively maintained anymore. I dont really understand, is this an issue of Electron or glibc? Still, we need a solution. ;( |
This comment has been minimized.
This comment has been minimized.
eli-schwartz
commented
Nov 4, 2018
|
It's literally in the release notes for Electron 2.0.8, that this bug has been fixed (by #13988 to be precise). It was an electron bug, and now it is a bug in any application that has not updated their vendored Electron copies. At this point, the Electron developers have done everything they could in order to fix it. The only other thing they could do, is to redesign the entire Electron ecosystem to use global, system electron installations by default, which would allow this to be fixed once and applied everywhere. But this is rather out of scope of the issue. |
This comment has been minimized.
This comment has been minimized.
Diftraku
commented
Nov 7, 2018
|
For Slack users who replaced It seems if Slack tries to play the notification sound for a new message, it simply restarts instead of ever getting around to playing the clip. |
added a commit
to jhit/Boostnote
that referenced
this issue
Nov 12, 2018
This comment has been minimized.
This comment has been minimized.
ghjm
commented
Nov 13, 2018
|
Electron apps including Slack are also broken on Fedora 29 for the same reason. I built a glibc with @mfonville's patch, which solves the problem for me. This build is available here: https://copr.fedorainfracloud.org/coprs/ghjm/glibc/. You can install the updated glibc using |
brainchild0
referenced this issue
Nov 15, 2018
Open
older electron releases crash on some linux systems #129
oleastre
referenced this issue
Nov 21, 2018
Closed
Can't run Realm Studio on Ubuntu 18.10 64 bit (segmentation fault (core dumped)) #971
This comment has been minimized.
This comment has been minimized.
allanlewis
commented
Dec 18, 2018
|
@ghjm Fedora has released a new |
This comment has been minimized.
This comment has been minimized.
ghjm
commented
Dec 18, 2018
|
@allanlewis Fedora has said they are not going to apply this patch. See https://bugzilla.redhat.com/show_bug.cgi?id=1653832 for details. I'm pretty sure I never signed up to maintain this forever, but I've started a new build here: https://copr.fedorainfracloud.org/coprs/ghjm/glibc/build/838399/. Assuming it succeeds, the new builds should be available in about an hour. |
This comment has been minimized.
This comment has been minimized.
allanlewis
commented
Dec 18, 2018
Absolutely - I'm grateful you started it at all!
Thanks, @ghjm! For now I've added
|
This comment has been minimized.
This comment has been minimized.
|
For reference, users of Slack should upgrade to version 3.3.7 released earlier this week, which has this fix: https://slack.com/release-notes/linux |
K900 commentedAug 7, 2018
•
edited
Expected Behavior
Electron runs correctly.
Actual behavior
Electron segfaults on start, before anything useful happens.
To Reproduce
Download the prebuilt Electron release (electron-2.0.x-linux-x64.zip); unzip it; run
./electron; observe the fireworks.Additional Information
The issue seems to be caused by the glibc 2.28 upgrade on Arch - downgrading to glibc 2.27 makes Electron work. I'm not really sure what the issue itself is, as Electron crashes even before Breakpad kicks in, so no minidump is produced, and I don't have a machine powerful enough to produce a debug build in a reasonable amount of time (and it's likely that a debug build produced on my machine with glibc 2.28 will work fine anyway, being linked against the correct glibc). Distribution-provided binaries (the
electronpackage in the repository) work fine, even though they were not rebuilt to match the glibc upgrade.