TachoRace: Exploiting Performance Counters for Run-Time Race Detection [report]

Jochen Schimmel, Victor Pankratius
2010
Fixing data races is a difficult parallel programming problem, even for experienced programmers. At the moment, dynamic race detectors are frequently used because they find races more reliably than other approaches; however, the dynamic approach significantly influences application behavior during debugging because all thread's memory accesses need to be monitored. Despite using such detectors at application development time, complex parallel applications may manifest existing races only after
more » ... eployment at customers, leading to crashes and corrupted data. Addressing these problems, we present TachoRace, a run-time detector using hardware performance counters in a novel way for identification of data races and inconsistent locking. Our low-overhead technique monitors cache coherency bus traffic to detect parallel accesses to unprotected shared resources and helps resolve conflicts transparently, thus making it appealing for production environments. Contrary to other run-time race detectors, TachoRace mostly builds upon existing hardware and makes a novel proposal to use synergy effects between hardware needed for debugging and hardware needed for performance analysis. As a proof of concept, we fully implemented the TachoRace detector as a software simulator; we evaluated it by executing real C/C++ applications from the Helgrind and SPLASH2 benchmark suites, including 29 representative parallel bug patterns derived from real-world programs. Experiments showed that TachoRace did not report false positive races and only missed one race pattern that could not be found by design. The average traffic overhead introduced by TachoRace to detect and automatically fix occurring races was just 0.2%.
doi:10.5445/ir/1000017053 fatcat:lj3xm46ywvfl3p5gwaq5sern4i