Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sway crashes in wl_event_loop_dispatch #6758

Open
tigerjack opened this issue Jan 12, 2022 · 5 comments
Open

Sway crashes in wl_event_loop_dispatch #6758

tigerjack opened this issue Jan 12, 2022 · 5 comments
Labels
bug Not working as intended waiting-on-reporter Requires reporter's feedback

Comments

@tigerjack
Copy link

tigerjack commented Jan 12, 2022

  • 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 tigerjack added the bug Not working as intended label Jan 12, 2022
@emersion
Copy link
Member

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 emersion added the waiting-on-reporter Requires reporter's feedback label Jan 12, 2022
@emersion
Copy link
Member

Maybe related: #6570

@emersion emersion changed the title Sway crashes with channel error Sway crashes in wl_event_loop_dispatch Jan 12, 2022
@tigerjack
Copy link
Author

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
Copy link
Author

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.

@spion
Copy link

spion commented Jul 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended waiting-on-reporter Requires reporter's feedback
Development

No branches or pull requests

3 participants