You are not logged in.

#1 2023-01-31 12:19:43

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Electron applications crash with Segmentation Fault

Some background info: My current Arch installation is less than 1 month old. This has happened on two other installations (on the same machine) in the past two months. Arch was installed using the Installation Guide with a few tweaks. The system is running an up-to-date 6.1.8-arch1-1 kernel, and a patched Nvidia 525.85.05-235 graphics driver.

The issue I'm having is that multiple Electron-based applications crash/exit with Signal 11/SEGV/Segmentation Fault, for no apparent reason (at least none that my inexperience can discern).
The apps in question are:
Discord
Heroic Games Launcher (-bin)
Wootility Lekker Appimage (Keyboard configuration software) from https://aur.archlinux.org/packages/woot … r-appimage
Discord web app running on Chromium
Wootility web app also running on Chromium

Discord crashes when trying to open certain image embeds (not all, and it seems to be arbitrary), both in the desktop app and web app
Heroic games launcher crashes within a few seconds after first login to your Epic account
Wootility crashes when trying to save settings to the keyboard's onboard memory

I have provided the core dumps using 'coredumpctl info' for all the apps:

Discord: https://gist.github.com/TheOnlyPhoenix/ … 35e54d69b8
Discord web app on Chromium: https://gist.github.com/TheOnlyPhoenix/ … 32b4a76f21
Heroic Launcher: https://gist.github.com/TheOnlyPhoenix/ … 73f89ecdd6
Wootility Appimage: https://gist.github.com/TheOnlyPhoenix/ … b5a071a232
Wootility web app on Chromium: https://gist.github.com/TheOnlyPhoenix/ … 93902a3e47

I'm at a complete loss as to why this is happening. I'd be happy to provide any additional info needed. Any and all help is appreciated!

Edit: all crashes are consistently reproducible (e.g. same images crash discord)

Last edited by TheOnlyPhoenix (2023-01-31 12:25:46)

Offline

#2 2023-01-31 14:13:32

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

They all crash in https://man.archlinux.org/man/core/man- … lpath.3.en

* Check whether they yell errors on the console
* post the output of "printenv" and
* because of constant the depth of the backtraces, I'd almost guess there's some cyclic links (is. A symlinks B and B symlinks A)
* Maybe strace can show you where they're snooping around.
* You can also briefly setup a test user to see whether it's something in your $HOME

Offline

#3 2023-01-31 16:36:37

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

No errors are printed to terminal whatsoever, except for the "Segmentation Fault (Core dumped)". The programs just vanish.
Printenv is here.
I tried the test user, no change.
I'm not sure how to get the stack trace of a crashed application. Something to do with journalctl I'm assuming, but I've never used it before.

Offline

#4 2023-01-31 16:44:05

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

The stack trace is in the core dump, strace traces system calls

strace -f -o /tmp/chromium.strace chromium # chromium.strace could become huge because electron is so fat

The idea is to look at it's tail (before it crashes, those can still be some thousand relevant lines) to see what files it wants to access before it goes down.

The environment looks unsuspicious sad
Mild sanity check:

locale -a

Offline

#5 2023-01-31 21:18:42

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

locale -a gives this:

[phoenix@firebird ~]$ locale -a
C
C.UTF-8
en_US.utf8
POSIX
sv_SE.utf8

Chromium manages to output some 1.6 million lines into the strace before it crashes (before *I* crash it). I can't tell anything from the strace (nothing that makes any sense to me anyway). Here is the part around the segfault (around 700 lines). It starts to look weird around line 400.

Last edited by TheOnlyPhoenix (2023-01-31 21:19:33)

Offline

#6 2023-01-31 21:32:45

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

