com.slack.Slack icon indicating copy to clipboard operation
com.slack.Slack copied to clipboard

Slack crashes with Wayland

Open castagnag opened this issue 1 year ago • 8 comments

Hi,

I am trying to use Slack under Fedora 41. The application works flawless on my two laptops (Thinkpad X1 carbon) but fails on my desktop. The main difference in the configuration of the machines is that the desktop uses an nvidia card. Here you are what I obtain when I try to launch slack on the desktop:

$ flatpak run com.slack.Slack
Initializing local storage instance
Starting Sentry
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
[4:0107/164854.378736:ERROR:wayland_connection.cc(205)] Failed to connect to Wayland display: No such file or directory (2)
[4:0107/164854.378752:ERROR:ozone_platform_wayland.cc(264)] Failed to initialize Wayland platform
[4:0107/164854.378754:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.
/app/bin/com.slack.Slack: line 12:     4 Segmentation fault      (core dumped) env TMPDIR=${XDG_CACHE_HOME} XDG_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD) zypak-wrapper /app/extra/slack -s ${EXTRA_ARGS} "$@"

And here you are the result of journalctl when launching slack:

Jan 07 16:55:05 thallium systemd[3058]: Started app-flatpak-com.slack.Slack-65771.scope.
Jan 07 16:55:06 thallium systemd[3058]: Started app-flatpak-com.slack.Slack-65803.scope.
Jan 07 16:55:06 thallium audit[65789]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=65789 comm="slack" exe="/app/extra/slack" sig=11 res=1
Jan 07 16:55:06 thallium systemd-coredump[65854]: Process 65789 (slack) of user 1000 terminated abnormally with signal 11/SEGV, processing...
Jan 07 16:55:06 thallium audit[65854]: AVC avc:  denied  { sys_admin } for  pid=65854 comm="systemd-coredum" capability=21  scontext=system_u:system_r:systemd_coredump_t:s0 tcontext=system_u:system_r:systemd_coredump_t:s0 tclass=capability permissive=0
Jan 07 16:55:06 thallium audit[65854]: SYSCALL arch=c000003e syscall=192 success=no exit=-61 a0=558278d6ac40 a1=7f2966346117 a2=558278d70270 a3=67 items=0 ppid=2 pid=65854 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-coredum" exe="/usr/lib/systemd/systemd-coredump" subj=system_u:system_r:systemd_coredump_t:s0 key=(null)
Jan 07 16:55:06 thallium audit: PROCTITLE proctitle=2F7573722F6C69622F73797374656D642F73797374656D642D636F726564756D70003635373839003130303000313030300031310031373336323635333036003138343436373434303733373039353531363135007468616C6C69756D
Jan 07 16:55:06 thallium audit: BPF prog-id=476 op=LOAD
Jan 07 16:55:06 thallium audit: BPF prog-id=477 op=LOAD
Jan 07 16:55:06 thallium audit: BPF prog-id=478 op=LOAD
Jan 07 16:55:06 thallium systemd[1]: Started [email protected] - Process Core Dump (PID 65854/UID 0).
Jan 07 16:55:06 thallium audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@9-65854-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 07 16:55:06 thallium abrt-dump-journal-core[2004]: Failed to obtain all required information from journald
Jan 07 16:55:06 thallium systemd-coredump[65855]: [🡕] Process 65789 (slack) of user 1000 dumped core.
                                                  
                                                  Stack trace of thread 4:
                                                  #0  0x0000560d06ffad1e n/a (n/a + 0x0)
                                                  #1  0x0000560d06ff4459 n/a (n/a + 0x0)
                                                  #2  0x0000560d0718cea9 n/a (n/a + 0x0)
                                                  #3  0x0000560d071cc03e n/a (n/a + 0x0)
                                                  #4  0x0000560d070e8ace n/a (n/a + 0x0)
                                                  #5  0x0000560d070e8b8e n/a (n/a + 0x0)
                                                  #6  0x0000560d09725473 n/a (n/a + 0x0)
                                                  #7  0x0000560d097255de n/a (n/a + 0x0)
                                                  #8  0x0000560d09729594 n/a (n/a + 0x0)
                                                  #9  0x0000560d09729178 n/a (n/a + 0x0)
                                                  #10 0x0000560d0972509b n/a (n/a + 0x0)
                                                  #11 0x0000560d0735c520 n/a (n/a + 0x0)
                                                  #12 0x0000560d0735da2e n/a (n/a + 0x0)
                                                  #13 0x0000560d0735d888 n/a (n/a + 0x0)
                                                  #14 0x0000560d0735b54a n/a (n/a + 0x0)
                                                  #15 0x0000560d0735b630 n/a (n/a + 0x0)
                                                  #16 0x0000560d07008017 n/a (n/a + 0x0)
                                                  #17 0x00007fddf1448299 n/a (n/a + 0x0)
                                                  #18 0x00007fddef8d4188 n/a (n/a + 0x0)
                                                  #19 0x00007fddef8d424b n/a (n/a + 0x0)
                                                  #20 0x00007fddf144852b n/a (n/a + 0x0)
                                                  #21 0x0000560d06be402a n/a (n/a + 0x0)
                                                  ELF object binary architecture: AMD x86-64
