sway icon indicating copy to clipboard operation
sway copied to clipboard

Sway crashes in wl_event_loop_dispatch

Open tigerjack opened this issue 3 years ago • 5 comments

  • Sway Version:

    • swaymsg version 1.6.1
  • Debug Log:

    • I do not have a debug log at the moment, the crash just happened and I do not know how and when it will happen again.
  • Configuration File:

    • I do not think it is a configuration problem, but I can try to attach all the files if they are needed
  • Stack Trace:

    • Sway is installed without debug symbols enabled, but this is the output of bt full
(gdb) bt full
#0  0x00007f0f5c9061c8 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#1  0x00007f0f5c903d37 in wl_display_run () at /usr/lib/libwayland-server.so.0
#2  0x000055816038a97b in  ()
#3  0x00007f0f5c619b25 in __libc_start_main () at /usr/lib/libc.so.6
#4  0x000055816038acee in  ()
  • Errors:
    • Sway is launched with sway > sway.log 2>&1. My log file contains these lines related to the time of the crash.
[011 17:40:42.468879] [glfw error 65544]: Wayland: fatal display error: Broken pipe
(EE) failed to read Wayland events: Broken pipe
Gdk-Message: 17:40:42.679: Error reading events from display: Broken pipe
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Sandbox: Unexpected EOF, op 2 flags 00 path /home/simone/.config/xkb
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Sandbox: Unexpected EOF, op 2 flags 00 path /usr/share/X11/xkb
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
(EE) could not connect to wayland server
  • Description:
    • I was just reading a PDF file from a PDF viewer running under wine.

tigerjack avatar Jan 12 '22 10:01 tigerjack

Please provide a stack trace. You can do so by compiling from source, reproducing the crash and then running coredumpctl gdb and then bt full.

Here are some instructions to compile from source: https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

emersion avatar Jan 12 '22 10:01 emersion

Maybe related: https://github.com/swaywm/sway/issues/6570

emersion avatar Jan 12 '22 10:01 emersion

Please provide a stack trace. You can do so by compiling from source, reproducing the crash and then running coredumpctl gdb and then bt full.

Here are some instructions to compile from source: https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

As said, I don't have a stack trace and neither a consistent way to reproduce the issue. Even if I launch it again with stack trace, I don't know if and when the problem will happen again.

tigerjack avatar Jan 12 '22 10:01 tigerjack

I am using the development version since a few days (sway version 1.8-dev-d6f8820a (Jan 13 2022, branch 'master')) and the problem seems to not appear anymore. I'll keep this open for a while just to be sure.

tigerjack avatar Jan 19 '22 10:01 tigerjack

I'm not sure whether its the same issue, but I was able to get more extensive debug symbols here

(gdb) bt
#0  0x00007771d5a480a0 in wl_event_loop_dispatch (loop=0x5c73424370e0, timeout=<optimized out>, timeout@entry=-1) at ../wayland-1.23.0/src/event-loop.c:1105
#1  0x00007771d5a4a10f in wl_display_run (display=0x5c7342436ff0) at ../wayland-1.23.0/src/wayland-server.c:1530
#2  0x00005c731234dcd5 in server_run (server=<optimized out>) at ../sway-1.9/sway/server.c:398
#3  main (argc=<optimized out>, argv=0x7ffe5b5372e8) at ../sway-1.9/sway/main.c:415

Not sure if its helpful without logs. If not, I'll try to get those too and report back.

Edit: to clarify, this usually happens if another program (client) dies and/or dumps core. My guess is there may be a race condition where the fd source has already been freed because the client went away, but the event ptr is still around.

spion avatar Jul 17 '24 10:07 spion