Skip to content
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

glibc 2.28 crash on Arch Linux [signal-desktop-bin, .deb binary] #2600

Open
1 task done
lnicola opened this issue Aug 3, 2018 · 31 comments
Open
1 task done

glibc 2.28 crash on Arch Linux [signal-desktop-bin, .deb binary] #2600

lnicola opened this issue Aug 3, 2018 · 31 comments
Labels

Comments

@lnicola
Copy link

lnicola commented Aug 3, 2018

  • I have searched open and closed issues for duplicates

Bug description

$ gdb --args /opt/Signal/signal-desktop            
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/Signal/signal-desktop...(no debugging symbols found)...done.
(gdb) r
Starting program: /opt/Signal/signal-desktop 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000c39ea0 in ?? ()
(gdb) bt
#0  0x0000000000c39ea0 in  ()
#1  0x00007ffff7d833a2 in node::http2::Http2Session::Callbacks::Callbacks(bool) () at /opt/Signal/libnode.so
#2  0x00007ffff7d83465 in  () at /opt/Signal/libnode.so
#3  0x00007ffff7fe36da in call_init.part () at /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7fe37da in _dl_init () at /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7fd503a in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#6  0x0000000000000001 in  ()
#7  0x00007fffffffe399 in  ()
#8  0x0000000000000000 in  ()

Other Electron apps work (VS Code).

Platform info

Signal version: 1.14.4-1

Operating System: Arch Linux

Linked device version: Android 4.23.4

Link to debug log

N/A

Workaround

Just use the Flatpak version (thanks @aerosol).

@Edu4rdSHL
Copy link

Edu4rdSHL commented Aug 3, 2018

I'm able to reproduce the same "Segmentation Fault" using the 1.15.0-beta.10 version of Signal-Desktop. It happened after of last electron update 2.0.6.

➤➤➤➤ ▶ signal-desktop NODE_ENV production NODE_CONFIG_DIR /usr/lib/signal/resources/app.asar/config NODE_CONFIG {} ALLOW_CONFIG_MUTATIONS undefined HOSTNAME undefined NODE_APP_INSTANCE undefined SUPPRESS_NO_CONFIG_WARNING undefined Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' } userData: /home/sechacklabs/.config/Signal making app single instance {"name":"log","hostname":"SecHackLabs","pid":9268,"level":30,"msg":"app ready","time":"2018-08-03T13:26:14.417Z","v":0} {"name":"log","hostname":"SecHackLabs","pid":9268,"level":30,"msg":"Ensure attachments directory exists","time":"2018-08-03T13:26:14.422Z","v":0} /usr/bin/signal-desktop: line 3: 9268 Segmentation fault (core dumped) electron /usr/lib/signal/resources/app.asar $@

Here is the coredump: https://gist.github.com/Edu4rdSHL/d97a4c8d8df3672c6768913dba375a33

@lnicola
Copy link
Author

lnicola commented Aug 3, 2018

I'm not sure, it worked fine until.. yesterday or so. It might be a dependency in my case.

@Edu4rdSHL
Copy link

@lnicola the last electron update break signal, though.

@lnicola
Copy link
Author

lnicola commented Aug 3, 2018

This happens on testing, at least. I didn't try the latest release since it's not available yet, and the beta package doesn't work (URL gives 404 since it was released).

@dessalines
Copy link

I'm getting this issue too.

@jplatte
Copy link

jplatte commented Aug 4, 2018

It's not the electron update that breaks signal. I temporarily downgraded electron to 2.0.5 and Signal still crashed.

@lnicola
Copy link
Author

lnicola commented Aug 4, 2018

Same issue on 1.15.0-2.

@lnicola
Copy link
Author

lnicola commented Aug 4, 2018

These are the packages I updated around the point where it stopped working:

