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

Worker thread exhaustion #34

Open
nyarly opened this issue Jan 28, 2020 · 3 comments
Open

Worker thread exhaustion #34

nyarly opened this issue Jan 28, 2020 · 3 comments

Comments

@nyarly
Copy link

nyarly commented Jan 28, 2020

I'm working on a project that uses varlink (c.f. https://github.com/nyarly/lorri/blob/stream_events/src/daemon/rpc.rs)

It appears that clients connecting to the Monitor interface are leaking worker threads - even after those clients disconnect, the thread remains listening. Previously, we used raw sockets, and the closing of the socket immediately released the thread.

Now I'm seeing sockets left open when the client program exits, and the worker threads hanging out (and trying to send new events to those sockets and hanging.)

@haraldh
Copy link
Collaborator

haraldh commented Feb 18, 2020

yeah.. might be time to switch to async and use tokio

@haraldh
Copy link
Collaborator

haraldh commented Feb 18, 2020

do you have a (small) reproducer?

@pbar1
Copy link

pbar1 commented Mar 12, 2024

I was just hitting this. Turns out I'd used todo!() macros to suppress the compiler errors for the Varlink methods I'd not yet implemented. That would cause the thread to panic, but the thread pool logic seems to not have handled this well and I quickly reached 100/100 threads busy.

When there are no panics, this works as expected

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

3 participants