As of net-im/discord-0.0.26, attempting to launch results in a core dump: eric@mikan ~ $ discord [3999:0330/214124.529256:FATAL:spawn_subprocess.cc(221)] posix_spawn: No such file or directory (2) Trace/breakpoint trap (core dumped) eric@mikan ~ $ Reproducible: Always Steps to Reproduce: 1. Launch discord 2. 3. Actual Results: Discord fails to launch. Expected Results: Discord launches.
Created attachment 859308 [details] Discord strace
same issue on my machine. i think that the `posix_spawn: No such file or directory` may be somewhat misleading to the actual problem. looking at my own strace, i can see, just before the error, [pid 20328] execve("/opt/discord/chrome_crashpad_handler", ["/opt/discord/chrome_crashpad_han"..., "--monitor-self-annotation=ptype="..., "--no-rate-limit", "--database=/home/vi/.config/disc"..., "--url=https://sentry.io/api/1463"..., "--annotation=_companyName=Discor"..., "--annotation=_productName=Discor"..., "--annotation=_version=0.0.26", "--annotation=lsb-release=Gentoo "..., "--annotation=plat=Linux", "--annotation=prod=Electron", "--annotation=ver=22.3.2", "--initial-client-fd=44", "--shared-client-connection"], 0x3f48002f8900 /* 87 vars */) = -1 ENOENT (No such file or directory) and indeed /opt/discord/chrome_crashpad_handler does not exist. i put a simple bash script at that location that prints args/stdin to a file in /tmp. no stdin came in but, full args are --monitor-self-annotation=ptype=crashpad-handler --no-rate-limit --database=/home/vi/.config/discord/Crashpad --url=https://sentry.io/api/146342/minidump/?sentry_key=384ce4413de74fe0be270abe03b2b35a --annotation=_companyName=Discord Inc. --annotation=_productName=Discord --annotation=_version=0.0.26 --annotation=lsb-release=Gentoo Linux --annotation=plat=Linux --annotation=prod=Electron --annotation=ver=22.3.2 --initial-client-fd=44 --shared-client-connection discord is still ultimately failing to launch, so it's only trying to execute that file to report on some error further up the process. what the root cause error actually is im not sure.
i guess i should add that it starts failing with ECONNRESET (Connection reset by peer) in recvmsg after exexcuting the crashpad so maybe (im not very knowledgeable about electron) its' supposed to be running the whole time and the fact that the real one doesnt exist _is_ the problem? i dont have a copy of the real on around to test.
jk (sorry for the reply spam) I forgot vscode provides a copy of chrome_crashpad_handler since that's also discord I ran sudo cp /opt/vscode/chrome_crashpad_handler /opt/discord/chrome_crashpad_handler and then ran discord and it started right up. so its literally just erroring because its missing that executable
that's also electron*
Same happened previously in discord 0.0.23, see bug 890595. Then they removed the handler in 0.0.24 a day or two later. The chrome_crashpad_handler does exist in discord-0.0.26.tar.gz (but not in discord-0.0.25.tar.gz), so maybe the ebuild should conditionally install it as it seems the upstream randomly supplies it.
Created attachment 859312 [details] Ebuild with conditional crashpad --- discord-0.0.26.ebuild 2023-03-31 04:12:29.000000000 +0300 +++ discord-0.0.26-r1.ebuild 2023-03-31 10:24:32.314558216 +0300 @@ -116,6 +116,10 @@ fowners root "${DESTDIR}/chrome-sandbox" fperms 4711 "${DESTDIR}/chrome-sandbox" + # Crashpad is included in the package once in a while and when it does, it must be installed. + # See #903616 and #890595 + [[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler + dosym "${DESTDIR}/${MY_PN^}" "/usr/bin/${MY_PN}" }
Running this command is a workaround that made it work for me: $ ELECTRON_ENABLE_STACK_DUMPING=true discord
(In reply to Dawid Chemloul from comment #8) > Running this command is a workaround that made it work for me: > > $ ELECTRON_ENABLE_STACK_DUMPING=true discord courtesy of redit community: https://www.reddit.com/r/Gentoo/comments/127cuk9/i_cant_run_discord_after_update_0026/?utm_source=share&utm_medium=web2x&context=3
Same issue as well. ~ discord [4905:0331/064917.225507:FATAL:spawn_subprocess.cc(221)] posix_spawn: No such file or directory (2) [1] 4883 trace trap discord ➜ ~
(In reply to Dawid Chemloul from comment #8) > Running this command is a workaround that made it work for me: > > $ ELECTRON_ENABLE_STACK_DUMPING=true discord Thank you
Thanks to everyone who helped investigate this. I'll try to take a look this weekend and push a PR with a fix.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa52c1c5bc2c1a2ac9382f22c6dd0802b8b7250 commit faa52c1c5bc2c1a2ac9382f22c6dd0802b8b7250 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-31 16:22:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-31 16:23:15 +0000 net-im/discord: install chrome_crashpad_handler if it exists This fixes crashes at startup. Closes: https://bugs.gentoo.org/903616 Thanks-to: Jyrki Launonen <codez_iccd_99@yahoo.com> Signed-off-by: Sam James <sam@gentoo.org> net-im/discord/{discord-0.0.26.ebuild => discord-0.0.26-r1.ebuild} | 4 ++++ 1 file changed, 4 insertions(+)