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
  • (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)DFix: automatically fixing timing bugs in distributed systemsProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314620(994-1009)Online publication date: 8-Jun-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

Index Terms

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

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGARCH Computer Architecture News
    ACM SIGARCH Computer Architecture News  Volume 40, Issue 1
    ASPLOS '12
    March 2012
    453 pages
    ISSN:0163-5964
    DOI:10.1145/2189750
    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 SIGARCH Volume 40, Issue 1

    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)39
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 15 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (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)DFix: automatically fixing timing bugs in distributed systemsProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314620(994-1009)Online publication date: 8-Jun-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
    • (2018)Managing concurrent testing of data race with ComRaDeProceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3213846.3229502(364-367)Online publication date: 12-Jul-2018
    • (2017)An automated framework to support testing for process‐level race conditionsSoftware Testing, Verification and Reliability10.1002/stvr.163427:4-5Online publication date: 10-May-2017
    • (2016)Prescient memory: exposing weak memory model behavior by looking into the futureACM SIGPLAN Notices10.1145/3241624.292670051:11(99-110)Online publication date: 14-Jun-2016
    • (2016)Prescient memory: exposing weak memory model behavior by looking into the futureProceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management10.1145/2926697.2926700(99-110)Online publication date: 14-Jun-2016
    • (2016)Hardware Support for Concurrent Detection of Multiple Concurrency Bugs on Fused CPU-GPU ArchitecturesIEEE Transactions on Computers10.1109/TC.2015.251286065:10(3083-3095)Online publication date: 1-Oct-2016
    • (2014)Automatic detection of concurrency bugs through event ordering constraintsProceedings of the conference on Design, Automation & Test in Europe10.5555/2616606.2617019(1-6)Online publication date: 24-Mar-2014
    • (2014)GuardrailACM SIGARCH Computer Architecture News10.1145/2654822.254197042:1(655-670)Online publication date: 24-Feb-2014
    • 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