Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Data races vs. data race bugs: telling the difference with portend

Published: 03 March 2012 Publication History

Abstract

Even though most data races are harmless, the harmful ones are at the heart of some of the worst concurrency bugs. Alas, spotting just the harmful data races in programs is like finding a needle in a haystack: 76%-90% of the true data races reported by state-of-the-art race detectors turn out to be harmless [45]. We present Portend, a tool that not only detects races but also automatically classifies them based on their potential consequences: Could they lead to crashes or hangs? Could their effects be visible outside the program? Are they harmless? Our proposed technique achieves high accuracy by efficiently analyzing multiple paths and multiple thread schedules in combination, and by performing symbolic comparison between program outputs.
We ran Portend on 7 real-world applications: it detected 93 true data races and correctly classified 92 of them, with no human effort. 6 of them are harmful races. Portend's classification accuracy is up to 88% higher than that of existing tools, and it produces easy-to-understand evidence of the consequences of harmful races, thus both proving their harmfulness and making debugging easier. We envision Portend being used for testing and debugging, as well as for automatically triaging bug reports.

References

[1]
S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 1996.
[2]
A. Aviram, S.-C. Weng, S. Hu, and B. Ford. Efficient system-enforced deterministic parallelism. In Symp. on Operating Sys. Design and Implem., 2010.
[3]
T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. CoreDet: a compiler and runtime system for deterministic multithreaded execution. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, 2010.
[4]
H.-J. Boehm. How to miscompile programs with "benign" data races. In USENIX Workshop on Hot Topics in Parallelism, 2011.
[5]
M. D. Bond, K. E. Coons, and K. S. McKinley. PACER: proportional detection of data races. In Conf. on Programming Language Design and Implem., 2010.
[6]
S. Bucur, V. Ureche, C. Zamfir, and G. Candea. Parallel symbolic execution for automated real-world software testing. In ACM EuroSys European Conf. on Computer Systems, 2011.
[7]
S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In Intl. Conf. on Computer Aided Verification, 2008.
[8]
J. Burnim, K. Sen, and C. Stergiou. Testing concurrent programs on relaxed memory models. In Intl. Symp. on Software Testing and Analysis, 2011.
[9]
C. Cadar, D. Dunbar, and D. R. Engler. KLEE: Unassisted and automatic generation of high-coverage tests for complex systems programs. In Symp. on Operating Sys. Design and Implem., 2008.
[10]
G. Candea, S. Bucur, V. Chipounov, V. Kuznetsov, and C. Zamfir. Automated software reliability services: Using reliability tools should be as easy as webmail. Symp. on Operating Sys. Design and Implem., 2010. Research Vision Session.
[11]
V. Chipounov and G. Candea. Enabling sophisticated analyses of x86 binaries with RevGen. In Intl. Conf. on Dependable Systems and Networks, 2011.
[12]
Chris Lattner. libc+. wofonthttp://libcxx.llvm.org/.
[13]
H. Cui, J. Wu, C. che Tsai, and J. Yang. Stable deterministic multithreading through schedule memoization. In Symp. on Operating Sys. Design and Implem., 2010.
[14]
J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: deterministic shared memory multiprocessing. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, 2009.
[15]
D. Engler and K. Ashcraft. RacerX: Effective, static detection of race conditions and deadlocks. In Symp. on Operating Systems Principles, 2003.
[16]
B. Fitzpatrick. memcached. wofonthttp://memcached.org/.
[17]
C. Flanagan and S. N. Freund. Adversarial memory for detecting destructive races. In Conf. on Programming Language Design and Implem., 2010.
[18]
P. Fonseca, C. Li, and R. Rodrigues. Finding complex concurrency bugs in large multi-threaded applications. In ACM EuroSys European Conf. on Computer Systems, 2011.
[19]
V. Ganesh and D. L. Dill. A decision procedure for bit-vectors and arrays. In Intl. Conf. on Computer Aided Verification, 2007.
[20]
J. Gilchrist. Parallel BZIP2. wofonthttp://compression.ca/pbzip2.
[21]
K. Glerum, K. Kinshumann, S. Greenberg, G. Aul, V. Orgovan, G. Nichols, D. Grant, G. Loihle, and G. Hunt. Debugging in the (very) large: ten years of implementation and experience. In Symp. on Operating Systems Principles, 2009.
[22]
P. Godefroid, M. Y. Levin, and D. Molnar. Automated whitebox fuzz testing. In Network and Distributed System Security Symp., 2008.
[23]
P. Godefroid and N. Nagappan. Concurrency at Microsoft -- An exploratory survey. In CAV Workshop on Exploiting Concurrency Efficiently and Correctly, 2008.
[24]
Helgrind. wofonthttp://valgrind.org/docs/manual/hg-manual.html.
[25]
ISO/IEC 14882:2011: Information technology -- programming languages -- C+. International Organization for Standardization, 2011.
[26]
ISO/IEC 9899:2011: Information technology -- programming languages -- C. International Organization for Standardization, 2011.
[27]
A. Jannesari and W. F. Tichy. Identifying ad-hoc synchronization for enhanced race detection. In Intl. Parallel and Distributed Processing Symp., 2010.
[28]
Y. L. Jiaqi Zhang, Weiwei Xiong, S. Park, Y. Zhou, and Z. Ma. ATDetector: Improving the accuracy of a commercial data race detector by identifying address transfer. In IEEE/ACM International Symposium on Microarchitecture, 2011.
[29]
S. B. John Erickson, Madanlal Musuvathi and K. Olynyk. Effective data-race detection for the kernel. In Symp. on Operating Sys. Design and Implem., 2010.
[30]
T. I. Konstantin Serebryany. ThreadSanitizer - data race detection in practice. In Workshop on Binary Instrumentation and Applications, 2009.
[31]
L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7), 1978.
[32]
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, 28(9):690--691, Sep 1979.
[33]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis and transformation. In Intl. Symp. on Code Generation and Optimization, 2004.
[34]
H. Ledgard. Reference Manual for the ADA Programming Language. Springer-Verlag New York, Inc., 1983.
[35]
N. G. Leveson and C. S. Turner. An investigation of the Therac-25 accidents. IEEE Computer, July 1993.
[36]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting atomicity violations via access interleaving invariants. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, 2006.
[37]
J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In Symp. on Principles of Programming Languages, 2005.
[38]
D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: effective sampling for lightweight data-race detection. In Conf. on Programming Language Design and Implem., 2009.
[39]
C. McPherson. Ctrace. wofonthttp://ctrace.sourceforge.net.
[40]
J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Supercomputing, 1991.
[41]
Memcached issue 127. wofonthttp://code.google.com/p/memcached/issues/detail?id=127.
[42]
S. L. Min and J.-D. Choi. An efficient cache-based access anomaly detection scheme. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, 1991.
[43]
M. Musuvathi, S. Burckhardt, P. Kothari, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, 2010.
[44]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing Heisenbugs in concurrent programs. In Symp. on Operating Sys. Design and Implem., 2008.
[45]
S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. Conf. on Programming Language Design and Implem., 2007.
[46]
A. Nistor, D. Marinov, and J. Torrellas. Light64: Lightweight hardware support for data race detection during systematic testing of parallel programs. In IEEE/ACM International Symposium on Microarchitecture, 2009.
[47]
R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In Symp. on Principles and Practice of Paralle Computing, 2003.
[48]
M. Prvulovic and J. Torrellas. ReEnact: using thread-level speculation mechanisms to debug data races in multithreaded codes. In Intl. Symp. on Computer Architecture, 2003.
[49]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems, 15(4), 1997.
[50]
E. Schonberg. On-the-fly detection of access anomalies (with retrospective). SIGPLAN Notices, 39(4), 2004.
[51]
K. Sen. Race directed random testing of concurrent programs. Conf. on Programming Language Design and Implem., 2008.
[52]
K. Sen, D. Marinov, and G. Agha. CUTE: a concolic unit testing engine for C. In Symp. on the Foundations of Software Eng., 2005.
[53]
SQLite. wofonthttp://www.sqlite.org/, 2010.
[54]
The Associated Press. General Electric acknowledges Northeastern blackout bug. wofonthttp://www.securityfocus.com/news/8032.
[55]
C. Tian, V. Nagarajan, R. Gupta, and S. Tallam. Dynamic recognition of synchronization operations for improved data race detection. In Intl. Symp. on Software Testing and Analysis, 2008.
[56]
N. H. Tom Bergan, Joseph Devietti and L. Ceze. The deterministic execution hammer: How well does it actually pound nails? In Workshop on Determinism and Correctness in Parallel Programming, 2011.
[57]
K. Veeraraghavan, P. M. Chen, J. Flinn, and S. Narayanasamy. Detecting and surviving data races using complementary schedules. In Symp. on Operating Systems Principles, 2011.
[58]
J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static race detection on millions of lines of code. In Symp. on the Foundations of Software Eng., 2007.
[59]
S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: characterization and methodological considerations. Intl. Symp. on Computer Architecture, 1995.
[60]
W. Xiong, S. Park, J. Zhang, Y. Zhou, and Z. Ma. Ad-hoc synchronization considered harmful. In Symp. on Operating Sys. Design and Implem., 2010.
[61]
Y. Yang, X. Chen, G. Gopalakrishnan, and R. M. Kirby. Distributed dynamic partial order reduction based verification of threaded software. In Intl. SPIN Workshop, 2007.
[62]
Y. Yu, T. Rodeheffer, and W. Chen. Racetrack: Efficient detection of data race conditions via adaptive tracking. In Symp. on Operating Systems Principles, 2005.
[63]
C. Zamfir and G. Candea. Execution synthesis: A technique for automated debugging. In ACM EuroSys European Conf. on Computer Systems, 2010.

