-
Notifications
You must be signed in to change notification settings - Fork 17
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
paste::get_contents leaks file descriptors to unix pipes #12
Comments
Thanks for the detailed report! I think I need to finish updating to the newest wayland-rs before I investigate this. I should have most of the update done in the wayland-rs-master branch. |
I've updated |
Still happens |
I investigated, looks like it's Smithay/wayland-rs#235 again. Using the |
Upon bringing it up with the wayland-rs maintainer, looks like the issue isn't that, but runs a bit deeper: Smithay/wayland-rs#376 |
A possible workaround is to have a long-lived connection in wl-clipboard-rs instead of creating a new one every time, while making sure to destroy all objects when they are no longer needed. |
I'm seeing the same problem in the latest version of wl-clipboard-rs. Looks like the issue is fixed in wayland-rs. Should we upgrade to wayland-client 0.29? |
I think it's only supposed to be fixed in wayland-client 0.30, which is the "full rework of the crate and API" version and AFAICT is not released yet. |
I've just finished porting to wayland-rs 0.30. Could you check if this is still an issue with the latest git commit? |
I see EMFILE panics many times per day, which I believe is caused by this. I'll test this over the next few days and share my results. |
Hey, so how'd it go? |
cargo build && target/debug/clipboard
On my machine I usually see output like:
When this happens I check the open file descriptors (the binary is called
clipboard
):lsof -p `pidof clipboard`
This number is going to depend on your system's file descriptor limit.
As mentioned in the comment, sometimes
get_contents
hangs forever instead. If you remove thereturn
in the error branch and continue callingget_contents
more errors will happen andget_contents
will eventually hang.The text was updated successfully, but these errors were encountered: