skip to main content
research-article

IFRit: interference-free regions for dynamic data-race detection

Published: 19 October 2012 Publication History

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.

References

[1]
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.
[2]
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.
[3]
C. Bienia. Benchmarking Modern Multiprocessors. PhD thesis, Princeton University, January 2011.
[4]
H.-J. Boehm. How to miscompile programs with "benign" data races. In USENIX Workshop on Hot Topics in Parallelism (HotPar), 2011.
[5]
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.
[6]
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.
[7]
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.
[8]
D. Engler and K. Ashcroft. RacerX: effective, static detection of race conditions and deadlocks. In ACM Symposium on Operating Systems Principles (SOSP), 2003.
[9]
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.
[10]
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.
[11]
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.
[12]
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.
[13]
L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM (CACM), 21 (7):558--565, July 1978.
[14]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization (CGO), 2004.
[15]
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.
[16]
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.
[17]
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.
[18]
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.
[19]
F. Mattern. Virtual time and global states of distributed systems. In International Workshop on Parallel and Distributed Algorithms and Applications (PDAA), 1988.
[20]
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.
[21]
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.
[22]
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.
[23]
D. Saff and M. D. Ernst. Reducing wasted development time via continuous testing. In IEEE International Symposium on Software Reliability Engineering (ISSRE), 2003.
[24]
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.
[25]
K. Serebryany and T. Iskhodzhanov. ThreadSanitizer--data race detection in practice. In Workshop on Binary Instrumentation and Applications, 2009.
[26]
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.
[27]
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.
[28]
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.

Cited By

View all
  • (2023)Tolerate Control-Flow Changes for Sound Data Race PredictionProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00118(1342-1354)Online publication date: 14-May-2023
  • (2022)BiRD: Race Detection in Software Binaries under Relaxed Memory ModelsACM Transactions on Software Engineering and Methodology10.1145/3498538Online publication date: 31-Jan-2022
  • (2021)Sound and efficient concurrency bug predictionProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468549(255-267)Online publication date: 20-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 47, Issue 10
OOPSLA '12
October 2012
1011 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2398857
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
    October 2012
    1052 pages
    ISBN:9781450315616
    DOI:10.1145/2384616
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2012
Published in SIGPLAN Volume 47, Issue 10

Check for updates

Author Tags

  1. concurrency
  2. data-race detection
  3. interference-free regions

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)1
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Tolerate Control-Flow Changes for Sound Data Race PredictionProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00118(1342-1354)Online publication date: 14-May-2023
  • (2022)BiRD: Race Detection in Software Binaries under Relaxed Memory ModelsACM Transactions on Software Engineering and Methodology10.1145/3498538Online publication date: 31-Jan-2022
  • (2021)Sound and efficient concurrency bug predictionProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468549(255-267)Online publication date: 20-Aug-2021
  • (2019)Dependence-aware, unbounded sound predictive race detectionProceedings of the ACM on Programming Languages10.1145/33606053:OOPSLA(1-30)Online publication date: 10-Oct-2019
  • (2018)VerifiedFTACM SIGPLAN Notices10.1145/3200691.317851453:1(354-367)Online publication date: 10-Feb-2018
  • (2018)AdaptiveLock: Efficient Hybrid Data Race Detection Based on Real-World Locking PatternsInternational Journal of Parallel Programming10.1007/s10766-018-0579-547:5-6(805-837)Online publication date: 4-Jun-2018
  • (2017)Software Analysis Techniques for Detecting Data RaceIEICE Transactions on Information and Systems10.1587/transinf.2017EDR0004E100.D:11(2674-2682)Online publication date: 2017
  • (2016)SyncProf: detecting, localizing, and optimizing synchronization bottlenecksProceedings of the 25th International Symposium on Software Testing and Analysis10.1145/2931037.2931070(389-400)Online publication date: 18-Jul-2016
  • (2015)Hybrid Static–Dynamic Analysis for Statically Bounded Region SerializabilityProceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/2694344.2694379(561-575)Online publication date: 14-Mar-2015
  • (2013)RedCardProceedings of the 27th European conference on Object-Oriented Programming10.1007/978-3-642-39038-8_11(255-280)Online publication date: 1-Jul-2013
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media