16214:[2018-08-02 09:44] [ALPM] upgraded gdbm (1.16-1 -> 1.17-1)
16215:[2018-08-02 09:45] [ALPM] upgraded perl (5.26.2-2 -> 5.28.0-1)
16216:[2018-08-02 09:45] [ALPM] upgraded libldap (2.4.46-1 -> 2.4.46-2)
16217:[2018-08-02 09:45] [ALPM] upgraded archiso (37-1 -> 38-1)
16218:[2018-08-02 09:45] [ALPM] upgraded boost-libs (1.67.0-5 -> 1.67.0-6)
16219:[2018-08-02 09:45] [ALPM] upgraded boost (1.67.0-5 -> 1.67.0-6)
16220:[2018-08-02 09:45] [ALPM] upgraded bubblewrap (0.2.1-1 -> 0.3.0-1)
16221:[2018-08-02 09:45] [ALPM] upgraded libdrm (2.4.92-1 -> 2.4.93-1)
16222:[2018-08-02 09:45] [ALPM] upgraded device-mapper (2.02.180-1 -> 2.02.181-1)
16223:[2018-08-02 09:45] [ALPM] upgraded libpcap (1.8.1-2 -> 1.9.0-1)
16224:[2018-08-02 09:45] [ALPM] upgraded lm_sensors (3.4.0-4 -> 3.4.0+5176+dcf23676-1)
16225:[2018-08-02 09:45] [ALPM] upgraded colord (1.4.3-1 -> 1.4.3-2)
16226:[2018-08-02 09:45] [ALPM] upgraded libproxy (0.4.15-7 -> 0.4.15-8)
16227:[2018-08-02 09:45] [ALPM] upgraded chromium (68.0.3440.75-1 -> 68.0.3440.84-1)
16228:[2018-08-02 09:45] [ALPM] upgraded postgresql-libs (10.4-4 -> 10.4-5)
16229:[2018-08-02 09:45] [ALPM] upgraded gdal (2.3.1-2 -> 2.3.1-3)
16230:[2018-08-02 09:45] [ALPM] upgraded geoip (1.6.11-1 -> 1.6.12-1)
16231:[2018-08-02 09:45] [ALPM] upgraded gnome-bluetooth (3.28.1-1 -> 3.28.2-1)
16232:[2018-08-02 09:45] [ALPM] upgraded graphicsmagick (1.3.30-1 -> 1.3.30-2)
16233:[2018-08-02 09:45] [ALPM] upgraded mkinitcpio-busybox (1.28.4-1 -> 1.29.2-1)
16234:[2018-08-02 09:45] [ALPM] upgraded linux (4.17.11-1 -> 4.17.11.arch1-1)
16235:[2018-08-02 09:45] [ALPM] upgraded lvm2 (2.02.180-1 -> 2.02.181-1)
16236:[2018-08-02 09:45] [ALPM] upgraded perl-algorithm-diff (1.1903-3 -> 1.1903-4)
16237:[2018-08-02 09:45] [ALPM] upgraded perl-error (0.17026-1 -> 0.17026-2)
16238:[2018-08-02 09:45] [ALPM] upgraded perl-timedate (2.30-4 -> 2.30-5)
16239:[2018-08-02 09:45] [ALPM] upgraded perl-mailtools (2.20-1 -> 2.20-2)
16240:[2018-08-02 09:45] [ALPM] upgraded perl-parallel-forkmanager (1.19-2 -> 1.19-3)
16241:[2018-08-02 09:45] [ALPM] upgraded perl-regexp-common (2016010801-4 -> 2016010801-5)
16242:[2018-08-02 09:45] [ALPM] upgraded perl-rename (1.9-2 -> 1.9-3)
16243:[2018-08-02 09:45] [ALPM] upgraded remmina (1:1.2.31.1-1 -> 1:1.2.31.2-1)
16244:[2018-08-02 09:45] [ALPM] upgraded tracker (2.1.0-1 -> 2.1.1-1)
16307:[2018-08-02 22:59] [ALPM] upgraded linux-api-headers (4.16.1-1 -> 4.17.11-1)
16309:[2018-08-02 22:59] [ALPM] upgraded glibc (2.27-3 -> 2.28-1)
16316:[2018-08-02 22:59] [ALPM] upgraded binutils (2.30-5 -> 2.31.1-1)
16317:[2018-08-02 23:00] [ALPM] upgraded gcc-libs (8.1.1+20180531-1 -> 8.2.0-2)
16318:[2018-08-02 23:00] [ALPM] upgraded gcc (8.1.1+20180531-1 -> 8.2.0-2)
16319:[2018-08-02 23:00] [ALPM] upgraded libtool (2.4.6+40+g6ca5e224-7 -> 2.4.6+42+gb88cebd5-1)
16320:[2018-08-02 23:00] [ALPM] upgraded linux (4.17.11.arch1-1 -> 4.17.11.arch1-2)
16346:[2018-08-03 09:17] [ALPM] upgraded harfbuzz (1.8.4-1 -> 1.8.5-1)
16347:[2018-08-03 09:17] [ALPM] upgraded harfbuzz-icu (1.8.4-1 -> 1.8.5-1)
16348:[2018-08-03 09:17] [ALPM] upgraded pipewire (0.2.0-1 -> 0.2.2-1)
16349:[2018-08-03 09:17] [ALPM] upgraded mutter (3.28.3-1 -> 3.28.3-2)
16358:[2018-08-03 20:27] [ALPM] upgraded cryptsetup (2.0.3-2 -> 2.0.4-1)
16359:[2018-08-03 20:27] [ALPM] upgraded dbus (1.12.8-1 -> 1.12.10-1)
16360:[2018-08-03 20:27] [ALPM] upgraded libgphoto2 (2.5.18-1 -> 2.5.19-1)
16429:[2018-08-03 22:12] [ALPM] upgraded linux (4.17.11.arch1-2 -> 4.17.12.arch1-1)

