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

Support for Tokio::sync primitives #53

Open
agourlay opened this issue Jun 29, 2023 · 3 comments
Open

Support for Tokio::sync primitives #53

agourlay opened this issue Jun 29, 2023 · 3 comments

Comments

@agourlay
Copy link

agourlay commented Jun 29, 2023

Thank you very much for this tool, it has helped me and my team several times to find critical deadlocks 👏

The only missing part is having support for the primitives from Tokio::sync such as: RwLock & Mutex.

Is it even possible to track usage of asynchronous locks in a similar fashion?

If yes, I would be happy to help and contribute as it would be a game changer for my current usage of Rust.

@BurtonQin
Copy link
Owner

Glad you are interested in my project. The representation of async's Mutex primitives in MIR is different from that of sync. But I believe it can be done, and it's something I've always wanted to do, but I'm short on time recently.

@agourlay
Copy link
Author

Happy to hear it is feasible 👍

Could you please share some ideas to help me get started?

I have tried to add the detection of Tokio primitives in to the lock interest infrastructure.

It seems those new guards are now picked up by the analyzer but as far as I can tell the callgraphs for tokio::spawn are not generated so no deadlocks are detected.

@ewoolsey
Copy link

ewoolsey commented Jul 7, 2023

Would also love to have support for tokio. Would be a game changer for my project. This is a massively cool project, thanks so much for your efforts.

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