skip to main content
research-article

Precise and maximal race detection from incomplete traces

Published:19 October 2016Publication History
Skip Abstract Section

Abstract

We present RDIT, a novel dynamic technique to detect data races in multithreaded programs with incomplete trace information, i.e., in the presence of missing events. RDIT is both precise and maximal: it does not report any false alarms and it detects a maximal set of true traces from the observed incomplete trace. RDIT is underpinned by a sound BarrierPair model that abstracts away the missing events by capturing the invocation data of their enclosing methods. By making the least conservative abstraction that a missing method introduces synchronization only when it has a memory address in scope that overlaps with other events or other missing methods, and by formulating maximal thread causality as logical constraints, RDIT guarantees to precisely detect races with maximal capability. RDIT has been applied in seven real-world large concurrent systems and has detected dozens of true races with zero false alarms. Comparatively, existing algorithms such as Happens-Before, Causal- Precedes, and Maximal-Causality which are known to be precise all report many false alarms when missing synchronizations.

References

  1. ASM bytecode analysis framework. http://asm.ow2.org.Google ScholarGoogle Scholar
  2. Java native interface specification. http://docs.oracle. com/javase/7/docs/technotes/guides/jni/\spec/ jniTOC.html/.Google ScholarGoogle Scholar
  3. T. J. Watson Libraries for Analysis (WALA). http://wala. sourceforge.net/.Google ScholarGoogle Scholar
  4. ThreadSanitizer Documentation. http://clang.llvm. org/docs/ThreadSanitizer.html.Google ScholarGoogle Scholar
  5. ThreadSanitizer issue #646. https://github.com/ google/sanitizers/issues/646.Google ScholarGoogle Scholar
  6. S. V. Adve and H.-J. Boehm. Memory models: a case for rethinking parallel languages and hardware. Communications of the ACM, 53(8):90–101, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. T. S. architecture manual. Version 9. SPARC International, Inc. 1994.Google ScholarGoogle Scholar
  8. P. Bielik, V. Raychev, and M. Vechev. Scalable race detection for android applications. In ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Biswas, M. Zhang, and M. D. Bond. Lightweight data race detection for production runs.Google ScholarGoogle Scholar
  10. S. Biswas, M. Zhang, M. D. Bond, and B. Lucia. Valor: Efficient, software-only region conflict exceptions. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovi´c, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H.-J. Boehm. How to miscompile programs with “benign” data races. In Proceedings of the 3rd USENIX Conference on Hot Topic in Parallelism, pages 3–3, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. H.-J. Boehm. Position paper: Nondeterminism is unavoidable, but data races are pure evil. In RACES, pages 9–14, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: proportional detection of data races. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 255–268, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In International Conference on Architectural Support for Programming Languages and Operating Systems, pages 167–178, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In International Conference on Computer Aided Verification, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Burnim, K. Sen, and C. Stergiou. Testing concurrent programs on relaxed memory models. In ACM International Symposium on Software Testing and Analysis, pages 122–132, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. H. Cui, J. Simsa, Y.-H. Lin, H. Li, B. Blum, X. Xu, J. Yang, G. A. Gibson, and R. E. Bryant. Parrot: a practical runtime for deterministic, stable, and reliable threads. In ACM Symposium on Operating Systems Principles, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. L. De Moura and N. Bjørner. Z3: an efficient SMT solver. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337–340, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Devietti, B. Lucia, L. Ceze, and M. Oskin. Dmp: deterministic shared memory multi-processing. In International Conference on Architectural Support for Programming Languages and Operating Systems, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Dimitrov, V. Raychev, M. Vechev, and E. Koskinen. Commutativity race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 305–315, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. Effinger-Dean, B. Lucia, L. Ceze, D. Grossman, and H.-J. Boehm. IFRit: Interference-free regions for dynamic datarace detection. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, pages 467–484, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: a race and transaction-aware Java runtime. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Erickson, M. Musuvathi, sebastian burckhardt, and kirk olynyk. Effective data-race detection for the kernel. In USENIX Symposium on Operating Systems Design and Implementation, pages 1–16, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Farzan, P. Madhusudan, N. Razavi, and F. Sorrentino. Predicting null-pointer dereferences in concurrent programs. In Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, pages 47:1–47:11, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121–133, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Flanagan and S. N. Freund. Adversarial memory for detecting destructive races. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 244–254, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. C. Flanagan and S. N. Freund. The roadrunner dynamic analysis framework for concurrent programs. In Proceedings of the 9th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, pages 1–8, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 110–121, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. Godefroid. Model checking for programming languages using verisoft. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 174–186, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Huang. Stateless model checking concurrent programs with maximal causality reduction. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 165–174, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Huang, Q. Luo, and G. Rosu. GPredict: Generic Predictive Concurrency Analysis. In International Conference on Software Engineering, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. Huang, P. O. Meredith, and G. Rosu. Maximal sound predictive race detection with control flow abstraction. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 337–348, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. Huang and C. Zhang. PECAN: Persuasive Prediction of Concurrency Access Anomalies. In ACM International Symposium on Software Testing and Analysis, pages 144–154, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. Huang, C. Zhang, and J. Dolby. CLAP: Recording local executions to reproduce concurrency failures. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 141–152, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. S. Huang and J. Huang. Maximal causality reduction for tso and pso. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. B. Kasikci, C. Zamfir, and G. Candea. Data Races vs. Data Race Bugs: Telling the Difference with Portend. In International Conference on Architectural Support for Programming Languages and Operating Systems, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Z. Lai, S. C. Cheung, and W. K. Chan. Detecting atomic-set serializability violations in multithreaded programs through active randomized testing. In International Conference on Software Engineering, pages 235–244, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Lam, E. Bodden, and L. Hendren. The soot framework for Java program analysis: a retrospective, 2011.Google ScholarGoogle Scholar
  40. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7):558– 565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. T. Liu, C. Curtsinger, and E. D. Berger. Dthreads: Efficient deterministic multithreading. In ACM Symposium on Operating Systems Principles, pages 327–336, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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, pages 134–143, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. N. D. Matsakis and T. R. Gross. A time-aware type system for data-race protection and guaranteed initialization. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. J. Miserez, P. Bielik, A. El-Hassany, L. Vanbever, and M. Vechev. Sdnracer: Detecting concurrency violations in software-defined networks. In Proceedings of the 1st ACM SIGCOMM Symposium on Software Defined Networking Research, pages 22:1–22:7, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In USENIX Symposium on Operating Systems Design and Implementation, pages 267–280, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. S. Nagarakatte, S. Burckhardt, M. M. Martin, and M. Musuvathi. Multicore acceleration of priority-based schedulers for concurrency bug detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 543–554, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308–319, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data racesallusing replay analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 22–31, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. R. H. B. Netzer and B. P. Miller. What are race conditions: Some issues and formalizations. LOPLAS, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. R. O’Callahan and J.-D. Choi. Hybrid dynamic data race detection. In ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. A. Rajagopalan and J. Huang. RDIT: Race detection from incomplete traces. In Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, New Ideas and Emerging Results, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. V. Raychev, M. Vechev, and M. Sridharan. Effective race detection for event-driven programs. In ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, pages 151–166, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. M. Said, C. Wang, Z. Yang, and K. Sakallah. Generating data race witnesses by an SMT-based analysis. In International Conference on NASA Formal Methods, pages 313–327, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programs. In ACM Symposium on Operating Systems Principles, pages 27–37, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. K. Sen. Race directed random testing of concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 11–21, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. K. Serebryany and T. Iskhodzhanov. Threadsanitizer: data race detection in practice. In WBIA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Y. Smaragdakis, J. Evans, C. Sadowski, J. Yi, and C. Flanagan. Sound predictive race detection in polynomial time. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 387–400, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. J. W. Voung, R. Jhala, and S. Lerner. Relay: static race detection on millions of lines of code. ESEC-Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. C. Wang, S. Kundu, M. K. Ganai, and A. Gupta. Symbolic predictive analysis for concurrent programs. In FM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. B. P. Wood, L. Ceze, and D. Grossman. Low-level detection of language-level data races with LARD. In Architectural Support for Programming Languages and Operating Systems, pages 671–686, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Y. Yu, T. Rodeheffer, and W. Chen. Racetrack: efficient detection of data race conditions via adaptive tracking. In ACM Symposium on Operating Systems Principles, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Precise and maximal race detection from incomplete traces

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 51, Issue 10
      OOPSLA '16
      October 2016
      915 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3022671
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
        October 2016
        915 pages
        ISBN:9781450344449
        DOI:10.1145/2983990

      Copyright © 2016 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 October 2016

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!