This only happens on testing. I'll be careful when upgrading my system to see which package causes it.

@Edu4rdSHL
Copy link

Now, i can confirm the real problem, electron is not breaking signal, signal was broken after of 1.15.0-beta.9 update, downgrading signal to 1.15.0-beta.8 continue working.

@lnicola
Copy link
Author

lnicola commented Aug 4, 2018

That must be a different issue, my report was about 1.14.4.

@Edu4rdSHL
Copy link

I'm going to open a new issue.

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

Caused by upgrading from glibc 2.27-3 to 2.28-1.

@scottnonnenberg-signal
Copy link
Contributor

So, to be clear:

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

This issue is about silent crashes (with no output) on both 1.14 and 1.15 that seem to be caused by a glibc upgrade.

#2610 seems to be about more than one thing: building Signal from source, noexec /tmp, and maybe others.

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

Also, the Arch package seems to extract a .deb: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=signal-desktop-bin.

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

I've skimmed https://github.com/signalapp/Signal-Desktop/blob/development/CONTRIBUTING.md, but I'm not sure how to make a release build. Does this look all right?

yarn install --frozen-lockfile # Install and build dependencies (this will take a while)
yarn grunt                     # Generate final JS and CSS assets
yarn icon-gen                  # Generate full set of icons for Electron

yarn generate
yarn build-release

There's already a config/production.json file, will it be picked automatically?

@Edu4rdSHL
Copy link

@lnicola answering to:

Also, the Arch package seems to extract a .deb: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=signal-desktop-bin.

You're talking about the signal-desktop-bin package that is not having problems for me, the real issue that I'm reporting is for the signal package that compiles signal-desktop from source.

@lnicola lnicola changed the title Start-up crash on Arch Linux glibc 2.28 crash on Arch Linux [signal-desktop-bin, .deb binary] Aug 6, 2018
@j0ni
Copy link

j0ni commented Aug 6, 2018

I am seeing this segmentation fault when I use signal-desktop-bin fwiw.

@aerosol
Copy link

aerosol commented Aug 6, 2018

FWIW, downgrading glibc for the time being, did the trick for me:

$ sudo pacman -U  /var/cache/pacman/pkg/glibc-2.27-3-x86_64.pkg.tar.xz /var/cache/pacman/pkg/lib32-glibc-2.27-3-x86_64.pkg.tar.xz

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

Beware, that might break other packages, since a lot of stuff got rebuilt after the glibc upgrade.

@ssentanoe
Copy link

Confirmed using the glibc 2.28 is crashed (signal-desktop-bin). After downgrade to glibc 2.27-3 it works just fine again.

@lnicola
Copy link
Author

lnicola commented Aug 6, 2018

The thing is, that Arch package is built from the official Debian or Ubuntu package. This may not be fixable until Debian switches to the new glibc, which may take years or whatever.

And it's unfair to expect the Signal developers to do anything about this. So, if it doesn't turn out to be an easy fix, we will have to switch to the signal package, which currently doesn't work because of unrelated reasons.

@aerosol
Copy link

aerosol commented Aug 6, 2018

Since the same issue occurs for slack-desktop now, perhaps it's worth watching the workarounds/solutions posted there. FWIW, people on IRC suggest switching to flatpak.

@christianbundy
Copy link

christianbundy commented Aug 6, 2018

I noticed the same thing after running pacman -Syu, both patchbay-git and signal-desktop-bin are crashing:

