Dynamic Race Detection With O(1) Samples

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Thokair, Mosaad Al, Zhang, Minjian, Mathur, Umang, Viswanathan, Mahesh
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913911817633792
author Thokair, Mosaad Al
Zhang, Minjian
Mathur, Umang
Viswanathan, Mahesh
author_facet Thokair, Mosaad Al
Zhang, Minjian
Mathur, Umang
Viswanathan, Mahesh
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_20127
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Dynamic Race Detection With O(1) Samples
Thokair, Mosaad Al
Zhang, Minjian
Mathur, Umang
Viswanathan, Mahesh
Programming Languages
D.2.5; D.1.3; F.3.2
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.
title Dynamic Race Detection With O(1) Samples
topic Programming Languages
D.2.5; D.1.3; F.3.2
url https://arxiv.org/abs/2506.20127