sv_SE.utf8 is there (so that's not it) but the strace is too short.
Feel free to post 5000-10000 lines or so (told you that this is gonna be a lot…)

Fyi, https://man.archlinux.org/man/core/man- … dvise.2.en

Offline

#7 2023-01-31 21:43:24

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Ah... I see.
Here are around 8000 lines before the crash and 2000 after: https://gist.github.com/TheOnlyPhoenix/ … 8348d01c3f

Offline

#8 2023-02-01 07:43:56

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

No notable file interaction in proximity to the crash, but

14193 newfstatat(106, "", {st_mode=S_IFREG|0755, st_size=212, ...}, AT_EMPTY_PATH) = 0

This is purely gut-based…

ps aux | grep dbus
loginctl session-status | head
echo $DBUS_SESSION_BUS_ADDRESS

Edit: also, sanity check, chromium is NOT an appimage/flatpack/snap/docker/whatever but from the repos and you don't try to sudo it either?

Last edited by seth (2023-02-01 07:52:56)

Offline

#9 2023-02-01 16:07:15

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Chromium is directly from the arch repos, yes. I'm just running as a normal user, no sudo.

[phoenix@firebird ~]$ ps aux | grep dbus
dbus         611  0.0  0.0   9096  5252 ?        Ss   17:02   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
sddm         682  0.0  0.0   8180  3984 ?        Ss   17:02   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
phoenix      753  0.0  0.0   8312  4784 ?        Ss   17:03   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
phoenix     1456  0.0  0.0   9448  2756 pts/0    S+   17:04   0:00 grep dbus
[phoenix@firebird ~]$ loginctl session-status | head
2 - phoenix (1000)
	  Since: Wed 2023-02-01 17:03:01 CET; 2min 58s ago
	 Leader: 731 (login)
	   Seat: seat0; vc2
	    TTY: tty2
	Service: login; type tty; class user
	  State: active
	   Unit: session-2.scope
		 ├─ 731 "login -- phoenix"
		 ├─ 747 -bash
[phoenix@firebird ~]$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

Offline

#10 2023-02-01 16:10:13

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

No dbus-launch, active session, but

sddm         682  0.0  0.0   8180  3984 ?        Ss   17:02   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
Service: login; type tty; class user

You're using sddm and that was the loginctl status from the GUI session launched by sddm??

Offline

#11 2023-02-01 16:17:47

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

No, I am not using SDDM, I only have it installed. I launch BSPWM using startx in a tty

Offline

#12 2023-02-01 16:18:53

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

Post your xinitrc.
And see the last link below.

Offline

#13 2023-02-01 16:22:50

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Here is my xinitrc: https://gist.github.com/TheOnlyPhoenix/ … 62c598a44a
It's very barebones, with only a few variables exported/set in the end

Offline

#14 2023-02-01 16:26:26

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

Don't fork xrandr and setxkbmap, but "unfortunately" you're importing /etc/X11/xinit/xinitrc.d/* so that's a dead end now sad

Offline

#15 2023-02-01 16:54:21

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

No other idea? Months of googling has lead me nowhere on this

Offline

#16 2023-02-01 17:06:01

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

On a wild guess, post your system journal (sudo journalctl -b) and get rid of every xdg-portal-* and flatpak package. (It is on the record for this kind of stuff and even if you want to use it, we'll need toi figure the cause before looking for a fix)
Also disable sddm if you're not using it.

Offline

#17 2023-02-01 17:28:17

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

journalctl -b (a couple of discord segfaults were actually caught here lol)

I don't have any flatpak packages installed, and I have removed xdg-desktop-portal-kde just now. SDDM is now disabled.
I'll reboot the system as well.

Edit: removing xdg-desktop-portal-kde didnt change anything

Last edited by TheOnlyPhoenix (2023-02-01 17:32:33)

Offline

#18 2023-02-01 19:36:48

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

Maybe we need to clarify something:

before *I* crash it

Chromium itself starts fine. You can browse po… the internet for cat pictures no problem.
It is *only* if and when you try to run the electron apps / webapps in the OP that chromium dies?
I might have misunderstood that aspect.

There's a bunch of eperm's in the strace…

sudo ls -lR /sys/fs/cgroup/schedtune/

Edit: on an alternative route, does sound work in chromium (eg. youtube)?

Last edited by seth (2023-02-01 19:38:40)

Offline

#19 2023-02-01 21:16:54

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Chromium itself starts fine. You can browse po… the internet for cat pictures no problem.
It is *only* if and when you try to run the electron apps / webapps in the OP that chromium dies?

Correct. *Only* once I perform the trigger event does it crash (however those events are crucial to the function of the software)
I don't seem to have a directory called "schedtune".
And yes, sound does indeed work.

Offline

#20 2023-02-01 21:37:05

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

https://support.discord.com/hc/en-us/co … -a-picture-

And check the RAM behaviour - you might simply run OOM (or hit an internal quota)

Offline

#21 2023-02-01 21:46:05

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Discord fix didn't work, sadly.
I'm fairly certain it isn't an OOM. My system has more than enough memory.
Though I did find something slightly interesting when checking dmesg: Thunar is also segfaulting yet not crashing. Might be related, might not be.

[  237.191079] thunar[1774]: segfault at 0 ip 000055ac59e8168c sp 00007ffe9ccedae0 error 4 in thunar[55ac59e17000+75000] likely on CPU 17 (core 7, socket 0)
[  237.191086] Code: f3 48 83 ec 38 64 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 48 c7 44 24 20 00 00 00 00 48 85 f6 0f 84 ff 01 00 00 48 8b 06 <48> 39 10 0f 84 92 01 00 00 4c 8b bf 28 01 00 00 4c 39 fe 0f 84 5b
[  237.191173] audit: type=1701 audit(1675286090.100:97): auid=1000 uid=1000 gid=1000 ses=1 pid=1774 comm="thunar" exe="/usr/bin/thunar" sig=11 res=1

Discord's segfault line looks like this:

audit: type=1701 audit(1675287630.258:108): auid=1000 uid=1000 gid=1000 ses=1 pid=3762 comm="ThreadPoolForeg" exe="/opt/discord/Discord" sig=11 res=1

Offline

#22 2023-02-01 22:22:10

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

A segfault is a crash, at this point the process (pid 1774) terminates.
But there may be several thunar processes and notably in desktop-mode it'll likely restart.
Could also be a crash-on-exit.

A rogue process can eat your RAM in no time, there's certainly a lot of memory management before the segfaults (madvice) and chromium might kill the process for an internal quota. Also the stack trace looks like recursion, so I'd take a look.
Does discord work in FF?

Offline

#23 2023-02-01 23:55:08

TheOnlyPhoenix
Member
Registered: 2023-01-30
Posts: 20

Re: Electron applications crash with Segmentation Fault

Does discord work in FF?

It does, actually. I'm assuming that has to do with the fact that FF doesn't use electron.

Also the stack trace looks like recursion, so I'd take a look.

What do you mean by this? What log should I get?

A rogue process can eat your RAM in no time, there's certainly a lot of memory management before the segfaults (madvice) and chromium might kill the process for an internal quota.

I don't get why the process would need to get OOM'd though. It should also be noted that more than 5 fast consecutive LMB clicks in discord will also cause it to segfault and crash.


P.S also thank you for your patience with me

Last edited by TheOnlyPhoenix (2023-02-02 00:12:22)

Offline

#24 2023-02-02 08:16:56

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Electron applications crash with Segmentation Fault

What do you mean by this? What log should I get?

The coredumps you posted

                Stack trace of thread 11480:
                #0  0x00007fc7aa8f7fd5 realpath (libc.so.6 + 0x39fd5)
                #1  0x00005560840412a7 n/a (Discord + 0x470a2a7)
                #2  0x0000556084c865d2 n/a (Discord + 0x534f5d2)
                #3  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #4  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #5  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #6  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #7  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #8  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #9  0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #10 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #11 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #12 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #13 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #14 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #15 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #16 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #17 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #18 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #19 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #20 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #21 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #22 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #23 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #24 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #25 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #26 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #27 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #28 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #29 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #30 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #31 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #32 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #33 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #34 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #35 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #36 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #37 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #38 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #39 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #40 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #41 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #42 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #43 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #44 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #45 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #46 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #47 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #48 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #49 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #50 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #51 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #52 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #53 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #54 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #55 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #56 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #57 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #58 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #59 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #60 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #61 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #62 0x0000556084c86a97 n/a (Discord + 0x534fa97)
                #63 0x0000556084c86a97 n/a (Discord + 0x534fa97)

Look at the insane depth and the entire tail is the same pointer, ie. something is calling itself perpetually, ultimately resulting in only

#0  0x00007fc7aa8f7fd5 realpath (libc.so.6 + 0x39fd5)
                #1  0x00005560840412a7 n/a (Discord + 0x470a2a7)
                #2  0x0000556084c865d2 n/a (Discord + 0x534f5d2)

more than 5 fast consecutive LMB clicks in discord

If you go into the web inspector, I assume discord will intercept those clicks w/ some javascript?

chrome://flags/ has a bunch of JS (filter for "script") options and chrome://settings/content also allows to configure javascript related settings.
It might be down to discord desperately wanting to open a popup - or it triggers a bug in the more fancy javascript features (you could try to explicitly disable all the experimental stuff etc.)

What does FF do when multi-clicking in discord?
(I don't have an account and I don't see myself having anytime soon)

Offline

#25 2023-02-02 12:43:38

seth
Member
Registered: 2012-09-03
Posts: 51,253

Offline

Board footer

Powered by FluxBB