Dynamic Race Detection With O(1) Samples

๐Ÿ“… 2025-06-25
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Detecting dynamic data races in large-scale software incurs prohibitively high overhead, hindering practical deployment. To address this, we propose the first sublinear-time HB-race detection method based on a vector-clockโ€“enabled happens-before (HB) model, integrated with randomized sampling and property testing. We quantify trajectory divergence via Hamming distance, achieving O(1) sample complexity and sublinear analysis time in the number of events, while guaranteeing zero false positives. Our approach ensures high-probability detection of races in trajectories that are far from race-free, significantly reducing runtime overhead. Experiments demonstrate that our method substantially outperforms existing deterministic and sampling-based tools in speed, while attaining state-of-the-art accuracy in real-world race detection.

Technology Category

Application Category

๐Ÿ“ Abstract
Happens before-based dynamic analysis is the go-to technique for detecting data races in large scale software projects due to the absence of false positive reports. However, such analyses are expensive since they employ expensive vector clock updates at each event, rendering them usable only for in-house testing. In this paper, we present a sampling-based, randomized race detector that processes only constantly many events of the input trace even in the worst case. This is the first sub-linear time (i.e., running in o(n) time where n is the length of the trace) dynamic race detection algorithm; previous sampling based approaches like Pacer run in linear time (i.e., O(n)). Our algorithm is a property tester for HB-race detection -- it is sound in that it never reports any false positive, and on traces that are far, with respect to hamming distance, from any race-free trace, the algorithm detects an HB-race with high probability. Our experimental evaluation of the algorithm and its comparison with state-of-the-art deterministic and sampling based race detectors shows that the algorithm does indeed have significantly low running time, and detects races quite often.
Problem

Research questions and friction points this paper is trying to address.

Detects data races with constant event samples
Achieves sub-linear time dynamic race detection
Ensures no false positives in race reports
Innovation

Methods, ideas, or system contributions that make the work stand out.

Sampling-based randomized race detection
Sub-linear time HB-race detection
Constant event processing worst-case
๐Ÿ”Ž Similar Papers
No similar papers found.