Open mirko opened 4 years ago
Sounds like an Xwayland crash.
Could you point me to how to potentially debug this furtehr?
coredumpctl
doesn't show any (X)wayland coredumps vailable.
When this happens, you can possibly use the SysRq combos to get control of your keyboard again, switch to a tty, and gcore -p $(pidof sway)
. Then you can open that in GDB and bt full
. Or, you could SSH instead of SysRq and do the same. I'd suggest taking several cores and inspecting the traces to see if they differ, or if Sway is stuck waiting for some IO that will never complete.
Thank you, that helped. It seems it's various symptoms - as described above where I do not have any reaction, but also having a black screen, a moving cursor and a working keyboard (can switch to tty's) but also kind of a still working GUI where I can focus windows by moving the cursor, but that's about it (no typing into / interaction with the windows, no workspace switching, no sway reload / exit via keyboard shortcuts, etc.)
I got two backtraces and they look very similar - in both situations, which happened the same day and unlike what I experienced in my initial post - I had a black screen but was able to see and move the mouse cursor and switch to a TTY. In both scenarios I had an external screen attached, while before for days everything was working fine without an external screen. So the correlation is pretty obvious.
$ gdb /usr/local/bin/sway core.201339
GNU gdb (Debian 9.2-1) 9.2
Copyright (C) 2020 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-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/local/bin/sway...
[New LWP 201339]
[New LWP 201342]
[New LWP 201343]
[New LWP 201344]
[New LWP 201345]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `sway'.
#0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory.
[Current thread is 1 (Thread 0x7fa3e1c4a680 (LWP 201339))]
(gdb) bt
#0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00007fa3e34a941b in wl_event_loop_dispatch () from /lib/x86_64-linux-gnu/libwayland-server.so.0
#2 0x00007fa3e34a7105 in wl_display_run () from /lib/x86_64-linux-gnu/libwayland-server.so.0
#3 0x000055991c30c30e in server_run (server=0x55991c380320 <server>) at ../sway/server.c:244
#4 0x000055991c30b841 in main (argc=2, argv=0x7ffc7e0a8c08) at ../sway/main.c:412
(gdb) bt full
#0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
No locals.
#1 0x00007fa3e34a941b in wl_event_loop_dispatch () from /lib/x86_64-linux-gnu/libwayland-server.so.0
No symbol table info available.
#2 0x00007fa3e34a7105 in wl_display_run () from /lib/x86_64-linux-gnu/libwayland-server.so.0
No symbol table info available.
#3 0x000055991c30c30e in server_run (server=0x55991c380320 <server>) at ../sway/server.c:244
No locals.
#4 0x000055991c30b841 in main (argc=2, argv=0x7ffc7e0a8c08) at ../sway/main.c:412
verbose = 0
debug = 1
validate = 0
allow_unsupported_gpu = 0
long_options = {{name = 0x55991c363148 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55991c36314d "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55991c363154 "validate", has_arg = 0,
flag = 0x0, val = 67}, {name = 0x55991c36315d "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55991c363163 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55991c36316b "verbose",
has_arg = 0, flag = 0x0, val = 86}, {name = 0x55991c363173 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55991c363182 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {
name = 0x55991c363192 "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 = 0x55991c362bd8 "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
(gdb)
As a side note: I'm using sway with WLR_DRM_NO_MODIFIERS=1
which is still there when I was using 3 screens instead of 2 (1 internal + 1 external as I do now).
Also without WLR_DRM_NO_MODIFIERS=1
I frequently experience such issues.
They manifest in still being able to move the cursor - however being unable to unlock the screen.
When killing (-9) swayidle and swaylock I end up in above situation, being able to move around the cursor and focus windows, but that's about it.
Additional log output from a sway -d
run:
Hello, I have been experiencing the same issue for a few months. I also use sysrq to gain back control, switch to another terminal and kill sway. What's funny is that user applications still run fine when this happen (I experienced it no more than a few minutes ago, while I was in a video call, and I still heard the call afterwards, even though my screen couldn't get out of sleep) ;).
Of important note is I believe this to be due to sway being unhappy with i915 modesetting being buggy: I get the exact same 00:36:49.739 [ERROR] [backend/drm/atomic.c:36] eDP-1: Atomic commit failed (modeset): Permission denied
as @mirko above. I should also say that I get i915 error messages in the kernel log from time to time: i915 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe B (start=215847 end=215848) time 13587 us, min 1431, max 1439, scanline start 964, end 690
.
I just built and installed master from wlroots and sway, and I will keep you posted if I can retrieve a coredump or a proper backtrace.
@nightmared Not wanna discourage you, but i'm updating my sway and wlroots from master/HEAD every couple of days/weeks and it's still happening to me. Can you confirm this also only happens in a multi-screen setup for you? When my internal (notebook) screen being used I do not experience that.
Yes, I can confirm that: 1) I am regularly updating sway and this haven't improved a bit for months ;) 2) I'm in a two-monitors setup (my laptop with an internal 1080p monitor) and an external 1440p monitor. Both are running around 60 Hz (respectively 60.027000 Hz and 59.951000 Hz). But I also ran into this with an external 1080p monitor. 3) I haven't met this bug yet when using only the internal monitor, so it really seems to come from the multi-head situation.
Yes, I can confirm that:
1. I am regularly updating sway and this haven't improved a bit for months ;)
Ah, ok, I just figured you were hoping for it gerring better from "I just built and installed master from wlroots and sway, and I will keep you posted if I can retrieve a coredump or a proper backtrace." - which I don't think, at the very moment, it will be.
2. I'm in a two-monitors setup (my laptop with an internal 1080p monitor) and an external 1440p monitor. Both are running around 60 Hz (respectively 60.027000 Hz and 59.951000 Hz)
Me, too, display port, but as far as I remember things weren't any better when being on 30Hz via HDMI.
I don't use xwayland on artix linux. After I turn off DMPS and turn on DMPS again, screen becomes black, and keyboard doesn't respond. I can ssh into it, but I can't turn it off or reboot it via ssh commands.
After turning DPMS off and turning DPMS on, I see the following debug messages before keyboard becomes unresponsive and the screen becomes black.
00:01:13.481 [sway/ipc-server.c:153] Event on IPC listening socket
00:01:13.481 [sway/ipc-server.c:199] New client: fd 49
00:01:13.481 [sway/ipc-server.c:219] Client 49 readable
00:01:13.481 [sway/commands.c:255] Handling command 'output * dpms on'
00:01:13.481 [sway/commands.c:423] Subcommand: dpms on
00:01:13.481 [sway/config/output.c:204] Merging on top of existing output config
00:01:13.481 [sway/config/output.c:227] Config stored for output * (enabled: -1) (-1x-1@-1.000000Hz position -1,-1 scale -1.000000 subpixel unknown transform -1) (bg /home/offline-signer/wallpapers/0020 - minecraft city.png fill) (dpms 1) (max render time: -1)
00:01:13.481 [sway/config/output.c:348] Turning on output HDMI-A-1
00:01:13.482 [sway/config/output.c:326] Output DPI: 232.228571x243.840000
00:01:13.482 [sway/config/output.c:379] Auto-detected output scale: 2.000000
00:01:13.482 [sway/config/output.c:409] Committing output HDMI-A-1
00:01:13.482 [INFO] [backend/drm/drm.c:811] Modesetting 'HDMI-A-1' with '2560x1440@59951mHz'
00:01:13.482 [DEBUG] [backend/drm/drm.c:693] Initializing renderer on connector 'HDMI-A-1'
I can't kill sway with kill -9
after it becomes unresponsive because sway becomes an uninterruptable process.
Graphics card is Intel UHD 600. Graphics driver is i915.
I haven't been able to reproduce this bug since I reinstalled my computer and switched distro along the way, so it may very well be a mesa or kernel bug in the version of the packages provided by the distribution (I was running into this issue on voidlinux). I can't reproduce the issue any more, so maybe the other poor souls running into this could considering testing another mesa/linux configuration ?
I was considering moving to a self built version of mesa and kernel but actually didn't put much hope into this solving issues, hence didn't. Your post definitely encourages me going this route - first mesa, and if it doesn't help, then kernel. Packages provided by your new linux distribution (which one?) don't provide patches to mesa and/or kernel which by any chance might mitigate this issue (just to rule out it's /your/ distribution only /not/ having those issues)?
I'm using nixos, which doesn't appears to have patches for such an issue: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/mesa/default.nix#L58-L67 So I think there are higher chances the issue comes from the kernel, but that's some pure guessing.
I'm also on nixos. I attach an excerpt of the last crash, that occured when I tried to capture the screen with wayvnc and output it using tigervnc vncviewer.
123926 14:55:11.218 [sway/ipc-server.c:536] Client 141 writable
123927 14:55:11.218 [sway/ipc-server.c:214] Client 141 hung up
123928 14:55:11.218 [sway/ipc-server.c:566] IPC Client 141 disconnected
123929 14:55:11.231 [DEBUG] [types/wlr_surface.c:666] New wlr_surface 0x27bbd20 (res 0x26c2060)
123930 14:55:11.231 [DEBUG] [types/wlr_layer_shell_v1.c:458] new layer_surface 0x290bba0 (res 0x2ea8320)
123931 14:55:11.231 [sway/desktop/layer_shell.c:513] new layer surface: namespace menu layer 2 anchor 2 size 0x32 margin 0,0,0,0
123932 14:55:12.021 [sway/desktop/layer_shell.c:343] Layer surface destroyed (menu)
123933 14:55:12.021 [sway/desktop/transaction.c:414] Transaction 0x2ddc010 committing with 2 instructions
123934 14:55:12.021 [sway/desktop/transaction.c:281] Applying transaction 0x2ddc010
123935 Output: + DP-2
123936 14:55:12.050 [sway/input/input-manager.c:399] adding virtual keyboard: '0:0:virtual_keyboard'
123937 14:55:12.050 [sway/input/seat.c:872] adding device 0:0:virtual_keyboard to seat seat0
123938 14:55:12.081 [sway/input/input-manager.c:431] adding virtual pointer: '0:0:virtual_pointer'
123939 14:55:12.081 [sway/input/seat.c:872] adding device 0:0:virtual_pointer to seat seat0
123940 14:55:12.081 [sway/input/seat.c:669] Applying input config to 0:0:virtual_pointer
123941 The XKEYBOARD keymap compiler (xkbcomp) reports:
123942 > Warning: Unsupported maximum keycode 569, clipping.
123943 > X11 cannot support keycodes above 255.
123944 > Warning: Unsupported high keycode 372 for name <I372> ignored
123945 > X11 cannot support keycodes above 255.
123946 > This warning only shows for the first high keycode.
123947 Errors from xkbcomp are not fatal to the X server
123948 14:55:12.125 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123949 14:55:12.125 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123950 14:55:12.125 [DEBUG] [types/wlr_output.c:792] Disabling direct scan-out on output 'DP-2' (locks: 1)
123951 14:55:12.125 [DEBUG] [types/wlr_output.c:806] Disabling hardware cursors on output 'DP-2' (locks: 1)
123952 The XKEYBOARD keymap compiler (xkbcomp) reports:
123953 > Warning: Unsupported maximum keycode 569, clipping.
123954 > X11 cannot support keycodes above 255.
123955 > Warning: Unsupported high keycode 372 for name <I372> ignored
123956 > X11 cannot support keycodes above 255.
123957 > This warning only shows for the first high keycode.
123958 Errors from xkbcomp are not fatal to the X server
123959 14:55:12.148 [DEBUG] [types/wlr_output.c:792] Enabling direct scan-out on output 'DP-2' (locks: 0)
123960 14:55:12.148 [DEBUG] [types/wlr_output.c:806] Enabling hardware cursors on output 'DP-2' (locks: 0)
123961 14:55:12.148 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123962 14:55:12.148 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123963 The XKEYBOARD keymap compiler (xkbcomp) reports:
123964 > Warning: Unsupported maximum keycode 569, clipping.
123965 > X11 cannot support keycodes above 255.
123966 > Warning: Unsupported high keycode 372 for name <I372> ignored
123967 > X11 cannot support keycodes above 255.
123968 > This warning only shows for the first high keycode.
123969 Errors from xkbcomp are not fatal to the X server
123970 14:55:12.182 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123971 14:55:12.182 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: MappingNotify (34)
123972 14:55:12.182 [DEBUG] [types/wlr_output.c:792] Disabling direct scan-out on output 'DP-2' (locks: 1)
123973 14:55:12.182 [DEBUG] [types/wlr_output.c:806] Disabling hardware cursors on output 'DP-2' (locks: 1)
123974 14:55:12.992 [DEBUG] [types/wlr_output.c:792] Enabling direct scan-out on output 'DP-2' (locks: 0)
123975 14:55:12.992 [DEBUG] [types/wlr_output.c:806] Enabling hardware cursors on output 'DP-2' (locks: 0)
123976 14:55:12.993 [DEBUG] [types/wlr_output.c:792] Disabling direct scan-out on output 'DP-2' (locks: 1)
123977 14:55:12.993 [DEBUG] [types/wlr_output.c:806] Disabling hardware cursors on output 'DP-2' (locks: 1)
123978
123979 TigerVNC Viewer 64-bit v1.10.1
123980 Built on: 1980-01-01 00:00
123981 Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
123982 See https://www.tigervnc.org for information on TigerVNC.
123983 14:55:13.059 [DEBUG] [xwayland/xwm.c:879] XCB_CREATE_NOTIFY (31457281)
123984 14:55:13.060 [sway/desktop/xwayland.c:633] New xwayland surface title='(null)' class='(null)'
123985
123986 Tue Jan 12 14:27:55 2021
123987 DecodeManager: Detected 8 CPU core(s)
123988 DecodeManager: Creating 4 decoder thread(s)
123989 CConn: Connected to host localhost port 25999
123990 CConnection: Server supports RFB protocol version 3.8
123991 CConnection: Using RFB protocol version 3.8
123992 CConnection: Choosing security type None(1)
123993 14:55:13.066 [DEBUG] [xwayland/xwm.c:879] XCB_CREATE_NOTIFY (31457284)
123994 14:55:13.067 [sway/desktop/xwayland.c:633] New xwayland surface title='(null)' class='(null)'
123995 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
123996 14:55:13.066 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 406 (WM_LOCALE_NAME) for window 31457284
123997 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
123998 14:55:13.066 [DEBUG] [xwayland/xwm.c:526] NET_WM_PID 16410
123999 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124000 CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
124001 14:55:13.066 [DEBUG] [xwayland/xwm.c:467] XCB_ATOM_WM_NAME: WayVNC - TigerVNC
124002 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124003 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124004 14:55:13.066 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 408 (_NET_WM_ICON_NAME) for window 31457284
124005 14:55:13.066 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124006 14:55:13.067 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 37 (WM_ICON_NAME) for window 31457284
124007 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124008 14:55:13.067 [DEBUG] [xwayland/xwm.c:572] WM_PROTOCOLS (1)
124009 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124010 14:55:13.067 [DEBUG] [xwayland/xwm.c:654] WM_NORMAL_HINTS (18)
124011 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124012 14:55:13.067 [DEBUG] [xwayland/xwm.c:698] MOTIF_WM_HINTS (5)
124013 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124014 14:55:13.067 [DEBUG] [xwayland/xwm.c:414] XCB_ATOM_WM_CLASS: vncviewer Vncviewer
124015 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124016 14:55:13.067 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 294 (XdndAware) for window 31457284
124017 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124018 14:55:13.067 [DEBUG] [xwayland/xwm.c:602] WM_HINTS (9)
124019 14:55:13.067 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124020 14:55:13.067 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 373 (_NET_WM_ICON) for window 31457284
124021 14:55:13.067 [DEBUG] [xwayland/xwm.c:980] XCB_MAP_REQUEST (31457284)
124022 14:55:13.067 [DEBUG] [xwayland/xwm.c:1312] XCB_CLIENT_MESSAGE (31457284)
124023 14:55:13.070 [DEBUG] [xwayland/xwm.c:1328] unhandled x11 client message 447 (_XWAYLAND_MAY_GRAB_KEYBOARD)
124024 14:55:13.070 [DEBUG] [xwayland/xwm.c:1312] XCB_CLIENT_MESSAGE (31457284)
124025 14:55:13.071 [DEBUG] [xwayland/xwm.c:1328] unhandled x11 client message 446 (_NET_WM_FULLSCREEN_MONITORS)
124026 14:55:13.071 [DEBUG] [xwayland/xwm.c:1312] XCB_CLIENT_MESSAGE (31457284)
124027 14:55:13.071 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124028 14:55:13.071 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 274 (WM_STATE) for window 31457284
124029 14:55:13.071 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124030 14:55:13.071 [DEBUG] [xwayland/xwm.c:999] XCB_MAP_NOTIFY (31457284)
124031 14:55:13.071 [DEBUG] [xwayland/xwm.c:1312] XCB_CLIENT_MESSAGE (31457284)
124032 14:55:13.071 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124033 14:55:13.071 [DEBUG] [types/wlr_surface.c:666] New wlr_surface 0x2a96400 (res 0x26f77b0)
124034 14:55:13.071 [DEBUG] [xwayland/xwm.c:1516] New xwayland surface: 0x2a96400
124035 14:55:13.071 [DEBUG] [xwayland/xwm.c:414] XCB_ATOM_WM_CLASS: vncviewer Vncviewer
124036 14:55:13.071 [DEBUG] [xwayland/xwm.c:572] WM_PROTOCOLS (1)
124037 14:55:13.071 [DEBUG] [xwayland/xwm.c:602] WM_HINTS (9)
124038 14:55:13.071 [DEBUG] [xwayland/xwm.c:654] WM_NORMAL_HINTS (18)
124039 14:55:13.071 [DEBUG] [xwayland/xwm.c:698] MOTIF_WM_HINTS (5)
124040 14:55:13.071 [DEBUG] [xwayland/xwm.c:467] XCB_ATOM_WM_NAME: WayVNC - TigerVNC
124041 14:55:13.071 [DEBUG] [xwayland/xwm.c:526] NET_WM_PID 16410
124042 14:55:13.072 [sway/tree/root.c:249] Looking up workspace for pid 16410
124043 14:55:13.072 [sway/tree/root.c:256] found pid_workspace for pid 16384, workspace 9:
124044 14:55:13.072 [sway/tree/arrange.c:263] Usable area for ws: 2560x1410@0,30
124045 14:55:13.072 [sway/tree/arrange.c:293] Arranging workspace '9:' at 1718.000000, 42.000000
124046 14:55:13.072 [sway/desktop/transaction.c:414] Transaction 0x2ebb750 committing with 3 instructions
124047 14:55:13.072 [sway/desktop/transaction.c:492] Transaction 0x2ebb750 is ready
124048 14:55:13.072 [sway/desktop/transaction.c:281] Applying transaction 0x2ebb750
124049 14:55:13.072 [sway/tree/container.c:1167] Container 0x2803ec0 entered output 0x2ce85b0
124050 14:55:13.073 [ERROR] [types/wlr_output.c:571] Basic output test failed
124051 14:55:13.084 [DEBUG] [types/wlr_output.c:792] Enabling direct scan-out on output 'DP-2' (locks: 0)
124052 14:55:13.084 [DEBUG] [types/wlr_output.c:806] Enabling hardware cursors on output 'DP-2' (locks: 0)
124053 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124054 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124055 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (1317)
124056 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124057 14:55:13.085 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=275, owner=2097153)
124058 14:55:13.085 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=2097153)
124059 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745006 owner=2097153, requestor=31457284 sel ection=275, target=277, property=275)
124060 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745006 requestor= 31457284 selection=275 target=277 property=275
124061 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745006 owner=2097153, requestor=31457284 sel ection=1, target=277, property=1)
124062 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745006 requestor= 31457284 selection=1 target=277 property=1
124063 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (1317)
124064 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124065 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124066 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124067 14:55:13.085 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 275 (CLIPBOARD) for window 31457284
124068 14:55:13.085 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124069 14:55:13.085 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 275 (CLIPBOARD) for window 31457284
124070 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745007 owner=2097153, requestor=31457284 sel ection=275, target=254, property=275)
124071 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2658e40
124072 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:339] No transfer active, starting 0x2658e40 now
124073 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:235] Starting transfer 0x2658e40
124074 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745007 owner=2097153, requestor=31457284 sel ection=1, target=254, property=1)
124075 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x26f62e0
124076 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:339] No transfer active, starting 0x26f62e0 now
124077 14:55:13.085 [DEBUG] [xwayland/selection/outgoing.c:235] Starting transfer 0x26f62e0
124078 14:55:13.087 [DEBUG] [xwayland/selection/outgoing.c:112] read 119 bytes (available 65536, mask 0x5)
124079 14:55:13.087 [DEBUG] [xwayland/selection/outgoing.c:165] nothing happened, buffered the bytes
124080 14:55:13.087 [DEBUG] [xwayland/selection/outgoing.c:112] read 0 bytes (available 130953, mask 0x4)
124081 14:55:13.087 [DEBUG] [xwayland/selection/outgoing.c:146] non-incr transfer complete
124082 14:55:13.087 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745007 requestor= 31457284 selection=275 target=254 property=275
124083 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:74] Destroying transfer 0x2658e40
124084 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:112] read 4 bytes (available 65536, mask 0x5)
124085 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:165] nothing happened, buffered the bytes
124086 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:112] read 0 bytes (available 131068, mask 0x4)
124087 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:146] non-incr transfer complete
124088 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745007 requestor= 31457284 selection=1 target=254 property=1
124089 14:55:13.088 [DEBUG] [xwayland/selection/outgoing.c:74] Destroying transfer 0x26f62e0
124090 14:55:13.089 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124091 14:55:13.089 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 1 (PRIMARY) for window 31457284
124092 14:55:13.089 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124093 14:55:13.089 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 1 (PRIMARY) for window 31457284
124094 14:55:13.094 [DEBUG] [types/wlr_output.c:792] Disabling direct scan-out on output 'DP-2' (locks: 1)
124095 14:55:13.095 [DEBUG] [types/wlr_output.c:806] Disabling hardware cursors on output 'DP-2' (locks: 1)
124096 14:55:13.095 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: SelectionClear (29)
124097 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=31457281)
124098 14:55:13.095 [DEBUG] [xwayland/xwm.c:1425] unhandled X11 event: SelectionClear (29)
124099 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=275, owner=31457281)
124100 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=31457281)
124101 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=275, owner=31457281)
124102 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=275, owner=2097153)
124103 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=2097153)
124104 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=275, owner=2097153)
124105 14:55:13.095 [DEBUG] [xwayland/selection/incoming.c:413] XCB_XFIXES_SELECTION_NOTIFY (selection=1, owner=2097153)
124106 14:55:13.095 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=2097153 sele ction=1, target=277, property=276)
124107 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=53745027 requestor=2 097153 selection=1 target=277 property=276
124108 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=2097153 sele ction=275, target=277, property=276)
124109 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=53745027 requestor=2 097153 selection=275 target=277 property=276
124110 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=2097153 sele ction=1, target=277, property=276)
124111 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=53745027 requestor=2 097153 selection=1 target=277 property=276
124112 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=2097153 sele ction=275, target=277, property=276)
124113 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=53745027 requestor=2 097153 selection=275 target=277 property=276
124114 14:55:13.096 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=1, property=276, target=277)
124115 14:55:13.096 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=275, property=276, target=277)
124116 14:55:13.096 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=1, property=276, target=277)
124117 14:55:13.096 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=275, property=276, target=277)
124118 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=31457284 sel ection=275, target=277, property=275)
124119 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745027 requestor= 31457284 selection=275 target=277 property=275
124120 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=31457284 sel ection=1, target=277, property=1)
124121 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=31457284 SelectionNotify(31) time=53745027 requestor= 31457284 selection=1 target=277 property=1
124122 14:55:13.096 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124123 14:55:13.096 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 275 (CLIPBOARD) for window 31457284
124124 14:55:13.096 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124125 14:55:13.096 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 1 (PRIMARY) for window 31457284
124126 14:55:13.096 [DEBUG] [xwayland/xwm.c:1025] XCB_PROPERTY_NOTIFY (31457284)
124127 14:55:13.096 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 275 (CLIPBOARD) for window 31457284
124128 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=31457284 sel ection=275, target=254, property=275)
124129 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a8a140
124130 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:339] No transfer active, starting 0x2a8a140 now
124131 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:235] Starting transfer 0x2a8a140
124132 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=53745027 owner=2097153, requestor=31457284 sel ection=1, target=254, property=1)
124133 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a8a260
124134 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:339] No transfer active, starting 0x2a8a260 now
124135 14:55:13.096 [DEBUG] [xwayland/selection/outgoing.c:235] Starting transfer 0x2a8a260
124136 14:55:13.096 [ERROR] [types/wlr_output.c:571] Basic output test failed
124137 14:55:13.104 [DEBUG] [types/wlr_output.c:792] Enabling direct scan-out on output 'DP-2' (locks: 0)
124138 14:55:13.104 [DEBUG] [types/wlr_output.c:806] Enabling hardware cursors on output 'DP-2' (locks: 0)
124139 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=1 , target=254, property=276)
124140 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a45030
124141 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a45030 still queued
124142 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a8a260 still queued
124143 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=1 , target=254, property=276)
124144 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a45150
124145 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:329] Destroying stale transfer 0x2a45030
124146 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=0 requestor=2097153 selection=1 target=254 property=0
124147 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:74] Destroying transfer 0x2a45030
124148 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a45150 still queued
124149 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a8a260 still queued
124150 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=1 , target=254, property=276)
124151 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a45270
124152 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:329] Destroying stale transfer 0x2a45150
124153 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=0 requestor=2097153 selection=1 target=254 property=0
124154 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:74] Destroying transfer 0x2a45150
124155 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a45270 still queued
124156 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a8a260 still queued
124157 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:403] XCB_SELECTION_REQUEST (time=0 owner=2097153, requestor=2097153 selection=1 , target=254, property=276)
124158 14:55:13.104 [DEBUG] [xwayland/selection/outgoing.c:317] Sending Wayland selection 254 to Xwayland window with MIME type text/plain ;charset=utf-8, target 254, transfer 0x2a45390
124159 14:55:13.105 [DEBUG] [xwayland/selection/outgoing.c:329] Destroying stale transfer 0x2a45270
124160 14:55:13.105 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=0 requestor=2097153 selection=1 target=254 property=0
124161 14:55:13.105 [DEBUG] [xwayland/selection/outgoing.c:74] Destroying transfer 0x2a45270
124162 14:55:13.105 [DEBUG] [xwayland/selection/outgoing.c:344] Transfer 0x2a45390 still queued
[... repeat ...]
131827 14:55:13.277 [ERROR] [xwayland/selection/outgoing.c:306] pipe() failed: Too many open files
131828 14:55:13.277 [DEBUG] [xwayland/selection/outgoing.c:26] SendEvent destination=2097153 SelectionNotify(31) time=0 requestor=2097153 selection=1 target=254 property=0
131829 14:55:13.277 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=1, property=0, target=254)
131830 14:55:13.277 [ERROR] [xwayland/selection/incoming.c:395] convert selection failed
131831 14:55:13.277 [ERROR] [types/wlr_output.c:571] Basic output test failed
131832 14:55:13.288 [DEBUG] [types/wlr_output.c:792] Enabling direct scan-out on output 'DP-2' (locks: 0)
131833 14:55:13.288 [DEBUG] [types/wlr_output.c:806] Enabling hardware cursors on output 'DP-2' (locks: 0)
131834 14:55:13.288 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=1, property=0, target=254)
131835 14:55:13.288 [ERROR] [xwayland/selection/incoming.c:395] convert selection failed
131836 14:55:13.288 [DEBUG] [xwayland/selection/incoming.c:384] XCB_SELECTION_NOTIFY (selection=1, property=0, target=254)
131837 14:55:13.288 [ERROR] [xwayland/selection/incoming.c:395] convert selection failed
131838 14:55:13.291 [ERROR] [types/wlr_output.c:571] Basic output test failed
131839 14:55:13.298 [ERROR] [types/wlr_output.c:571] Basic output test failed
131840 14:55:13.298 [INFO] [wayland] error marshalling arguments for send: dup failed: Too many open files
131841 14:55:13.298 [INFO] [wayland] error in client communication (pid 16390)
131842 14:55:13.299 [sway/input/input-manager.c:202] removing device: '0:0:virtual_keyboard'
131843 14:55:13.299 [sway/input/seat.c:892] removing device 0:0:virtual_keyboard from seat seat0
131844 14:55:13.299 [sway/input/input-manager.c:202] removing device: '0:0:virtual_pointer'
131845 14:55:13.299 [sway/input/seat.c:892] removing device 0:0:virtual_pointer from seat seat0
131846 ERROR: Failed to read wayland events: Connection reset by peer
131847 ERROR: Failed to dispatch pending
131848 ERROR: Failed to read wayland events: Connection reset by peer
131849 ERROR: Failed to dispatch pending
131850 ERROR: Failed to read wayland events: Connection reset by peer
131851 ERROR: Failed to dispatch pending
131852 ERROR: Failed to read wayland events: Connection reset by peer
131853 ERROR: Failed to dispatch pending
131854 ERROR: Failed to read wayland events: Connection reset by peer
131855 ERROR: Failed to dispatch pending
[... repeat ...]
It seems that somehow Xwayland is causing a too many open files condition and then sway stops to respond.
I also have to report that latest mesa (master/HEAD) compiled to only contain the intel/iris gallium parts for my hardware does not help. Just attached an external screen and ran into the original behaviour.
On my laptop, I was running into this bug constantly, using MESA_LOADER_DRVIER_OVERRIDE=i965
helped a bit, but didn't fix the problem, may be it is to blame here as well? I saw this with an accompanied dump in dmesg
.
This is a quiet severe issue. Is there any progress?
This is a quiet severe issue. Is there any progress?
@Xyene recently fixed a lot of selection issues which could lead to leaking file descriptors, you'll want to retest with sway and wlroots master.
Hi, it looks like I'm running in a similar issue. I have 3 monitors, and some applications still run on Xwayland.
In my case, it's swayidle
that's turning the monitors off, and sometimes (not always, but very often) it instantly puts Sway in an unusable state, as explained in the first post (not crashed, mouse still moving, but unable to focus anything, some apps still running, some not running anymore). I have to switch TTY to kill Sway and relaunch it.
I was able to run Sway with debug logs for several hours until I triggered the issue, here's an excerpt of some logs that may be useful. It's still long, but I'm not sure which logs are really helpful and I didn't want to strip down something that could help.
https://pastebin.com/kMh2q3hA
It looks like it starts to go downhill right after a bunch of these :
04:56:04.027 [INFO] [wlr] [wayland] error marshalling arguments for keymap: dup failed: Too many open files
I'm still keeping the original file for the time being, feel free to ask if there's something else !
Sway version: 1.6-80128d23 (Apr 26 2021, branch 'master')
Can you ls -l /proc/<pid of sway>/fd
while Sway is in this "unstable state"? This would allow us to better understand what kind of FD is leaking.
@emersion :+1:
Hm, weird, there are only 128 FDs in here. Is your ulimit for file descriptors very low? What does ulimit -n
say?
It says 1024
, seems pretty low to me indeed :thinking:
1024 is the standard limit, and is not reached here. Not sure why it's capping at 128. Just to confirm, can you cat /proc/<pid of sway>/limits
?
I was just going to edit my previous message with the limits :joy: So somehow Sway manages to open 1024 FDs at a given time and shoots itself in the foot ? If that's the case, maybe I'll have to monitor open FDs in real time to see at which point it reaches the limit (and if it really reaches it) ?
Here are the limits for the current Sway process :
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 127958 127958 processes
Max open files 1024 524288 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 127958 127958 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Yeah "too many open files" means that the limit is reached.
I'm also experiencing something similar, but I'm not sure if it's really related to me using an external display.
May 23 00:05:50 leena sway[1095]: 03:51:55.419 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:50 leena sway[1095]: 03:51:55.419 [ERROR] [wlr] [xwayland/selection/incoming.c:466] convert selection failed
May 23 00:05:51 leena sway[1095]: 03:51:56.856 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:51 leena sway[1095]: 03:51:56.857 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type COMPOUND_TEXT
May 23 00:05:51 leena sway[1095]: 03:51:56.857 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type STRING
May 23 00:05:52 leena sway[1095]: 03:51:57.966 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:52 leena sway[1095]: 03:51:57.968 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type COMPOUND_TEXT
May 23 00:05:52 leena sway[1095]: 03:51:57.970 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type STRING
May 23 00:05:56 leena sway[1095]: 03:52:01.488 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:56 leena sway[1095]: 03:52:01.488 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:56 leena sway[1095]: 03:52:01.488 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type COMPOUND_TEXT
May 23 00:05:56 leena sway[1095]: 03:52:01.488 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type COMPOUND_TEXT
May 23 00:05:56 leena sway[1095]: 03:52:01.488 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type STRING
May 23 00:05:56 leena sway[1095]: 03:52:01.489 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type STRING
May 23 00:05:57 leena sway[1095]: 03:52:02.540 [ERROR] [wlr] [xwayland/selection/outgoing.c:285] pipe() failed: Too many open files
May 23 00:05:57 leena sway[1095]: 03:52:02.541 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type COMPOUND_TEXT
May 23 00:05:57 leena sway[1095]: 03:52:02.541 [ERROR] [wlr] [xwayland/selection/outgoing.c:267] not sending selection: requested an unsupported MIME type STRING
May 23 00:06:02 leena sway[1095]: 03:52:07.300 [ERROR] [sway/commands/exec_always.c:54] Unable to create pipe for fork
May 23 00:06:02 leena sway[1095]: 03:52:07.414 [ERROR] [wlr] [types/seat/wlr_seat_keyboard.c:370] creating a keymap file for 49317 bytes failed
May 23 00:06:02 leena sway[19446]: wl_display@1: error 1: invalid arguments for zwp_linux_buffer_params_v1@31.add
May 23 00:06:02 leena sway[19446]: [143 00:06:02.409697] [glfw error 65544]: Wayland: fatal display error: Invalid argument
May 23 00:06:05 leena sway[1095]: 03:52:10.364 [ERROR] [wlr] [types/seat/wlr_seat_keyboard.c:370] creating a keymap file for 49317 bytes failed
May 23 00:06:05 leena sway[19465]: wl_display@1: error 1: invalid arguments for zwp_linux_buffer_params_v1@31.add
May 23 00:06:05 leena sway[19465]: [143 00:06:05.359542] [glfw error 65544]: Wayland: fatal display error: Invalid argument
May 23 00:06:05 leena sway[1095]: 03:52:10.843 [ERROR] [wlr] [types/seat/wlr_seat_keyboard.c:370] creating a keymap file for 49317 bytes failed
May 23 00:06:05 leena sway[19481]: wl_display@1: error 1: invalid arguments for zwp_linux_buffer_params_v1@31.add
May 23 00:06:05 leena sway[19481]: [143 00:06:05.837880] [glfw error 65544]: Wayland: fatal display error: Invalid argument
May 23 00:06:05 leena sway[1095]: 03:52:11.002 [ERROR] [wlr] [types/seat/wlr_seat_keyboard.c:370] creating a keymap file for 49317 bytes failed
May 23 00:06:05 leena sway[19494]: wl_display@1: error 1: invalid arguments for zwp_linux_buffer_params_v1@31.add
May 23 00:06:05 leena sway[19494]: [143 00:06:05.998243] [glfw error 65544]: Wayland: fatal display error: Invalid argument
This is the output from ls -lh /proc/PID/fd/ when this happens: out1.txt
This is the output from ls -lh /proc/PID/fd/ when this happens
Sounds like there is an unusually high number of pipes opened.
Yeah, looks like it. Is there some way to check why this many pipes have been opened?
Thank you, that helped. It seems it's various symptoms - as described above where I do not have any reaction, but also having a black screen, a moving cursor and a working keyboard (can switch to tty's) but also kind of a still working GUI where I can focus windows by moving the cursor, but that's about it (no typing into / interaction with the windows, no workspace switching, no sway reload / exit via keyboard shortcuts, etc.)
I got two backtraces and they look very similar - in both situations, which happened the same day and unlike what I experienced in my initial post - I had a black screen but was able to see and move the mouse cursor and switch to a TTY. In both scenarios I had an external screen attached, while before for days everything was working fine without an external screen. So the correlation is pretty obvious.
$ gdb /usr/local/bin/sway core.201339 GNU gdb (Debian 9.2-1) 9.2 Copyright (C) 2020 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-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/local/bin/sway... [New LWP 201339] [New LWP 201342] [New LWP 201343] [New LWP 201344] [New LWP 201345] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `sway'. #0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. [Current thread is 1 (Thread 0x7fa3e1c4a680 (LWP 201339))] (gdb) bt #0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00007fa3e34a941b in wl_event_loop_dispatch () from /lib/x86_64-linux-gnu/libwayland-server.so.0 #2 0x00007fa3e34a7105 in wl_display_run () from /lib/x86_64-linux-gnu/libwayland-server.so.0 #3 0x000055991c30c30e in server_run (server=0x55991c380320 <server>) at ../sway/server.c:244 #4 0x000055991c30b841 in main (argc=2, argv=0x7ffc7e0a8c08) at ../sway/main.c:412 (gdb) bt full #0 0x00007fa3e32891d6 in epoll_wait (epfd=3, events=0x7ffc7e0a88d0, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 No locals. #1 0x00007fa3e34a941b in wl_event_loop_dispatch () from /lib/x86_64-linux-gnu/libwayland-server.so.0 No symbol table info available. #2 0x00007fa3e34a7105 in wl_display_run () from /lib/x86_64-linux-gnu/libwayland-server.so.0 No symbol table info available. #3 0x000055991c30c30e in server_run (server=0x55991c380320 <server>) at ../sway/server.c:244 No locals. #4 0x000055991c30b841 in main (argc=2, argv=0x7ffc7e0a8c08) at ../sway/main.c:412 verbose = 0 debug = 1 validate = 0 allow_unsupported_gpu = 0 long_options = {{name = 0x55991c363148 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55991c36314d "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x55991c363154 "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x55991c36315d "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x55991c363163 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55991c36316b "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x55991c363173 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x55991c363182 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, { name = 0x55991c363192 "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 = 0x55991c362bd8 "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 (gdb)
I'd been experiencing this for some time. It gets progressively worse with more screens. I've been running with the following patch for months now: https://pastebin.com/XdDgHNyw Ever since this I've not seen this problem again. This also solves swaylock input problems for the first character getting lost after DPMS on.
will try btw use gist instead of pastebin
Uhm, love this! Fixing two really annoying problems :) is there any reason for this being only a gist and not a pull request?
I can't wait this being gone. I'll hold my horses of excitement though, as I bought 1) a new notebook 2) a new thunderbolt docking station 3) a new monitor
and pulled and rebuilt wlroots and sway at least twice a week ever since ...and nothing helped. I gotta give it a week or two not to suffer from sheer disappointment (again).
This is not to be misunderstood as blaming somebody. I could have just switched back to Xorg and i3 - but simply didn't want to.
I'd been experiencing this for some time. It gets progressively worse with more screens. I've been running with the following patch for months now: https://pastebin.com/XdDgHNyw Ever since this I've not seen this problem again. This also solves swaylock input problems for the first character getting lost after DPMS on.
Thank you, this seems to have fixed crashes for me. I'm on 96102184ab96c522fe1f9175bc4d5ceb09aa1720 with your patch applied.
Used to have frequent crashes (sometimes multiple times a day) when running sway with multiple screens on Laptop. Switching frequently between single-screen laptop use and external screens connected to TB docking station.
Crashes seemed to happen more often on docking station/multi screens. But can't tell for sure.
@adee's patch worked for me too. i have 3 monitors
I can't wait this being gone. I'll hold my horses of excitement though, as I bought
1. a new notebook 2. a new thunderbolt docking station 3. a new monitor
and pulled and rebuilt wlroots and sway at least twice a week ever since ...and nothing helped. I gotta give it a week or two not to suffer from sheer disappointment (again).
No (such) crashes for me either so far!
I think I'm experiencing the same issues described here. Been doing so for a long time. The only solution I've found was to disable dpms which is not a very good long term solution.
As the issue describes it only seems to happen when running with external monitors. I've got a workstation with a single monitor and a secondary laptop with only the built in display and I've never experienced issues on those machines. My main laptop is running with the built in display and a secondary display connected with usb-c (displayport). I recently replaced this setup and went from an intel GPU to an AMD GPU and both machines are having this issue.
Great to see that a patch exists. I'll have to test it. Any progress tracking down the root cause?
Before finding this issue I found a way to reproduce it. At least on my new machine. Default sway config with swayidle activated. Set lock time to 10 sec and dpms off to 20 sec. What I did was opening a bunch of terminals in all worspaces (kitty or foot didn't matter, xwayland on or off didn't matter). In most of the tests I ended up with swayidle locked and when I killed it from another TTY some of the terminals was displayed but not usable.
I have been experiencing this too. Randomly no keys were working, nor the mouse when the lockscreen was on, after a wake up. The laptop seemed to work (I heard the BT reconnecting, and I was able to ssh and kill sway to regain control) The patch from https://github.com/swaywm/sway/issues/5757#issuecomment-885217981 seems to fix this as well as another problem that was preventing to register the few keystrokes until I move the mouse.
I can also confirm this patch fixed the issue for me, without visible side effets thus far (I've been running with it for two months or so, I think).
Same for me. Been testing it out for a couple of hours and no issues or side effects to this point.
...Time to draft a new release? Ping @emersion
FYI: My patch is just a workaround, not a fix. It reintroduces the problem the input reload was there for: input map-to-output rules need them with new outputs. That would probably require a significant refactor (did not look at the code) to fix.
I don't use map-to-output rules, so for me it's not a problem. This is why no pull request was created. Although at this point it would be lesser of a problem than crashing compositors and dropped/duplicated keypresses in swaylock.
actually it does not seems to fix the problem. I regularly (probably after my laptop wakes up from sleep to go hybrid-sleep). There are the last lines of logs before rebooting.
Sep 26 19:22:21 axion sway[72680]: Parent pid 115222, child pid 115225
Sep 26 19:22:21 axion sway[72680]: Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Sep 26 19:22:21 axion sway[72680]: Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Sep 26 19:22:21 axion sway[72680]: Warning: cleaning all supplementary groups
Sep 26 19:22:21 axion sway[72680]: Warning: /sbin directory link was not blacklisted
Sep 26 19:22:21 axion sway[72680]: Warning: /usr/sbin directory link was not blacklisted
Sep 26 19:22:21 axion sway[72680]: Warning: cleaning all supplementary groups
Sep 26 19:22:21 axion sway[72680]: Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Sep 26 19:22:21 axion sway[72680]: Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Sep 26 19:22:21 axion sway[72680]: Child process initialized in 103.60 ms
Sep 26 19:24:32 axion sway[72680]: 01:06:03.014 [ERROR] [wlr] [libinput] event7 - Apple Inc. Magic Trackpad 2: client bug: event processing lagging behind by 28ms, your system is too slow
Sep 26 19:25:02 axion sway[72680]: 01:06:32.459 [ERROR] [wlr] [libinput] event7 - Apple Inc. Magic Trackpad 2: client bug: event processing lagging behind by 132ms, your system is too slow
Sep 26 19:25:02 axion sway[72680]: 01:06:32.459 [ERROR] [wlr] [libinput] event7 - Apple Inc. Magic Trackpad 2: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
Sep 26 19:31:59 axion sway[72680]: Missing device address argument
Sep 26 19:31:59 axion sway[72680]: Updated device 'librem_ec:kbd_backlight':
Sep 26 19:31:59 axion sway[72680]: Failed to open /dev/tty: No such device or address
Sep 27 08:33:46 axion sway[72680]: 00:00:03.002 [ERROR] [common/ipc-client.c:87] Unable to receive IPC response
Sep 27 08:33:46 axion sway[72680]: No default controller available
-- Boot ff1175663c24461da383fa9c9d1f3649 --
Symptoms are basically everything is frozen. I can't use any keyboard or mouse, can't switch to another TTY. I must force restart when this happens
this basically happens to me at least every day. I tried to reproduce manually but I can't. Can this "unable to receive IPC response" the cause or is it something else? I'm trying to find some clues on where to look for the bug
Actually scratch that. I was able to reproduce. It seems to be a combination of what is actually running (I've seen clues about something related to xwayland) and systemctl hybrid-sleep. I'm trying to isolate what needs to be running for the bug to trigger
I was able to reproduce but it really seems completely random. It happens after systemctl hybrid-sleep for sure. Last time it happened, I tried to connect to the laptop using SSH. it worked. I saw that sway and 2 kworker processes where eating 100% of CPU each. The fans did not start, but the temp was well above the normal fan trigger (when I restarted, the fans went crazy for 30s). I was not able to kill sway or any of the 2 kworker process (sudo kill -9
did nothing). this time I did not see the IPC error message in the logs
Is there anything more you would need to help debug this? This is a blocker for me as I can't rely on laptop going to sleep peacefully
This actually started to happen without a 3rd party monitor.
I'm experiencing frequent crashes/freezes when using Sway in combination with external screens. They usually occur when trying to unlock the screen (swaylock) - ot at least I noticed only then. The GUI doesn't seem to react anymore. Screens turn on (DPMS, screen backlight gets activated/ external screens wake up) but that's it. Even more, I'm not able to switch to a console anymore (ctrl+alt+4,5,6,..) nor to my login manager (ctrl+alt+1). What I do is pressing the power button which issues a graceful shutdown.
I also have the suspicion this might also be related to xwayland / x11 apps and/or dpms, however that's not sure and might be just an orthogonal issue. Disabling DPMS turning off screens (so screens staying on) did not really help, so I don't think DPMS it is related (or, again, it's different issues).
Please fill out the following:
Sway Version: commit 9e272a7986aa586a73951069aa76068e408a2c3f (origin/master, origin/HEAD)
Debug Log: I have to admit I'm a bit unhappy about the vast potentially sensitive information the debug log contains, so here's the last 500 lines which don't seem to contain anything too personal, but appear to be sufficient on first glance: https://pb.nanl.de/show.php?id=45115&hash=34919901&mode=raw
Thanks!