HackerPapers

arXiv:2401.01114cs.PL

Two Birds One Stone: Effective Static Detection of Resource and Communication Deadlocks in Rust Programs

Yu Zhang, Kaiwen Zhang, Guanjun Liu, Yuandao Cai, Shengchao Qin

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Although Rust claims to enable fearless concurrency, concurrency errors remain prevalent in practical applications, with deadlocks particularly prominent and harmful. Current static deadlock detection techniques either do not cater to Rust programs without incorporating Rust semantics or solely concentrate on resource deadlocks, disregarding communication deadlocks. In this paper, we present RcChecker, the first static detection method that simultaneously targets resource and communication deadlocks for Rust. At its core, RcChecker introduces the signal-lock graph to characterize the interactions between threads through lock variables and condition variables. The construction of the signal-lock graph involves utilizing flow-sensitive and context-sensitive analyses to track variable lifetime details and abstracting actions associated with condition variables into signal resource holdings and requests. By examining cycles within the signal-lock graph, we can effectively identify resource and communication deadlocks in a unified way. Compared to the existing Rust deadlock detection tool, RcChecker effectively eliminates eight resource deadlock false positives and detects seventeen errors that the existing tool fails to identify. Furthermore, RcChecker reports seven previously undiscovered issues in real-world Rust applications, including two resource deadlocks and five communication deadlocks.

arXiv comments
Journal reference
Automated Software Engineering 33(2), Article 65 (2026)
DOI
doi:10.1007/s10515-026-00614-z
Subjects
cs.PLProgramming Languages cs.CRCryptography and Security cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from May 2025 to May 2025. Found in 1 HN submission from Jan 2024 to Jan 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Yes. But the Arc has to wrap a Mutex, which means you have to lock to get access. It's a dual of the Rc/RefCell/borrow mechanism. The trouble with calling .lock() is that there is a potential for deadlock. There are some people working on static analysis for deadlock prevention…

      AnimatsView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.