Correct Black-Box Monitors for Distributed Deadlock Detection: Formalisation and Implementation
Radoslaw Jan Rowicki, Adrian Francalanza, Alceste Scalas
Abstract
Many software applications rely on concurrent and distributed (micro)services that interact via messagepassing and various forms of remote procedure calls (RPC). As these systems organically evolve and grow in scale and complexity, the risk of introducing deadlocks increases and their impact may worsen: even if only a few services deadlock, many other services may block while awaiting responses from the deadlocked ones. As a result, the "core" of the deadlock can be obfuscated by its consequences on the rest of the system, and diagnosing and fixing the problem can be challenging.
In this work we tackle the challenge by proposing distributed black-box monitors that are deployed alongside each service and detect deadlocks by only observing the incoming and outgoing messages, and exchanging probes with other monitors. We present a formal model that captures popular RPC-based application styles (e.g., gen_servers in Erlang/OTP), and a distributed black-box monitoring algorithm that we prove sound and complete (i.e., identifies deadlocked services with neither false positives nor false negatives). We implement our results in a tool called DDMon for the monitoring of Erlang/OTP applications, and we evaluate its performance.
This is the first work that formalises, proves the correctness, and implements distributed black-box monitors for deadlock detection. Our results are mechanised in Coq. DDMon is the companion artifact of this paper.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a0d06804-6cd1-4fd6-ba95-34a798fa22e0Builds on1
Related papers
- Effective Concurrency Testing for Distributed SystemsXinhao Yuan, Junfeng YangASPLOS 2020 · 30 citations
- Runtime Protocol Refinement Checking for Distributed Protocol ImplementationsDing Ding, Zhanghan Wang, Jinyang Li, Aurojit PandaNSDI 2025 · 6 citations
- Performal: Formal Verification of Latency Properties for Distributed SystemsTony Nuda Zhang, Upamanyu Sharma, Manos KapritsosPLDI 2023 · 4 citations
- Dynamic Partial Deadlock Detection and Recovery via Garbage CollectionGeorgian-Vlad Saioc, I-Ting Angelina Lee, Anders Møller, Milind ChabbiASPLOS 2025 · 3 citations
- DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent ProgramsAleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. FosterPOPL 2026 · 1 citation
