Open e00E opened 4 years ago
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 wayland-rs
, do you mind re-testing on latest master in case it was an old wayland-rs
issue?
Still happens
I investigated, looks like it's https://github.com/Smithay/wayland-rs/issues/235 again. Using the native_lib
feature makes the issue go away.
Upon bringing it up with the wayland-rs maintainer, looks like the issue isn't that, but runs a bit deeper: https://github.com/Smithay/wayland-rs/issues/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?
On my machine I usually see output like:
When this happens I check the open file descriptors (the binary is called
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.