sway: Sway sometimes crashes on reload
Please fill out the following:
-
Sway Version:
sway version 1.6.1-3b1effdf (Sep 15 2021, branch 'makepkg'), built with the hidpi patch set against the 1.6.1 tag using https://aur.archlinux.org/packages/sway-hidpi-git/wlrootsis version0.14.1.r0.g49a57442-1, built with the corresponding hidpi patch set against the 0.14.1 tag using https://aur.archlinux.org/packages/wlroots-hidpi-git/xorg-xwayland-hidpi-gitversion 21.1.2.r251.g735dbde48-1, built with the corresponding hidpi patch set, latest build using https://aur.archlinux.org/packages/xorg-xwayland-hidpi-git/
-
Debug Log:
- These are the logs generated by sway after I hit reload, including its crash https://gist.github.com/zsolt-donca/6784b19d2608e614890b0339e029c0a7
- note that the logs are decorated by journalctl, as I’m running sway as a systemd user service
-
Configuration File:
- My actual sway config: https://gist.github.com/zsolt-donca/dfd1f9b8f411b99e411b72187c9c2d46
- This is my actual configuration; I’m sorry that it’s not minimal, but I could never not manage to consistently reproduce this issue and thus experiment with different configurations
-
Stack Trace:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/sway -d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb4b3ce5078 in wl_event_loop_dispatch () from /usr/lib/libwayland-server.so.0
[Current thread is 1 (Thread 0x7fb4b2d15940 (LWP 2248))]
(gdb) bt full
#0 0x00007fb4b3ce5078 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#1 0x00007fb4b3ce2be7 in wl_display_run () at /usr/lib/libwayland-server.so.0
#2 0x00005556b5c14979 in server_run (server=0x5556b5c8b100 <server>) at ../sway/sway/server.c:254
config_path = 0x0
usage = 0x5556b5c6d250 "Usage: sway [options] [command]\n\n -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n -c, --config <config> Specify a config file.\n -C, --validate Check the validity of the config file, th"...
c = <optimized out>
long_options =
{{name = 0x5556b5c6c33c "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5556b5c70c18 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x5556b5c6c341 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x5556b5c6c34a "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5556b5c6bf00 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5556b5c6b90f "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x5556b5c6c350 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x5556b5c6c35f "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x5556b5c6c36f "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
validate = 0
debug = 1
allow_unsupported_gpu = 0
verbose = 0
#3 main (argc=<optimized out>, argv=0x7ffe9b7036e8) at ../sway/sway/main.c:433
config_path = 0x0
usage = 0x5556b5c6d250 "Usage: sway [options] [command]\n\n -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n -c, --config <config> Specify a config file.\n -C, --validate Check the validity of the config file, th"...
c = <optimized out>
long_options =
{{name = 0x5556b5c6c33c "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5556b5c70c18 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x5556b5c6c341 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x5556b5c6c34a "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5556b5c6bf00 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5556b5c6b90f "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x5556b5c6c350 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x5556b5c6c35f "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x5556b5c6c36f "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
validate = 0
debug = 1
allow_unsupported_gpu = 0
verbose = 0
- Description:
- I just hit the key combination for reload (
bindsym $mod+Shift+c reload), with several applications running (chrome beta, firefox, foot, spotify etc.); Sway did not immediately crash, but my whole system just froze momentarily (no mouse movement, no effect on me pressing the caps lock), after after a couple of seconds, sway crashed and quit (and I found myself at the TTY login). - Sway does not always crash on reload (some of my apps crash, though, like Firefox), so I cannot consistently reproduce this.
- I just hit the key combination for reload (
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (3 by maintainers)
@zsolt-donca I’m still experiencing the same issue, so I’m asking for reopening. This time, the waybar was completely gone. Upon reloading my configuration, Firefox crashed and all the kitty terminal opened were not accepting any keyboard or mouse input.
Closing as a duplicate of #6570. Please re-open a separate issue if your backtrace is different.
@tigerjack Fair enough. Please keep us posted on your experiences.
@tigerjack I just followed the instructions on activating the address sanitizer and undefined behavior sanitizer. I’ve modified my PKGBUILD files (in the AUR packages linked in my original post) and added the appropriate flags to meson. This resulted in me no longer experiencing my original issue, which was sway crashing (and producing a stacktrace and a coredump), but instead, I’m experiencing the two issues that I’ve reported a couple of comments before. I would say that nothing is in fact fixed for me, the issue is just manifested differently.
See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject