Correct Black-Box Monitors for Distributed Deadlock Detection: Formalisation and Implementation (Technical Report)

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Rowicki, Radosław Jan, Francalanza, Adrian, Scalas, Alceste
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912554256695296
author Rowicki, Radosław Jan
Francalanza, Adrian
Scalas, Alceste
author_facet Rowicki, Radosław Jan
Francalanza, Adrian
Scalas, Alceste
contents Many software applications rely on concurrent and distributed (micro)services that interact via message-passing 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.
format Preprint
id arxiv_https___arxiv_org_abs_2508_14851
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Correct Black-Box Monitors for Distributed Deadlock Detection: Formalisation and Implementation (Technical Report)
Rowicki, Radosław Jan
Francalanza, Adrian
Scalas, Alceste
Logic in Computer Science
Programming Languages
Many software applications rely on concurrent and distributed (micro)services that interact via message-passing 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.
title Correct Black-Box Monitors for Distributed Deadlock Detection: Formalisation and Implementation (Technical Report)
topic Logic in Computer Science
Programming Languages
url https://arxiv.org/abs/2508.14851