Cited By

View all
  • (2023)Enhanced S2E for Analysis of Multi-Thread SoftwareProgramming and Computing Software10.1134/S036176882309007449:Suppl 1(S39-S44)Online publication date: 1-Dec-2023
  • (2023)When Top-down Meets Bottom-up: Detecting and Exploiting Use-After-Cleanup Bugs in Linux Kernel2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179356(2138-2154)Online publication date: May-2023
  • (2022)BiRD: Race Detection in Software Binaries under Relaxed Memory ModelsACM Transactions on Software Engineering and Methodology10.1145/349853831:4(1-29)Online publication date: 12-Jul-2022
  • Show More Cited By

Index Terms

  1. Data races vs. data race bugs: telling the difference with portend

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 4
    ASPLOS '12
    April 2012
    453 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2248487
    Issue’s Table of Contents
    • cover image ACM Conferences
      ASPLOS XVII: Proceedings of the seventeenth international conference on Architectural Support for Programming Languages and Operating Systems
      March 2012
      476 pages
      ISBN:9781450307598
      DOI:10.1145/2150976
    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: 03 March 2012
    Published in SIGPLAN Volume 47, Issue 4

    Check for updates

    Author Tags

    1. concurrency
    2. data races
    3. testing
    4. triage

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)37
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 16 Oct 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Enhanced S2E for Analysis of Multi-Thread SoftwareProgramming and Computing Software10.1134/S036176882309007449:Suppl 1(S39-S44)Online publication date: 1-Dec-2023
    • (2023)When Top-down Meets Bottom-up: Detecting and Exploiting Use-After-Cleanup Bugs in Linux Kernel2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179356(2138-2154)Online publication date: May-2023
    • (2022)BiRD: Race Detection in Software Binaries under Relaxed Memory ModelsACM Transactions on Software Engineering and Methodology10.1145/349853831:4(1-29)Online publication date: 12-Jul-2022
    • (2022)CloudRaid: Detecting Distributed Concurrency Bugs via Log Mining and EnhancementIEEE Transactions on Software Engineering10.1109/TSE.2020.299936448:2(662-677)Online publication date: 1-Feb-2022
    • (2021)Dynamic Detection of AsyncTask Related Defects2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00047(357-366)Online publication date: Dec-2021
    • (2021)On interleaving space exploration of multi-threaded programsFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-020-9501-615:4Online publication date: 1-Aug-2021
    • (2020)AGAMOTTOProceedings of the 14th USENIX Conference on Operating Systems Design and Implementation10.5555/3488766.3488825(1047-1064)Online publication date: 4-Nov-2020
    • (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
    • (2019)Understanding Node Change Bugs for Distributed Systems2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER.2019.8668027(399-410)Online publication date: Feb-2019
    • (2019)DFTrackerFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-016-6383-813:2(247-263)Online publication date: 1-Apr-2019
    • 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