[   29.554210] electron[1721]: segfault at b87650 ip 0000000000b87650 sp 00007ffec19a3a58 error 15 in electron[200000+160c000]
[  107.182111] signal-desktop[9339]: segfault at c39ea0 ip 0000000000c39ea0 sp 00007ffc238483f8 error 15 in signal-desktop[200000+1603000]
[  117.136935] electron[11257]: segfault at b87650 ip 0000000000b87650 sp 00007ffc90d80608 error 15 in electron[200000+160c000]
[  117.492202] electron[11274]: segfault at b87650 ip 0000000000b87650 sp 00007fffd6dec088 error 15 in electron[200000+160c000]

This doesn't seem to be an issue with the Signal Desktop app, and from what I can tell most of us are Arch users. Maybe we should move this discussion to the Arch BBS?


Nevermind, this doesn't seem specific to Arch Linux.

@luminoso
Copy link

luminoso commented Aug 7, 2018

@christianbundy this problem isn't happening just on ArchLinux, but also on Fedora. I think that this discussion belongs here. A new/fresh build should work across different platforms like it did previously.

@almir
Copy link

almir commented Aug 7, 2018

People using Arch Linux can do this in case they don't want to downgrade glibc:

# Download and extract glibc 2.27-3
curl -fSL https://archive.archlinux.org/repos/2018/08/01/core/os/x86_64/glibc-2.27-3-x86_64.pkg.tar.xz -o /tmp/glibc-2.27-3-x86_64.pkg.tar.xz
sudo mkdir /opt/glibc-2.27
sudo bsdtar xf /tmp/glibc-2.27-3-x86_64.pkg.tar.xz --cd /opt/glibc-2.27

# Install PatchELF package
sudo pacman -Sy patchelf

# Patch the Signal binary to point to glibc-2.27
sudo patchelf --set-interpreter /opt/glibc-2.27/usr/lib/ld-linux-x86-64.so.2 /opt/Signal/signal-desktop
sudo patchelf --set-rpath /opt/Signal:/opt/glibc-2.27/usr/lib /opt/Signal/signal-desktop
sudo patchelf --shrink-rpath /opt/Signal/signal-desktop

@mxmilkiib
Copy link

Rolling release distributions are continuing to become a bigger thing. Maybe an extra build for such might be an appropriate solution?

@zatrazz
Copy link

zatrazz commented Aug 8, 2018

On Electron [1] project, it seems the issue is related to linker where lld seems to generate wrong relocation. Could be this same issue here?

[1] electron/electron#13972 (comment)

@norpol
Copy link

norpol commented Aug 11, 2018

In case you are switching to the flatpak version, you can still keep your old Signal config by creating a symlink into the flatpak config dir.

mv -vi ~/.var/app/org.signal.Signal/config/Signal{,.orig}
ln -vs ~/.config/Signal ~/.var/app/org.signal.Signal/config/Signal

Update

Might not completely work as advertised... It manages to download the media, but fails to display them afterwards... I guess some sandboxing issue...

INFO 2018-08-11T16:30:58.587Z Warning: denying request to path '/home/<user>/.var/app/org.signal.Signal/config/Signal/attachments.noindex/c8/c8....'

So instead doing this might be preferred (be careful with flatpak removing this file though!):

mv -vi ~/.var/app/org.signal.Signal/config/Signal{,.orig}
mv ~/.config/Signal ~/.var/app/org.signal.Signal/config/

@scottnonnenberg-signal
Copy link
Contributor

@norpol For security reasons, we ensure that any file accessed by the app is inside of our primary config directory, hence the 'denying request to path' log entry. We do, however, attempt to follow symlinks so that config directory is the right one, so I'm not exactly sure what's going on there:

Signal-Desktop/main.js

Lines 584 to 594 in 816228f

const userDataPath = await getRealPath(app.getPath('userData'));
const installPath = await getRealPath(app.getAppPath());
if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'test-lib') {
installFileHandler({
protocol: electronProtocol,
userDataPath,
installPath,
isWindows: process.platform === 'win32',
});
}

jthomaschewski added a commit to jthomaschewski/signal-desktop-bin-aur that referenced this issue Aug 16, 2018
@norpol
Copy link

norpol commented Aug 18, 2018

I can verify that the segfault is fixed with glibc 2.28-4 and signal-desktop-beta-bin 1.15.5beta.1-1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests