sway
sway copied to clipboard
[1.11-rc2] Reloading sway config results in seatd broken pipe and crashing on FreeBSD
-
Sway Version: sway version 1.11-rc2
-
Debug Log: https://gist.github.com/hywelandrews/327a1498cb0d50f8c0270295493ea79b
-
Configuration File: https://gist.github.com/hywelandrews/12d9cf81cf291b2e26b45f6344532b11
-
Stack Trace:
(gdb) bt full
#0 0x000000082c32c1ba in thr_kill () at /lib/libc.so.7
#1 0x000000082c2a55d4 in raise () at /lib/libc.so.7
#2 0x000000082c358b59 in abort () at /lib/libc.so.7
#3 0x000000082c2887c1 in __assert () at /lib/libc.so.7
#4 0x0000000829cdee15 in wlr_backend_finish () at /usr/local/lib/libwlroots-0.19.so
#5 0x0000000829cf2827 in ??? () at /usr/local/lib/libwlroots-0.19.so
#6 0x000000082b1a72fd in wl_signal_emit_mutable () at /usr/local/lib/libwayland-server.so.0
#7 0x0000000829cdeda9 in wlr_backend_finish () at /usr/local/lib/libwlroots-0.19.so
#8 0x0000000829cec460 in ??? () at /usr/local/lib/libwlroots-0.19.so
#9 0x000000082b1a72fd in wl_signal_emit_mutable () at /usr/local/lib/libwayland-server.so.0
#10 0x0000000829ce033f in wlr_session_destroy () at /usr/local/lib/libwlroots-0.19.so
#11 0x0000000829ce0d72 in ??? () at /usr/local/lib/libwlroots-0.19.so
#12 0x000000082b1a970f in wl_event_loop_dispatch () at /usr/local/lib/libwayland-server.so.0
#13 0x000000082b1a676d in wl_display_run () at /usr/local/lib/libwayland-server.so.0
#14 0x000000000023e675 in ??? ()
#15 0x000000082c279c3a in __libc_start1 () at /lib/libc.so.7
#16 0x0000000000233080 in ??? ()
- Description:
Launch sway on a FreeBSD 14.2-p3 install with
sway -c /path/to/default/configSwayWM will launch correctly Reload config using sway shortcut MOD+shift+c sway crashes with the first error occuring from seatd:[wlr] [libseat] [libseat/backend/seatd.c:122] Could not flush connection: Broken pipe
Broken pipe is just a consequence of Sway crashing.
The backtrace you provided doesn't contain debug symbols. This most likely happens because the Sway binary you're using doesn't have debug information bundled.
Can you try again with a manually compiled Sway binary? See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject
I can run with debug symbols when I get some time, but my understanding was you will just see the stack that results in the failed assertion, as shown in the logs:
Assertion failed: (wl_list_empty(&backend->events.new_input.listener_list)), function wlr_backend_finish, file backend/backend.c, line 51.
Apologies if I've misunderstood the benefit of running with debug symbols.
Oh, missed that! Yeah, this is enough info.
Well, it's still weird that reloading the config file causes the wlr_session to be destroyed. Seems like libseat gets disconnected:
00:00:15.426 [ERROR] [wlr] [libseat] [libseat/backend/seatd.c:122] Could not flush connection: Broken pipe
Can you check seatd logs? Is seatd crashing?
I don't see seatd crashing, this is the full output for seatd logs:
-
start up
-
reloading the config
-
performing a hard shutdown
May 6 22:08:45 foley seatd[1796]: 00:00:00.000 [INFO] [seatd/seat.c:48] Created VT-bound seat seat0
May 6 22:08:45 foley seatd[1796]: 00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
May 6 22:08:47 foley seatd[1796]: 00:00:01.866 [INFO] [seatd/server.c:146] New client connected (pid: 2138, uid: 1001, gid: 20)
May 6 22:08:47 foley seatd[1796]: 00:00:01.866 [INFO] [seatd/seat.c:239] Added client 1 to seat0
May 6 22:08:47 foley seatd[1796]: 00:00:01.866 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
May 6 22:10:02 foley seatd[1796]: 00:01:18.192 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
May 6 22:10:02 foley kernel: May 6 22:10:02 foley seatd[1796]: 00:01:18.192 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
May 6 22:10:02 foley seatd[1796]: 00:01:18.192 [INFO] [seatd/seat.c:290] Removed client 1 from seat0
May 6 22:10:02 foley seatd[1796]: 00:01:18.192 [INFO] [seatd/seatd.c:218] seatd stopped
What seems to happen:
- You start sway, everything fine
- You reload 5 seconds into sway running
- Reload hangs for 11 seconds (??) trying to set the wallpaper
- Sway shuts down, possibly from receiving
SIGTERMas that path does not log anything, and during shutdown in wlr_backend_destroy things fail
The libseat error might juts be because seatd terminated before sway on machine shutdown. The assert could be teardown not happening correctly.
We shouldn't end up asserting in this case, but I suspect the issue you're having is the hang that leads you to shut down your machine. In fact, I suspect sway is hanging exactly until SIGTERM kills a child process, whether that is swaybg itself or something FreeBSD's libseat forked (https://github.com/swaywm/sway/issues/8673?).