ABSTRACT
We propose a new algorithm for dynamic data-race detection. Our algorithm reports no false positives and runs on arbitrary C and C++ code. Unlike previous algorithms, we do not have to instrument every memory access or track a full happens-before relation. Our data-race detector, which we call IFRit, is based on a run-time abstraction called an interference-free region (IFR). An IFR is an interval of one thread's execution during which any write to a specific variable by a different thread is a data race. We insert instrumentation at compile time to monitor active IFRs at run-time. If the runtime observes overlapping IFRs for conflicting accesses to the same variable in two different threads, it reports a race. The static analysis aggregates information for multiple accesses to the same variable, avoiding the expense of having to instrument every memory access in the program.
We directly compare IFRit to FastTrack and ThreadSanitizer, two state-of-the-art fully-precise data-race detectors. We show that IFRit imposes a fraction of the overhead of these detectors. We show that for the PARSEC benchmarks, and several real-world applications, IFRit finds many of the races detected by a fully-precise detector. We also demonstrate that sampling can further reduce IFRit's performance overhead without completely forfeiting precision.
- M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems (TOPLAS), 28(2):207--255, March 2006. Google ScholarDigital Library
- S. V. Adve and H.-J. Boehm. Memory models: A case for rethinking parallel languages and hardware. Communications of the ACM (CACM), 53(8):90--101, August 2010. Google ScholarDigital Library
- C. Bienia. Benchmarking Modern Multiprocessors. PhD thesis, Princeton University, January 2011. Google ScholarDigital Library
- H.-J. Boehm. How to miscompile programs with "benign" data races. In USENIX Workshop on Hot Topics in Parallelism (HotPar), 2011. Google ScholarDigital Library
- H.-J. Boehm and S. Adve. Foundations of the C++ con-currency memory model. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarDigital Library
- M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: proportional detection of data races. In ACM SIGPLAN Confer-ence on Programming Language Design and Implementation (PLDI), 2010. Google ScholarDigital Library
- L. Effinger-Dean, H.-J. Boehm, P. Joisha, and D. Chakrabarti. Extended sequential reasoning for data-race-free programs. In ACM SIGPLAN Workshop on Memory Systems Performance and Correctness (MSPC), 2011. Google ScholarDigital Library
- D. Engler and K. Ashcroft. RacerX: effective, static detection of race conditions and deadlocks. In ACM Symposium on Operating Systems Principles (SOSP), 2003. Google ScholarDigital Library
- J. Erickson, M. Musuvathi, S. Burckhardt, and K. Olynyk. Effective data-race detection for the kernel. In USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2010. Google ScholarDigital Library
- C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarDigital Library
- ISO JTC1/SC22/WG14. ISO/IEC 9899:2011, Information technology "Programming languages" C. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=57853. Draft available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf.Google Scholar
- ISO JTC1/SC22/WG21. ISO/IEC 14882:2011, Information technology -- Programming languages -- C++. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372. Draft available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf.Google Scholar
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM (CACM), 21 (7):558--565, July 1978. Google ScholarDigital Library
- C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization (CGO), 2004. Google ScholarDigital Library
- S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2008. Google ScholarDigital Library
- B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H.-J. Boehm. Conflict exceptions: Simplifying concurrent language semantics with precise hardware exceptions for data-races. In ACM IEEE International Symposium on Computer Architecture (ISCA), 2010. Google ScholarDigital Library
- B. Lucia, B. P. Wood, and L. Ceze. Isolating and understand-ing concurrency errors using reconstructed execution fragments. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011. Google ScholarDigital Library
- D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: effective sampling for lightweight data-race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarDigital Library
- F. Mattern. Virtual time and global states of distributed systems. In International Workshop on Parallel and Distributed Algorithms and Applications (PDAA), 1988.Google Scholar
- M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2006. Google ScholarDigital Library
- M. Olszewski, Q. Zhao, D. Koh, J. Ansel, and S. Ama-rasinghe. Aikido: accelerating shared data dynamic analyses. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2012. Google ScholarDigital Library
- E. Pozniansky and A. Schuster. MultiRace: Efficient on-the-fly data race detection in multithreaded C++ programs. Concurrency and Computation: Practice and Experience, 19 (3):327--340, March 2007. Google ScholarDigital Library
- D. Saff and M. D. Ernst. Reducing wasted development time via continuous testing. In IEEE International Symposium on Software Reliability Engineering (ISSRE), 2003. Google ScholarDigital Library
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. An-derson. Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems (TOCS), 15(4):391--411, November 1997. Google ScholarDigital Library
- K. Serebryany and T. Iskhodzhanov. ThreadSanitizer--data race detection in practice. In Workshop on Binary Instrumentation and Applications, 2009. Google ScholarDigital Library
- J. Sevc1k and D. Aspinall. On validity of program transforma-tions in the Java memory model. In European Conference on Object-Oriented Programming (ECOOP), 2008. Google ScholarDigital Library
- J. Yu and S. Narayanasamy. A case for an interleaving con-strained shared-memory multiprocessor. In ACM IEEE International Symposium on Computer Architecture (ISCA), 2009. Google ScholarDigital Library
- Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: efficient detection of data race conditions via adaptive tracking. In ACM Symposium on Operating Systems Principles (SOSP), 2005. Google ScholarDigital Library
Index Terms
- IFRit: interference-free regions for dynamic data-race detection
Recommendations
IFRit: interference-free regions for dynamic data-race detection
OOPSLA '12We propose a new algorithm for dynamic data-race detection. Our algorithm reports no false positives and runs on arbitrary C and C++ code. Unlike previous algorithms, we do not have to instrument every memory access or track a full happens-before ...
Low-level detection of language-level data races with LARD
ASPLOS '14Researchers have proposed always-on data-race exceptions as a way to avoid the ill effects of data races, but slow performance of accurate dynamic data-race detection remains a barrier to the adoption of always-on data-race exceptions. Proposals for ...
Low-level detection of language-level data races with LARD
ASPLOS '14Researchers have proposed always-on data-race exceptions as a way to avoid the ill effects of data races, but slow performance of accurate dynamic data-race detection remains a barrier to the adoption of always-on data-race exceptions. Proposals for ...
Comments