-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X11 denial of service by client crash #2475
Comments
There should be an automatic restart of the Xwayland process, unless the Xwayland process itself hangs (which seems likely based on your description). If that is correct, then the bug is a Xwayland bug, but you can kill the Xwayland process and Wayfire will start a new one. Any of the existing Xwayland clients will be killed though, but at least wayland-native clients will survive. |
Oh, I see that Xwayland is gone (but silently and I didn't get a core dump), somehow it didn't come back. |
Have the same with SAPGui 7.80 which is java application mostly. If it crashes - Xwayland is gone and never come back. If I just kill Xwayland using kill command it restarts without any issue. |
It might be worth trying another wlroots-based compositor with the same wlroots version. Wlroots is actually in charge of tracking Xwayland and when to restart it and Wayfire has few things it can do to influence this behavior, so I suspect the bug is in wlroots. If you compile from scratch, you might also want to try wlroots 0.18 with this PR for Wayfire: #2452 |
Quickly tried with merged track-wlroots over master ( |
It seems to me that Xwayland is dying in a way that wlroots does not destroy the socket and fails to restart Xwayland. If you run with |
Reproduced with the logging and we have:
So I see that create_pool issue, and the "too many open files" which I can check further. |
I googled the message "[wayland] file descriptor expected, object (4), message create_pool(nhi)" and found quite a few relevant similar reports. As far as I can tell, you'll want Xwayland with this commit. So, the problem might be fixed by upgrading Xwayland. I do not believe this to be a wayfire issue since this bug affects all different types of compositors with Xwayland, so closing for now. |
The number of open files by wayfire is indeed increasing uncontrollably:
When using my killer program. It's wlroots that can't reopen Xwayland due to max open fds. I am running a recent Xwayland that includes the above patch. |
@zougloub I found this sway commit which indicates that wayfire might want to raise the limit as well. So I am reopening this issue. I will work on a patch, but is there any way you can test to see if this issue happens in sway? |
Note, in this case, I looks like that X client manages to raise, forever, the amount of fds (I found a way to get 100 fds open per second), and the number is not going down until I quit the program ; raising the limit may just be pushing the inevitable further. It also means that I have found a workaround, I can watch the number of fds and notify when it's dangerously high, then I can close and reopen my program, and the number of open fds in Xwayland and wayfire has gone down, and all other X clients don't need to be killed. I'll see about testing in sway. |
Also, do you have latest Xwayland? What is the output of |
Here is a patch to set max open files limit for wayfire, even though as you said, it might only buy you more time. |
This sounds like a bug in Xwayland or in wlroots tbh, though what Sway has will probably be useful in Wayfire too anyway, for cases where there are many open windows, not in your case. |
xwayland 24.1.2 Be back soon with sway results. |
Sadly the program doesn't render correctly under sway, so I can't reproduce the problem there. |
To me this indicates even more strongly that the bug is in the Xwayland server. I would try weston as well, or gnome-wayland, my guess is you will get the same issue, then you can report it to the Xwayland developers :/ |
Installed xwayland from git so latest of the latest, nothing changes from 24.1.3 Latest SAP GUI 8.10 for Linux/java. It does survive for 5 minutes max before crash and xwayland can not be restarted after that crash. Only complete wayfire restart helps. No coredumps or something like that, nothing in dmesg or journalctl |
Describe the bug
I've been running some program (https://www.st.com/en/development-tools/stm32cubeide.html) which sometimes crashes (the crash is unrelated to X) and this somehow causes a denial of service on the X11 interface.
Further X11 clients will hang trying to connect to the X socket:
Which belongs to wayfire, which is otherwise responsive.
For restoring X11 functionality, I have no other workaround except restarting wayfire.
To Reproduce
Reproduction is not easy, I don't know what can cause the crash yet.
Expected behavior
Wayfire version
0.9.0
The text was updated successfully, but these errors were encountered: