ssbc / patchwork

A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB).
https://www.scuttlebutt.nz
GNU Affero General Public License v3.0
3.59k stars 333 forks source link

linux appimage segfault #894

Closed joeyh closed 5 years ago

joeyh commented 5 years ago

I have the appimage from november, which had been working, but is now crashing on startup with a segfault. No window is displayed. Also happens if I move ~/.ssb away, so it's not database corruption. It seems to have been caused by an apt-get upgrade of my debian system, I use debian unstable and guess some library changed in a way that broke it.

installed: X-AppImage-BuildId=c63ff340-1698-11a8-244f-6fa2e97de546 image: X-AppImage-BuildId=12082020-d7f2-11a8-38da-b9df64c5f934 zenity, kdialog, Xdialog missing. Skipping /tmp/.mount_patchw0QFgHA/AppRun. Segmentation fault

(Now installed with npm and that's working.)

christianbundy commented 5 years ago

@joeyh Is there anything I can do to try to help reproduce the issue? I'm on Arch but I can run Docker containers and such if you think it would be helpful. The only issue I've had recently has been an issue with [metacopy[(https://www.spinics.net/lists/linux-unionfs/msg06109.html) and my solution was:

echo N | sudo tee /sys/module/overlay/parameters/metacopy

Odds are that you're experiencing a completely different problem, but my issue cropped up at the exact same time so I thought I'd include the information just in case.

joeyh commented 5 years ago

I don't have metacopy. My only hint about what it may be is that the strace tries to read a selinux config file (which DNE) just before the segfault.

statfs("/sys/fs/selinux", 0x7ffe185a2e90) = -1 ENOENT (No such file or directory) statfs("/selinux", 0x7ffe185a2e90) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 4 fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 read(4, "nodev\tsysfs\nnodev\trootfs\nnodev\tr"..., 1024) = 361 read(4, "", 1024) = 0 close(4) = 0 madvise(0x3c650a3da000, 8192, MADV_DONTNEED) = 0 access("/etc/selinux/config", F_OK) = -1 ENOENT (No such file or directory) --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0xb87650} ---

But I think this is a red herring: the last thing libselinux's init_lib() does is access(SELINUXCONFIG), so it's done before the segfault.

-- see shy jo

christianbundy commented 5 years ago

Hmm, any chance you have a list of upgrades from /var/log/apt/history.log that might have triggered this, or are you updating pretty constantly? I'd love to track this down but I'm not sure how.

cryptix commented 5 years ago

If this turns out do be related to a system upgrade it means the AppImages are not fully self-contained and we probably should escalate it to electron-builder. (Maybe there already is an issue over there?)

christianbundy commented 5 years ago

https://github.com/electron-userland/electron-builder/issues/3206?

joeyh commented 5 years ago

Christian Bundy wrote:

Hmm, any chance you have a list of upgrades from /var/log/apt/history.log that might have triggered this, or are you updating pretty constantly? I'd love to track this down but I'm not sure how.

It's a bit hard because I can't remember when I restarted patchwork before this exactly and I upgrade fairly regularly.

Strace shows patchwork links in the system libraries in the attached library-list; of those the last upgraded was libgmp but I tried downgrading it to the previous version and it didn't help. Some of the other recently upgraded ones like libstdc++6 are too hard to downgrade..

-- see shy jo

-rw-r--r-- 1 root root 14128 Oct 9 11:03 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 -rw-r--r-- 1 root root 1310216 Oct 9 11:03 /usr/lib/x86_64-linux-gnu/libX11.so.6 -rw-r--r-- 1 root root 14528 Jul 28 2017 /usr/lib/x86_64-linux-gnu/libXau.so.6 -rw-r--r-- 1 root root 10296 Jan 20 2017 /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 -rw-r--r-- 1 root root 47768 Nov 9 15:52 /usr/lib/x86_64-linux-gnu/libXcursor.so.1 -rw-r--r-- 1 root root 10280 Aug 20 2017 /usr/lib/x86_64-linux-gnu/libXdamage.so.1 -rw-r--r-- 1 root root 22728 Mar 2 2017 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 -rw-r--r-- 1 root root 73424 Oct 5 2014 /usr/lib/x86_64-linux-gnu/libXext.so.6 -rw-r--r-- 1 root root 22656 Dec 5 2016 /usr/lib/x86_64-linux-gnu/libXfixes.so.3 -rw-r--r-- 1 root root 63976 Jan 23 2017 /usr/lib/x86_64-linux-gnu/libXi.so.6 -rw-r--r-- 1 root root 14496 Aug 30 08:25 /usr/lib/x86_64-linux-gnu/libXinerama.so.1 -rw-r--r-- 1 root root 43384 Dec 6 2016 /usr/lib/x86_64-linux-gnu/libXrandr.so.2 -rw-r--r-- 1 root root 39480 Dec 5 2016 /usr/lib/x86_64-linux-gnu/libXrender.so.1 -rw-r--r-- 1 root root 1042728 Nov 27 07:34 /usr/lib/x86_64-linux-gnu/libasound.so.2 -rw-r--r-- 1 root root 157616 Sep 8 12:19 /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 -rw-r--r-- 1 root root 210632 Oct 4 10:24 /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 -rw-r--r-- 1 root root 207016 Nov 19 16:06 /usr/lib/x86_64-linux-gnu/libatspi.so.0 -rw-r--r-- 1 root root 72760 Oct 10 04:17 /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 -rw-r--r-- 1 root root 52336 Oct 10 04:17 /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 -rw-r--r-- 1 root root 42768 Oct 20 09:36 /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 -rw-r--r-- 1 root root 1171048 Oct 20 09:36 /usr/lib/x86_64-linux-gnu/libcairo.so.2 -rw-r--r-- 1 root root 595928 Nov 19 16:53 /usr/lib/x86_64-linux-gnu/libcups.so.2 -rw-r--r-- 1 root root 30640 Jun 19 03:11 /usr/lib/x86_64-linux-gnu/libdatrie.so.1 -rw-r--r-- 1 root root 165816 Aug 6 07:37 /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2 -rw-r--r-- 1 root root 1250568 Oct 4 20:28 /usr/lib/x86_64-linux-gnu/libepoxy.so.0 -rw-r--r-- 1 root root 35224 Nov 27 06:52 /usr/lib/x86_64-linux-gnu/libffi.so.6 -rw-r--r-- 1 root root 281592 Nov 5 16:42 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 -rw-r--r-- 1 root root 763816 Nov 22 06:15 /usr/lib/x86_64-linux-gnu/libfreetype.so.6 -rw-r--r-- 1 root root 112904 Aug 20 09:02 /usr/lib/x86_64-linux-gnu/libfribidi.so.0 -rw-r--r-- 1 root root 1016128 Sep 30 11:45 /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 -rw-r--r-- 1 root root 149424 Sep 19 06:57 /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 -rw-r--r-- 1 root root 1707192 Sep 21 23:53 /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 -rw-r--r-- 1 root root 1158448 Sep 21 23:53 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 -rw-r--r-- 1 root root 18328 Sep 21 23:53 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 -rw-r--r-- 1 root root 533280 Dec 2 02:39 /usr/lib/x86_64-linux-gnu/libgmp.so.10 -rw-r--r-- 1 root root 1490528 Sep 18 01:37 /usr/lib/x86_64-linux-gnu/libgnutls.so.30 -rw-r--r-- 1 root root 337976 Sep 21 23:53 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 -rw-r--r-- 1 root root 178360 Aug 27 12:27 /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 -rw-r--r-- 1 root root 309712 Jul 16 20:09 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 -rw-r--r-- 1 root root 7564064 Sep 30 11:45 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 -rw-r--r-- 1 root root 927328 Nov 13 05:14 /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 -rw-r--r-- 1 root root 220872 Dec 12 2017 /usr/lib/x86_64-linux-gnu/libhogweed.so.4 -rw-r--r-- 1 root root 120752 Aug 31 09:05 /usr/lib/x86_64-linux-gnu/libidn2.so.0 -rw-r--r-- 1 root root 203600 Jul 16 20:09 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 -rw-r--r-- 1 root root 900768 Jul 16 20:09 /usr/lib/x86_64-linux-gnu/libkrb5.so.3 -rw-r--r-- 1 root root 52192 Jul 16 20:09 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 -rw-r--r-- 1 root root 117088 May 14 2018 /usr/lib/x86_64-linux-gnu/liblz4.so.1 -rw-r--r-- 1 root root 224472 Dec 12 2017 /usr/lib/x86_64-linux-gnu/libnettle.so.6 -rw-r--r-- 1 root root 252912 Sep 8 18:54 /usr/lib/x86_64-linux-gnu/libnspr4.so -rw-r--r-- 1 root root 1353688 Nov 2 01:44 /usr/lib/x86_64-linux-gnu/libnss3.so -rw-r--r-- 1 root root 200160 Nov 2 01:44 /usr/lib/x86_64-linux-gnu/libnssutil3.so -rw-r--r-- 1 root root 1236720 Aug 30 13:26 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 -rw-r--r-- 1 root root 292784 Nov 15 12:01 /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 -rw-r--r-- 1 root root 59288 Nov 15 12:01 /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 -rw-r--r-- 1 root root 96096 Nov 15 12:01 /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 -rw-r--r-- 1 root root 677904 Dec 17 2017 /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 -rw-r--r-- 1 root root 22808 Sep 8 18:54 /usr/lib/x86_64-linux-gnu/libplc4.so -rw-r--r-- 1 root root 14520 Sep 8 18:54 /usr/lib/x86_64-linux-gnu/libplds4.so -rw-r--r-- 1 root root 210864 Jul 10 07:17 /usr/lib/x86_64-linux-gnu/libpng16.so.16 -rw-r--r-- 1 root root 189360 Nov 2 01:44 /usr/lib/x86_64-linux-gnu/libsmime3.so -rw-r--r-- 1 root root 1570224 Nov 23 04:33 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -rw-r--r-- 1 root root 75776 May 16 2018 /usr/lib/x86_64-linux-gnu/libtasn1.so.6 -rw-r--r-- 1 root root 41000 Aug 1 03:02 /usr/lib/x86_64-linux-gnu/libthai.so.0 -rw-r--r-- 1 root root 1583144 Jul 8 08:26 /usr/lib/x86_64-linux-gnu/libunistring.so.2 -rw-r--r-- 1 root root 64840 Sep 5 13:20 /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 -rw-r--r-- 1 root root 35200 Sep 5 13:20 /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 -rw-r--r-- 1 root root 14216 Sep 5 13:20 /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 -rw-r--r-- 1 root root 55576 Oct 9 04:45 /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 -rw-r--r-- 1 root root 14408 Oct 9 04:45 /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 -rw-r--r-- 1 root root 166824 Oct 9 04:45 /usr/lib/x86_64-linux-gnu/libxcb.so.1 -rw-r--r-- 1 root root 264904 Aug 30 07:06 /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0

joeyh commented 5 years ago

Henry wrote:

If this turns out do be related to a system upgrade it means the AppImages are not fully self-contained and we probably should escalate it to electron-builder. (Maybe there already is an issue over there?)

Appimages are just not to be fully self-contained at all. This has caused problems with the patchwork AppImage before when used on too old a system or a system missing some library.

It's surprising that a newer version of some library is causing a segfault though; libraries using the same soname should be backwards-compatible.

-- see shy jo

stale[bot] commented 5 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

christianbundy commented 5 years ago

Hey @joeyh, I've created some new prereleases after all of our build dependencies have been updated. Could you check the releases and let me know if the AppImage is still causing problems for you? Thanks!

joeyh commented 5 years ago

ssb-patchwork-3.12.0-alpha.4-x86_64.AppImage works for me

-- see shy jo

christianbundy commented 5 years ago

Woo! Thanks a lot, happy to hear that this was resolved.