Jan 07 16:55:06 thallium systemd[1]: [email protected]: Deactivated successfully.
Jan 07 16:55:06 thallium audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@9-65854-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 07 16:55:06 thallium systemd[1]: [email protected]: Consumed 573ms CPU time, 710.3M memory peak.
Jan 07 16:55:07 thallium audit: BPF prog-id=478 op=UNLOAD
Jan 07 16:55:07 thallium audit: BPF prog-id=477 op=UNLOAD
Jan 07 16:55:07 thallium audit: BPF prog-id=476 op=UNLOAD
Jan 07 16:55:07 thallium abrt-server[65865]: Unsupported container technology
Jan 07 16:55:07 thallium abrt-server[65865]: Lock file '.lock' was locked by process 65869, but it crashed?
Jan 07 16:55:07 thallium abrt-applet[3639]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
Jan 07 16:55:07 thallium abrt-notification[65918]: [🡕] Process 65789 (slack) crashed in ??()

Please let me know if you need more information, and thank you for your help

castagnag avatar Jan 07 '25 15:01 castagnag

On Fedora 41 (Kinoite) it now seems to fail without even recognizing that it's Wayland:

Initializing local storage instance
Starting Sentry
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
[4:0407/111450.658678:ERROR:ozone_platform_x11.cc(246)] Missing X server or $DISPLAY
[4:0407/111450.658697:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.
/app/bin/com.slack.Slack: line 12:     4 Segmentation fault      (core dumped) env TMPDIR=${XDG_CACHE_HOME} XDG_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD) zypak-wrapper /app/extra/slack -s ${EXTRA_ARGS} "$@"

Likewise, this is a very recent regression. It had been running just fine here on Wayland + Fedora 41.

UPDATE: I just found a workaround using flatseal to enable fallback:

Image

vwbusguy avatar Apr 07 '25 18:04 vwbusguy

Tested on Debian 13 (testing), KDE 6.3.2:

nexus@prism:~$ flatpak install flathub com.slack.Slack
nexus@prism:~$ flatpak run com.slack.Slack

Image

nexus@prism:~$ flatpak override --user --socket=wayland com.slack.Slack
nexus@prism:~$ flatpak run com.slack.Slack

Image

@vwbusguy Is the crash happening completely out of the box on Wayland? (without socket=wayland enabled)?

AKoskovich avatar Apr 07 '25 23:04 AKoskovich

I tried what you suggested on my Fedora:

beppe@thallium:~/SLIDES/24EGALITES$  flatpak override --user --socket=wayland com.slack.Slack
beppe@thallium:~/SLIDES/24EGALITES$  flatpak run com.slack.Slack
Initializing local storage instance
Starting Sentry
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
LaunchProcess: failed to execvp:
xdg-settings
[4:0409/095438.069650:ERROR:wayland_event_watcher.cc(47)] libwayland: [destroyed object]: error 7: failed to import supplied dmabufs: Could not bind the given EGLImage to a CoglTexture2D

/app/bin/com.slack.Slack: line 12:     4 Trace/breakpoint trap   (core dumped) env TMPDIR=${XDG_CACHE_HOME} XDG_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD) zypak-wrapper /app/extra/slack -s ${EXTRA_ARGS} "$@"

castagnag avatar Apr 09 '25 07:04 castagnag

I also just ran into this when switching over my desktop to Wayland (with nvidia-open drivers on Bluefin / Fedora 42).

X works, Wayland works on my all-AMD systems, Wayland does not work w/ nvidia-open:

[4:0506/222816.489387:ERROR:wayland_event_watcher.cc(47)] libwayland: [destroyed object]: error 7: failed to import supplied dmabufs: Could not bind the given EGLImage to a CoglTexture2D

endocrimes avatar May 06 '25 20:05 endocrimes

I think it's probably the nvidia open drivers. On my older system with a 1660ti and older proprietary drivers Slack just works even on wayland

In my new build with 5070ti and nvidia-open it does not work I have the same issue as OP

Initializing local storage instance
Starting Sentry
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
[4:0724/161533.213071:ERROR:wayland_connection.cc(199)] Failed to connect to Wayland display: No such file or directory (2)
[4:0724/161533.213089:ERROR:ozone_platform_wayland.cc(276)] Failed to initialize Wayland platform
[4:0724/161533.213105:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.
/app/bin/com.slack.Slack: line 12:     4 Segmentation fault      env TMPDIR=${XDG_CACHE_HOME} XDG_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD) zypak-wrapper /app/extra/slack -s ${EXTRA_ARGS} "$@"

vikigenius avatar Jul 25 '25 00:07 vikigenius

I managed to solve it with

flatpak override --user --socket=wayland com.slack.Slack

vikigenius avatar Jul 25 '25 00:07 vikigenius

I also just ran into this when switching over my desktop to Wayland (with nvidia-open drivers on Bluefin / Fedora 42).

X works, Wayland works on my all-AMD systems, Wayland does not work w/ nvidia-open:

[4:0506/222816.489387:ERROR:wayland_event_watcher.cc(47)] libwayland: [destroyed object]: error 7: failed to import supplied dmabufs: Could not bind the given EGLImage to a CoglTexture2D

Have you figured this out? I get the exact same crash with all electron apps when I try to run them under Wayland. Gnome + Nvidia latest drivers/packages.

asheriif avatar Jul 29 '25 23:07 asheriif

@asheriif I replaced my 3080 with a 9070XT and just moved some of my doesn't-play-nicely-with-AMD-GPUs workflows to a mac.

endocrimes avatar Jul 30 '25 09:07 endocrimes