Skip to content
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

Watcher stuck in infinite loop, using 100% CPU #9

Open
johan-bjareholt opened this issue Jan 10, 2022 · 0 comments
Open

Watcher stuck in infinite loop, using 100% CPU #9

johan-bjareholt opened this issue Jan 10, 2022 · 0 comments

Comments

@johan-bjareholt
Copy link
Member

Sometimes (don't know why), the connection to the wayland compositor can fail.
In such a case, the expected behaviour would be to get a SIGPIPE and then shut down the watcher (with the option to restart it right after).
However, apparently Rust ignores SIGPIPE signals, and the wayland display event queue gets stuck in an infinite loop of trying to call "sendmsg".

Maybe it's possible to handle in some way, have not been digging very deep yet.

rust-lang/rust#46016

#0  0x00007f5e10eda56d in sendmsg () from /usr/lib/libpthread.so.0
#1  0x000055ace7684584 in nix::sys::socket::sendmsg ()
#2  0x000055ace7682471 in wayland_commons::socket::BufferedSocket::flush ()
#3  0x000055ace7439e20 in wayland_client::imp::queues::EventQueueInner::dispatch ()
#4  0x000055ace74484f4 in aw_watcher_window_wayland::main ()
#5  0x000055ace7455373 in std::rt::lang_start::{{closure}} ()
#6  0x000055ace7696818 in std::rt::lang_start_internal::{{closure}} () at src/libstd/rt.rs:52
#7  std::panicking::try::do_call<closure-0,i32> () at src/libstd/panicking.rs:297
#8  std::panicking::try<i32,closure-0> () at src/libstd/panicking.rs:274
#9  std::panic::catch_unwind<closure-0,i32> () at src/libstd/panic.rs:394
#10 std::rt::lang_start_internal () at src/libstd/rt.rs:51
#11 0x000055ace74492b2 in main ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant