oni icon indicating copy to clipboard operation
oni copied to clipboard

Oni segfaults on startup after upgrading to glibc 2.28

Open ybc37 opened this issue 8 years ago • 18 comments

Hi!

Thanks for this amazing project :) If I can help by providing more information or anything, just let me know.

Oni Version: 0.3.6 Neovim Version (Linux only): 0.3.1 Operating System: Linux (Arch)

Issue: After upgrading glibc to version 2.28, Oni segfaults on startup. Downgrading to glibc 2.27 works around this issue.

Expected behavior: Oni starts up.

Actual behavior: Segfault on startup

Steps to reproduce:

  1. Upgrade to glibc 2.28
  2. Try to start Oni

Edit: Seems like other projects face the same issue:

  • Signal: https://github.com/signalapp/Signal-Desktop/issues/2610, https://github.com/signalapp/Signal-Desktop/issues/2600
  • AUR package of Skype using patchelf to link to glibc 2.27: https://aur.archlinux.org/cgit/aur.git/commit/?h=skypeforlinux-preview-bin&id=e3fa08c20b44

ybc37 avatar Aug 08 '18 09:08 ybc37

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Aug 08 '18 09:08 oni-bot

I have the same problem

lucasvinhas avatar Aug 08 '18 13:08 lucasvinhas

I'm also facing the same problem

d0sto avatar Aug 08 '18 20:08 d0sto

I've tagged this as an "electron-core" issue, since that seems to be the case? Or at least its a problem for electron, not necessarily that electron is the one at fault here.

The upstream issue seems to be : https://github.com/electron/electron/issues/13972

CrossR avatar Aug 08 '18 21:08 CrossR

That's probably it, yeah. I can send you a fixed Electron binary if you want to test.

K900 avatar Aug 08 '18 21:08 K900

For people, who use Oni from AUR.

I followed the example of the Skype AUR package and used patchelf to make Oni use a local copy of glibc 2.27.

Seems to work, but I cannot guarantee, that everything works. Please use it with caution and at your own risk.

Here's the hack:

mkdir /opt/oni/glibc
cd /opt/oni/glibc
curl -O https://archive.archlinux.org/packages/g/glibc/glibc-2.27-3-x86_64.pkg.tar.xz
tar xJf glibc-2.27-3-x86_64.pkg.tar.xz
patchelf --set-interpreter "/opt/oni/glibc/usr/lib/ld-linux-x86-64.so.2" ../oni
patchelf --set-rpath "/opt/oni:/opt/oni/glibc/usr/lib" ../oni

ybc37 avatar Aug 10 '18 09:08 ybc37

I modified the AUR package for my electron app to simply use the community electron instead of bundling it: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=micropad

NickGeek avatar Aug 11 '18 04:08 NickGeek

@nesmyslny Thanks for reporting! I'll port your patch until upstream is fixed.

badosu avatar Aug 14 '18 17:08 badosu

I think the problem is fixed. i've upgraded glibs to glibs2.28-4 and oni is launching without any problem

lucasvinhas avatar Aug 19 '18 19:08 lucasvinhas

It's not fixed correctly yet - Electron 2.0.8 should contain a proper fix. Once that's out, Oni will need to update to that.

K900 avatar Aug 19 '18 19:08 K900

Electron 2.0.8 has now been released!

multikatt avatar Aug 25 '18 17:08 multikatt

I still have the problem (maybe, this is fixed over the time), but I could use a workaround on my CLI $ electron /opt/oni/resources/app :D

onivim is great!! thanks :D

aiya000 avatar Sep 09 '18 06:09 aiya000

If you are on 0.3.6 @aiya000 then it hasn't got the fix in yet, which would explain this.

Though maybe now this is sorted, we should look at getting a release out sooner rather than later.

CrossR avatar Sep 09 '18 20:09 CrossR

@CrossR I installed 0.3.6-1 on my arch-linux :dog2:

$ aurma -Ss oni
aur/oni 0.3.6-1 (23, 2.33625) [installed]
    An IDE built around Neovim

Is this older?

aiya000 avatar Sep 10 '18 06:09 aiya000

Yes, this is not master.

We need oni-git on AUR for an installation using code from master.

badosu avatar Sep 10 '18 07:09 badosu

Thanks! I'll install oni-git :+1:

aiya000 avatar Sep 10 '18 07:09 aiya000

Sorry I was not clear, I still need to create this package.

Meanwhile, you have to wait for the new release or build your own: https://github.com/onivim/oni/wiki/Development#production-build

badosu avatar Sep 10 '18 07:09 badosu

I misunderstood :joy:

I'll try to build my own.

Thank you so much!

aiya000 avatar Sep 10 '18 11:09 aiya000