systemd-crashing.log
to reproduce:
attach laptop to thunderbolt3 dock, move apps to workspace on external screen.
unplug the dock, apps crash. see log
➜ ~ swaymsg -t get_version
sway version 1.0-beta.1-195-gc36665bc (Nov 15 2018, branch 'master')
➜ ~ pacman -Q wlroots
wlroots-git 0.1.r79.g040d62de-1
edit: works fine in gnome, also gnome is much faster in detecting the output and does less flickering
Almost same issue here. When I unplug the HDMI cable from my laptop, windows from the external monitor get backed up to the laptop screen, when I replug the HDMI cable windows are correctly moved back to the external monitor but the whole system freezes. (This doesn't seem to happen when there's no window on the external monitor before unplugging it.)
Note: this happens with Firefox. Without it, I experience no crash.
-> sway version 1.0-beta.1-203-geda3bfee (Nov 17 2018, branch 'master')
with sway started from console the whole thing crashes when i unplug
Your log is weird. It seems you're pressing a keybind to shutdown sway and after that Xwayland crashes (making various X11 apps crash too).
If sway crashes, we need a stack trace (coredumpctl gdb sway and then bt full).
voila:
~ coredumpctl gdb sway
PID: 13300 (sway)
UID: 1000 (yannick)
GID: 1001 (yannick)
Signal: 11 (SEGV)
Timestamp: Sun 2018-11-18 01:04:24 CET (1min 28s ago)
Command Line: sway
Executable: /usr/bin/sway
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (yannick)
Boot ID: feeb3c98dff641af9a46042d07d9826c
Machine ID: 64d41d1d5a12442aa7a00f77e3bab28e
Hostname: xy1
Storage: /var/lib/systemd/coredump/core.sway.1000.feeb3c98dff641af9a46042d07d9826c.13300.1542499464000000.lz4
Message: Process 13300 (sway) of user 1000 dumped core.
Stack trace of thread 13300:
#0 0x00005577ff1fb2e2 node_set_dirty (sway)
#1 0x00005577ff1d7c1d seat_set_raw_focus (sway)
#2 0x00005577ff1d7e44 seat_set_focus (sway)
#3 0x00005577ff1d686b handle_seat_node_destroy (sway)
#4 0x00005577ff1f6d68 wl_signal_emit (sway)
#5 0x00005577ff1f714a container_begin_destroy (sway)
#6 0x00005577ff1fe469 view_unmap (sway)
#7 0x00005577ff203e5b handle_unmap (sway)
#8 0x00007fcf7037d4ee wlr_signal_emit_safe (libwlroots.so.0)
#9 0x00007fcf70341814 xsurface_unmap (libwlroots.so.0)
#10 0x00007fcf70341850 xwayland_surface_destroy (libwlroots.so.0)
#11 0x00007fcf70343945 xwm_destroy (libwlroots.so.0)
#12 0x00007fcf703405b6 xwayland_finish_server (libwlroots.so.0)
#13 0x00007fcf70340ffe xwayland_finish_server (libwlroots.so.0)
#14 0x00007fcf703b7bef n/a (libwayland-server.so.0)
#15 0x00007fcf703b7de1 wl_client_destroy (libwayland-server.so.0)
#16 0x00007fcf703b7edb n/a (libwayland-server.so.0)
#17 0x00007fcf703b9702 wl_event_loop_dispatch (libwayland-server.so.0)
#18 0x00007fcf703b82ac wl_display_run (libwayland-server.so.0)
#19 0x00005577ff1c9cf6 server_run (sway)
#20 0x00005577ff1c934d main (sway)
#21 0x00007fcf6ff03223 __libc_start_main (libc.so.6)
#22 0x00005577ff1bcb6e _start (sway)
Stack trace of thread 13301:
#0 0x00007fcf6fecbafc pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1 0x00007fcf6d3a91ac n/a (i965_dri.so)
#2 0x00007fcf6d3a8ee8 n/a (i965_dri.so)
#3 0x00007fcf6fec5a9d start_thread (libpthread.so.0)
#4 0x00007fcf6ffdab23 __clone (libc.so.6)
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/sway...done.
[New LWP 13300]
[New LWP 13301]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `sway'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005577ff1fb2e2 in node_set_dirty (node=0x0) at ../sway/sway/tree/node.c:33
33 ../sway/sway/tree/node.c: No such file or directory.
[Current thread is 1 (Thread 0x7fcf6dbba9c0 (LWP 13300))]
(gdb) bt full
#0 0x00005577ff1fb2e2 in node_set_dirty (node=0x0) at ../sway/sway/tree/node.c:33
#1 0x00005577ff1d7c1d in seat_set_raw_focus (seat=0x557800f0cca0, node=0x557800ed4e80) at ../sway/sway/input/seat.c:643
seat_node = 0x557800ed4fa0
#2 0x00005577ff1d7e44 in seat_set_focus (seat=0x557800f0cca0, node=0x557801403c60) at ../sway/sway/input/seat.c:713
last_focus = 0x557800ed4e80
last_workspace = 0x557800ed4e80
new_workspace = 0x557800ed4e80
container = 0x557801403c60
new_output = 0x0
new_output_last_ws = 0x0
#3 0x00005577ff1d686b in handle_seat_node_destroy (listener=0x5578013dd0b0, data=0x5578013dce90) at ../sway/sway/input/seat.c:182
seat_node = 0x5578013dd090
seat = 0x557800f0cca0
node = 0x5578013dce90
parent = 0x0
focus = 0x5578013dce90
needs_new_focus = true
next_focus = 0x557801403c60
#4 0x00005577ff1f6d68 in wl_signal_emit (signal=0x5578013dcec0, data=0x5578013dce90) at /usr/include/wayland-server-core.h:468
l = 0x5578013dd0b0
next = 0x5578013dcec0
#5 0x00005577ff1f714a in container_begin_destroy (con=0x5578013dce90) at ../sway/sway/tree/container.c:98
#6 0x00005577ff1fe469 in view_unmap (view=0x5578013dc2f0) at ../sway/sway/tree/view.c:637
parent = 0x0
ws = 0x557800ed4e80
seat = 0x7fcf6f432060 <ffi_type_pointer>
#7 0x00005577ff203e5b in handle_unmap (listener=0x5578013dc530, data=0x5578013dbc60) at ../sway/sway/desktop/xwayland.c:391
xwayland_view = 0x5578013dc2f0
view = 0x5578013dc2f0
__func__ = "handle_unmap"
#8 0x00007fcf7037d4ee in wlr_signal_emit_safe (signal=signal@entry=0x5578013dbdd8, data=data@entry=0x5578013dbc60) at ../util/signal.c:29
pos = 0x5578013dc530
l = 0x5578013dc530
cursor = {link = {prev = 0x5578013dc530, next = 0x7ffd547bc350}, notify = 0x7fcf7037d460 <handle_noop>}
end = {link = {prev = 0x7ffd547bc330, next = 0x5578013dbdd8}, notify = 0x7fcf7037d460 <handle_noop>}
#9 0x00007fcf70341814 in xsurface_unmap (surface=0x5578013dbc60) at ../xwayland/xwm.c:772
#10 0x00007fcf70341850 in xwayland_surface_destroy (xsurface=0x5578013dbc60) at ../xwayland/xwm.c:301
child = <optimized out>
next = <optimized out>
#11 0x00007fcf70343945 in xwm_destroy (xwm=0x55780132f620) at ../xwayland/xwm.c:1428
xsurface = <optimized out>
tmp = 0x5578013c3400
xwm = 0x55780132f620
#12 0x00007fcf703405b6 in xwayland_finish_server (wlr_xwayland=wlr_xwayland@entry=0x557800de7390) at ../xwayland/xwayland.c:162
#13 0x00007fcf70340ffe in xwayland_finish_server (wlr_xwayland=0x557800de7390) at ../xwayland/xwayland.c:221
wlr_xwayland = 0x557800de7390
#14 0x00007fcf70340ffe in handle_client_destroy (listener=0x557800de73a8, data=<optimized out>) at ../xwayland/xwayland.c:221
wlr_xwayland = 0x557800de7390
#15 0x00007fcf703b7bef in () at /usr/lib/libwayland-server.so.0
#16 0x00007fcf703b7de1 in wl_client_destroy () at /usr/lib/libwayland-server.so.0
#17 0x00007fcf703b7edb in () at /usr/lib/libwayland-server.so.0
#18 0x00007fcf703b9702 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#19 0x00007fcf703b82ac in wl_display_run () at /usr/lib/libwayland-server.so.0
#20 0x00005577ff1c9cf6 in server_run (server=0x5577ff222b20 <server>) at ../sway/sway/server.c:190
#21 0x00005577ff1c934d in main (argc=1, argv=0x7ffd547bc878) at ../sway/sway/main.c:411
verbose = 0
debug = 0
validate = 0
allow_unsupported_gpu = 0
long_options =
{{name = 0x5577ff20bb94 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5577ff20bb99 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x5577ff20bba0 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x5577ff20bba9 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x5577ff20bbaf "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x5577ff20bbb7 "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x5577ff20bbbf "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x5577ff20bbce "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x5577ff20bbde "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
config_path = 0x0
usage = 0x5577ff20b750 "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 = -1
from what i read, the dirty node is already deallocated?!
edit: i could unplug when i first moved all windows to the internal screen
I just want to mention that I experienced this, too, with my Lenovo X200 and an external monitor connected via VGA. As I'm using this as my main PC, I'm currently not able to obtain a debug log. I think there also was firefox involved...
this log is when i detached the screen and the whole machine went black (sometimes i can switch to another tty and bring it back, not this time)
https://gist.github.com/yannick/4c0b7212a15d95f34edbf4fb462aae95
this one is the following workflow:
start firefox (wayland) and plugin the dock/screen:
https://gist.github.com/yannick/e78e0103b2906bf3006cbee3dd54f4b9
result: firefox crashes
update: i just attached an eizo screen via usb-c, there it works.
so its either something with thunderbolt or the lenovo dock.
i will test 2 other TB docks that i have here
@yannick do you have any updates on your tests with the two other docks? Having similar issues with a ThinkPad X1 2018 and their Ultra Thunderbolt Dock.
@sydneymeyer OWC dock was similar behavior, TB15 dock i could not test as i sold it.
I also experience this now when I connect an external screen. Its hard to debug, because the machine locks up completely and no core dumps are created.
Same thing happens in my environment with Dell WD15 dock. No issues when using USB-C to HDMI adapter (without the dock).
@martinsb ah that works for me as well! Thanks, you made my day!
i now switched to a Caldigit TB3 Dock and it works much better. so the problem seems to be within the timing when devices are getting online it seems
@yannick yes, I noticed this as well. If I start sway with the monitor already connected from the tty the lock-up doesn't occur, so it indicates it could well be a timing issue when the display comes online.
I also noticed that, when I plugged it in once and had termite focused with htop running, Xwayland was at 97% CPU just before everything froze.
I've also just experienced this with my Thinkpad dock today. I'll try to reproduce again and get extra information if that would help.
Another stack trace happening when unplugging external usb-c displayport monitor:
#0 0x00007f47c3a0ed7f raise (libc.so.6)
#1 0x000055655bf497d8 _sway_assert (sway)
#2 0x000055655bf0d1ca handle_layer_shell_surface (sway)
#3 0x00007f47c3e7614e wlr_signal_emit_safe (libwlroots.so.0)
#4 0x00007f47c3e672e5 layer_surface_role_commit (libwlroots.so.0)
#5 0x00007f47c3e703ea surface_commit_pending (libwlroots.so.0)
#6 0x00007f47c3e70708 surface_commit (libwlroots.so.0)
#7 0x00007f47c2f276d0 ffi_call_unix64 (libffi.so.6)
#8 0x00007f47c2f270a0 ffi_call (libffi.so.6)
#9 0x00007f47c3eb86ff n/a (libwayland-server.so.0)
#10 0x00007f47c3eb50a3 n/a (libwayland-server.so.0)
#11 0x00007f47c3eb6702 wl_event_loop_dispatch (libwayland-server.so.0)
#12 0x00007f47c3eb52ac wl_display_run (libwayland-server.so.0)
#13 0x000055655bf0b4e8 server_run (sway)
#14 0x000055655bf0ab3f main (sway)
#15 0x00007f47c39fb223 __libc_start_main (libc.so.6)
#16 0x000055655befdb9e _start (sway)
Please provide a stack trace. You can do so by running coredumpctl gdb and then bt full.
Full stack trace:
#0 0x00007f47c3a0ed7f in raise () at /usr/lib/libc.so.6
#1 0x000055655bf497d8 in _sway_assert (condition=false, format=0x55655bf500b0 "[%s:%d] %s:cannot auto-assign output for layer")
at ../sway/common/log.c:27
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7ffc888d8f10, reg_save_area = 0x7ffc888d8e50}}
#2 0x000055655bf0d1ca in handle_layer_shell_surface (listener=0x55655bf66c08 <server+104>, data=0x55655e42b2c0)
at ../sway/sway/desktop/layer_shell.c:382
output = 0x0
seat = 0x55655dfbffe0
layer_surface = 0x55655e42b2c0
server = 0x55655bf66ba0 <server>
__func__ = "handle_layer_shell_surface"
sway_layer = 0x7f47c15e4da6
output = 0xef95614f40370f00
old_state =
{anchor = 1581060832, exclusive_zone = 21861, margin = {top = 1077350144, right = 4019544399, bottom = 1581744720, left = 21861}, keyboard_interactive = 2, desired_width = 0, desired_height = 1575599600, actual_width = 21861, actual_height = 1581060832}
#3 0x00007f47c3e7614e in wlr_signal_emit_safe (signal=0x55655de9be30, data=data@entry=0x55655e42b2c0) at ../util/signal.c:29
pos = 0x55655bf66c08 <server+104>
l = 0x55655bf66c08 <server+104>
cursor = {link = {prev = 0x55655bf66c08 <server+104>, next = 0x7ffc888d9010}, notify = 0x7f47c3e760c0 <handle_noop>}
end = {link = {prev = 0x7ffc888d8ff0, next = 0x55655de9be30}, notify = 0x7f47c3e760c0 <handle_noop>}
#4 0x00007f47c3e672e5 in layer_surface_role_commit (wlr_surface=<optimized out>) at ../types/wlr_layer_shell_v1.c:293
surface = 0x55655e42b2c0
__PRETTY_FUNCTION__ = "layer_surface_role_commit"
#5 0x00007f47c3e703ea in surface_commit_pending (surface=surface@entry=0x55655e3d12e0) at ../types/wlr_surface.c:372
invalid_buffer = false
subsurface = 0x55655e3d14c8
#6 0x00007f47c3e70708 in surface_commit (client=<optimized out>, resource=<optimized out>) at ../types/wlr_surface.c:444
surface = 0x55655e3d12e0
subsurface = <optimized out>
#7 0x00007f47c2f276d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#8 0x00007f47c2f270a0 in ffi_call () at /usr/lib/libffi.so.6
#9 0x00007f47c3eb86ff in () at /usr/lib/libwayland-server.so.0
#10 0x00007f47c3eb50a3 in () at /usr/lib/libwayland-server.so.0
#11 0x00007f47c3eb6702 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#12 0x00007f47c3eb52ac in wl_display_run () at /usr/lib/libwayland-server.so.0
#13 0x000055655bf0b4e8 in server_run (server=0x55655bf66ba0 <server>) at ../sway/sway/server.c:190
#14 0x000055655bf0ab3f in main (argc=1, argv=0x7ffc888d97f8) at ../sway/sway/main.c:414
verbose = 0
debug = 0
validate = 0
allow_unsupported_gpu = 0
long_options =
{{name = 0x55655bf4fc54 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55655bf4fc59 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55655bf4fc60 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x55655bf4fc69 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55655bf4fc6f "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55655bf4fc77 "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x55655bf4fc7f "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55655bf4fc8e "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x55655bf4fc9e "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
config_path = 0x0
usage = 0x55655bf4f810 "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 = -1
@vivien There is a separate issue open for the system freezes: #3442.
huh, having the same issue with my tb3 dock (2017 X1C with this dock https://support.lenovo.com/us/en/solutions/acc100356 ). My sway -d log is linked below.
Side note, I haven't been able to switch to another tty and have to do a hard shutdown. (ACPI responds, systemd kills stuff as it normally would (killing sway and restoring console output while shutting down)).
here's another log https://mthode.org/sway.debug2.log.xz
The stack trace posted by @yglukhov is outdated. Please post a new stack trace.
Has anyone seen a fix for this yet? I want to keep using wayland, but this bug is eternal it would seem.
@rdmtinez Most of mine have been caused by https://github.com/swaywm/sway/issues/3954, which is fixed in master
I'm getting a new dock (the WD19TB) and will be able to check if it has anything to do with my dock soon.
happens with the WD19TB as well, I do have a log for that though.
Does sway crash and produce a segfault? If so please post it as well.
I've posted the full log, it just locks up, freeze, can't switch to another tty
Try SSH-ing into the machine after a lockup.
will work on getting access for gdb tomorrow, late here
I should be able to trigger it at will, so let me know when you can help. I'm having issues starting sway within gdb (sway compiled with debug symbols and the like but stalls on start). Tried gdb /usr/bin/sway; start; continue;, stalling after the continue.
https://github.com/RedSoxFan/wlroots/commit/def9091a182c74a7c4b77d1f63533863db320aa2 is the fix for me (at least so far), currently being eval'd by others
my issue has been solved with wlroots from git master