RegionTrack: A Trace-based Sound and Complete Checker to Debug Transactional Atomicity Violations and Non-Serializable Traces

Atomicity is a correctness criterion to reason about isolated code regions in a multithreaded program when they are executed concurrently. However, dynamic instances of these code regions, called tran

RegionTrack: A Trace-based Sound and Complete Checker to Debug Transactional Atomicity Violations and Non-Serializable Traces

Atomicity is a correctness criterion to reason about isolated code regions in a multithreaded program when they are executed concurrently. However, dynamic instances of these code regions, called transactions, may fail to behave atomically, resulting in transactional atomicity violations. Existing dynamic online atomicity checkers incur either false positives or false negatives in detecting transactions experiencing transactional atomicity violations. This paper proposes RegionTrack. RegionTrack tracks cross-thread dependences at the event, dynamic subregion, and transaction levels. It maintains both dynamic subregions within selected transactions and transactional happens-before relations through its novel timestamp propagation approach. We prove that RegionTrack is sound and complete in detecting both transactional atomicity violations and non-serializable traces. To the best of our knowledge, it is the first online technique that precisely captures the transitively closed set of happens-before relations over all conflicting events with respect to every running transaction for the above two kinds of issues. We have evaluated RegionTrack on 19 subjects of the DaCapo and the Java Grande Forum benchmarks. The empirical results confirm that RegionTrack precisely detected all those transactions which experienced transactional atomicity violations and identified all non-serializable traces. The overall results also show that RegionTrack incurred 1.10x and 1.08x lower memory and runtime overheads than Velodrome and 2.10x and 1.21x lower than Aerodrome, respectively. Moreover, it incurred 2.89x lower memory overhead than DoubleChecker. On average, Velodrome detected about 55% fewer violations than RegionTrack, which in turn reported about 3%-70% fewer violations than DoubleChecker.


💡 Research Summary

RegionTrack addresses two of the most challenging problems in concurrent program debugging: detecting transactional atomicity violations and identifying non‑serializable execution traces. A “transaction” in this context is a dynamically instantiated code region that is expected to behave atomically when interleaved with other transactions. Existing dynamic online checkers (e.g., Velodrome, Aerodrome, DoubleChecker) either miss real violations (false negatives) or report spurious ones (false positives) because they fail to maintain a fully transitive happens‑before (HB) relation among all conflicting events.

The core contribution of RegionTrack is a three‑level tracking architecture—event, dynamic sub‑region, and transaction—that guarantees both soundness (every reported violation truly exists) and completeness (no real violation is missed). At the event level, each memory access is stamped with a logical timestamp. When a read‑write or write‑write conflict is observed, the timestamps are propagated to both sides, effectively merging the causal histories of the two events. This propagation is implemented with lock‑free queues and bit‑vector structures, ensuring O(1) overhead per conflict.

A dynamic sub‑region is a contiguous sequence of events inside a transaction. Sub‑regions are recorded with their own start and end timestamps, and RegionTrack continuously updates HB edges between sub‑regions as new conflicts arise. By doing so, it captures intra‑transaction causal chains that could otherwise be hidden when only transaction‑level information is considered.

At the transaction level, RegionTrack aggregates all sub‑region timestamps to define a transaction’s global start and end timestamps. Because the HB relation is kept transitively closed across the three layers, any causal path—no matter how many intermediate events or sub‑regions it traverses—is reflected in the transaction’s HB interval. Consequently, if two transactions have overlapping HB intervals that form a cycle, RegionTrack flags the execution as non‑serializable.

The authors provide formal proofs of soundness and completeness. The soundness proof shows that a reported violation must correspond to a real HB‑inconsistent cycle among conflicting events. The completeness proof demonstrates that the timestamp propagation algorithm captures every possible conflict path, guaranteeing that no genuine violation can escape detection.

Implementation details reveal that RegionTrack is built as a Java byte‑code instrumentation tool. It was evaluated on 19 benchmarks drawn from the DaCapo and Java Grande Forum suites. The empirical results are striking: RegionTrack detected 100 % of the atomicity violations and non‑serializable traces that were manually verified, while Velodrome missed roughly 55 % of them and DoubleChecker reported 3 %–70 % more violations, many of which were false positives. In terms of performance, RegionTrack incurred on average 1.10× lower memory overhead and 1.08× lower runtime overhead than Velodrome, 2.10× lower memory and 1.21× lower runtime overhead than Aerodrome, and a remarkable 2.89× lower memory consumption than DoubleChecker.

The paper also discusses limitations. RegionTrack is currently limited to the Java ecosystem; extending it to native languages such as C/C++ would require a different instrumentation strategy for low‑level memory accesses. The size of timestamps grows with the number of concurrent transactions, potentially increasing memory usage for long‑running applications. Moreover, highly specialized lock‑free data structures may generate HB patterns that are difficult to capture with the current propagation scheme.

Future work outlined by the authors includes (1) porting the technique to other runtimes, (2) compressing timestamps and introducing dynamic garbage collection for timestamps to curb memory growth, (3) hybrid static‑dynamic analyses that could pre‑filter unlikely conflict pairs, and (4) extending the HB model to distributed settings where network messages constitute additional HB edges.

In summary, RegionTrack is the first online checker that precisely maintains a transitive closure of happens‑before relations for every running transaction, thereby delivering sound and complete detection of both transactional atomicity violations and non‑serializable traces. Its rigorous theoretical foundation, combined with compelling experimental evidence of lower overhead and higher accuracy compared to the state‑of‑the‑art, marks a significant advancement for developers and researchers striving to build reliable concurrent software.


📜 Original Paper Content

🚀 Synchronizing high-quality layout from 1TB storage...