Created attachment 176162 [details] tools to log the activity of file descriptor for kwin_wayland, just run it and wait until exit. in the cwd of the tool are been created loggerOut_poll.txt and loggerOut_ioctl.txt, which are the logs *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY while using kde in wayland with two gpu and two monitor (one amd(amdgpu) and one nvidia(nouveau) only for use the second monitor, I refuse to use the nvidia one as primary because is good only for a display adapter and i don't switch back to 1 monitor after years of using two monitor, one monitor for gpu) i noticed repetitive crashing for file descriptor, i increased it, but nothing changed, after investigating a while i noticed that kwin continue spawning fd in POLLIN, most of it are use 1 or 2 times, and are leaved opened. This only happen when i'm using as primary gpu the amd one, while i'm using the nvidia kwin_wayland doesn't continue spawning file descriptor STEPS TO REPRODUCE Install amdgpu, nouveau use amdgpu as primary gpu (both amdgpu and nouveau enabled, altroutgh it's work fine) start KDE with wayland use the pc for daily use (to accelerate the crash, it's recommended to open a game) OBSERVED RESULT file descriptor constant increase while using the pc and after a few hours reaching more than 100k fd and kwin_wayland crash + increase memory usage over time EXPECTED RESULT kwin_wayland don't continue opening fd, like when the nouveau gpu is set as primary one SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.12.1-arch1-1 (64-bit) KDE Plasma Version: 6.2.3 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 ADDITIONAL INFORMATION nov 26 21:44:38 archlinux kwin_wayland[263153]: gbm_bo_get_fd_for_plane() failed: Too many open files nov 26 21:44:38 archlinux kwin_wayland[263153]: kwin_screencast: "" Could not connect to stream nov 26 21:44:38 archlinux kwin_wayland[263153]: kwin_screencast: "" Failed to create PipeWire stream nov 26 21:44:38 archlinux plasmashell[263149]: error creating screencast "Failed to create PipeWire stream" nov 26 21:44:39 archlinux kwin_wayland_wrapper[263153]: file descriptor expected, object (122), message add(huuuuu) nov 26 21:44:39 archlinux kwin_wayland_wrapper[263153]: error in client communication (pid 263153) nov 26 21:44:39 archlinux kwin_wayland_wrapper[263192]: XWAYLAND: wl_display#1: error 1: invalid arguments for zwp_linux_buffer_params_v1#122.add nov 26 21:44:39 archlinux kwin_wayland_wrapper[263192]: (EE) failed to dispatch Wayland events: Invalid argument nov 26 21:44:39 archlinux kwin_wayland[263153]: kwin_xwl: The X11 connection broke (error 1) below i attach the pyhon tool that i created to analyze the fd poll IO status
Can you please capture the contents of `ls -l /proc/$(pidof kwin_wayland)/fd` when the issue happens the next time? You may need to run the ls command with sudo
Setting this to waiting for info
(In reply to Vlad Zahorodnii from comment #1) > Can you please capture the contents of `ls -l /proc/$(pidof > kwin_wayland)/fd` when the issue happens the next time? You may need to run > the ls command with sudo In general the content it's a lot of a_inode:sync_file, in any case i create a program to log the fd for kwin.
Created attachment 176177 [details] file descriptor log
After spent 7 hours to achieve only two crash i can't get the "ls -l /proc/$(pid)/fd" with the max of fd that kwin_wayland can open (529k), during when it's alive i run it, and i collected "only" 136K fd i know that was requested when it crash, but it took me every time at least 3 hours. during this time i did more testing and i find out that it starts spawning fd when an update occurs on the display attached to the nvidia gpu
(In reply to anonymous.34197 from comment #3) > (In reply to Vlad Zahorodnii from comment #1) > > Can you please capture the contents of `ls -l /proc/$(pidof > > kwin_wayland)/fd` when the issue happens the next time? You may need to run > > the ls command with sudo > > In general the content it's a lot of a_inode:sync_file, in any case i create > a program to log the fd for kwin. Okay, it seems like native fence file descriptors are leaked somehow.
Should be fixed by: https://invent.kde.org/plasma/kwin/-/merge_requests/6847