Electron apps segfault on glibc 2.28 (cosmic)

Bug #1790966 reported by Maarten Fonville on 2018-09-05
186
This bug affects 36 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Undecided
Unassigned

Bug Description

Electron apps (like Atom) give a segfault when trying to start them on Ubuntu Cosmic.
Apparently this is related to a certain commit that is part of glibc 2.28.

Could the workaround as e.g. Arch has implemented also be applied to Ubuntu, otherwise many pre-compiled applications will not work when Cosmic will be released.

For more information, see bug: https://github.com/electron/electron/issues/13972

Based on the patch of Arch Linux, to at least temporarily work around the Electron ldd bug, because the large impact it has.

https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/glibc&id=f2aaaac68876f6959c62ea09dcdda5d441bf4ff7

The attachment "Revert-elf-Correct-absolute-SHN_ABS-symbol-run-time.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Matthias Klose (doko) wrote :

I don't think we should work around that. The fix is to rebuild elctron with a fixed linker. Would the BFD linker or gold work?

Changed in glibc (Ubuntu):
status: New → Incomplete

I don't know if the BFD linker or gold would work.

Ofc the fix would be to rebuild all respective Electron apps, but I doubt all (proprietary) apps will already have a new release by October. The fix for Electron was only released end of August.

It is a very unexpected regression, because goal is (and assumed to be true) that glibc ABI doesn't break.

IMHO it is best to make the same choice as Arch, and avoiding breakage, until most Electron apps will have a chance to upgrade their Electron core.

thanks @maarten for the patch.

after applying your ppa, all my apps (related to electron such skype, slack & visual studio code) works again as its crashed before this.

thanks again !!!

Martin Wimpress (flexiondotorg) wrote :

This issue affects Electron apps built with Electron <= 2.0.7 and is fixed in Electron 2.0.8.

  * https://github.com/electron/electron/issues/13972

Few Electron applications have made the transition to Electron 2.x, but those that have will need to be rebuilt with Electron >== 2.0.8

For those that use Atom, upcoming release should have the fix: https://github.com/atom/atom/pull/18012

Jean-Louis Dupond (dupondje) wrote :

FYI: Slack responded me with:
'We hope to get a fix out for this issue in Slack version 3.3.3. I don't have a release date for that just yet, but it's not far away.'

Kai Mast (kai-mast) wrote :

Slack 3.3.3 still crashes for me.

Gerardo Perosio (gperosio) wrote :

Same issue. Resolved installing packages from @maarten repo. Thanks @maarten!

Huan Zhang (victzhang) wrote :

Slack 3.3.3 crashes with the following backtrace:

#0 0x0000000000dbf060 in ?? ()
#1 0x00007ffff7d83072 in node::http2::Http2Session::Callbacks::Callbacks(bool)
    () from /usr/lib/slack/libnode.so
#2 0x00007ffff7d83135 in ?? () from /usr/lib/slack/libnode.so
#3 0x00007ffff7fe398a in call_init (l=<optimized out>, argc=argc@entry=1,
    argv=argv@entry=0x7fffffffdf68, env=env@entry=0x7fffffffdf78)
    at dl-init.c:72
#4 0x00007ffff7fe3a89 in call_init (env=0x7fffffffdf78, argv=0x7fffffffdf68,
    argc=1, l=<optimized out>) at dl-init.c:30
#5 _dl_init (main_map=0x7ffff7ffe190, argc=1, argv=0x7fffffffdf68,
    env=0x7fffffffdf78) at dl-init.c:119
#6 0x00007ffff7fd40ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#7 0x0000000000000001 in ?? ()
#8 0x00007fffffffe2b3 in ?? ()
#9 0x0000000000000000 in ?? ()

Tuomo Sipola (tuomosipola) wrote :

Temporary workaround: Installing the newest version from snap.

Eli Schwartz (eschwartz) wrote :

@doko, Arch Linux staff here.

The reason we reverted the glibc commit has nothing to do with rebuilding electron with bfd or gold linkers. lld works fine, and we use it in our distribution electron packages without issue!

The problem is entirely due to people who ship proprietary electron applications containing *old* prebuilt electron binaries provided by the Electron project. Prebuilt binaries are pretty unfortunate in general, and the fact that they're broken just goes to show how utterly right we were to use the system lld when building electron, but, that doesn't help people who use prebuilt packages!

There's a couple solutions to the problem of prebuilt binaries with invalid codegen:

- Rebuild all electron applications so they utilize the correctly linked system electron, including rebuilding the binary node extensions that are proprietary and don't have available source code. Then convince all Ubuntu users to exclusively use these applications from the Ubuntu repositories. Wait, what system electron? Ubuntu doesn't have one. Also, that's a lot of applications to rebuild, and how do you know which ones users need?

- Force all proprietary software using electron, to build their own updates incorporating the new electron 2.0.8 (that is notable because the electron build scripts which use a private clang/llvm/lld toolchain, have updated their toolchain to not use a broken lld revision). Good luck getting that to happen!

- Revert the glibc commit, which means you're certainly no worse off than glibc 2.27 used to be, and which lets binaries in the wild still work, at least for a couple months until more proprietary applications get fixed.

...

I entirely sympathize with the desire to say "prebuilt binaries suck and it's not our fault if they're also broken, maybe if their stuff is broken on Ubuntu they'll be worried enough to fix it pronto".

I'm merely commenting on the options, with the observation that someone with more authority than me chose to use the patch in Arch Linux.

thanks @maarten !! CrashPlan GUI works now.

David Skoland (dskoland) wrote :

@maarten's patch worked for me.

ndstate (ndstate) on 2019-01-02
Changed in glibc (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.