Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Keeping Ref of dashmap over await points can lead to deadlocks #959

Open
dkales opened this issue Jan 22, 2025 · 1 comment
Open

Keeping Ref of dashmap over await points can lead to deadlocks #959

dkales opened this issue Jan 22, 2025 · 1 comment
Assignees

Comments

@dkales
Copy link
Collaborator

dkales commented Jan 22, 2025

This might be relevant for you @bgillesp @naure @iliailia: We did some experiments/benchmarks with the GPRC networking and used the impl in this repository as a starting point.

In our scenarios we managed to deadlock it quite consistently, due to it holding the Dashmap Ref you get from .get over await points.

e.g.

let queue = self.queues.get(sender_id).ok_or(eyre!(format!(

Changing it to tokio::sync::RwLock<HashMap> does fix it, but might not be the greatest for perf.

IDK if you have hit that in your current development

@naure
Copy link
Collaborator

naure commented Jan 23, 2025

That’s correct. I’m reviewing all these usages at the moment and probably move to async mutexes.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants