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.
- ASM bytecode analysis framework. http://asm.ow2.org.Google Scholar
- Java native interface specification. http://docs.oracle. com/javase/7/docs/technotes/guides/jni/\spec/ jniTOC.html/.Google Scholar
- T. J. Watson Libraries for Analysis (WALA). http://wala. sourceforge.net/.Google Scholar
- ThreadSanitizer Documentation. http://clang.llvm. org/docs/ThreadSanitizer.html.Google Scholar
- ThreadSanitizer issue #646. https://github.com/ google/sanitizers/issues/646.Google Scholar
- 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 Scholar
Digital Library
- T. S. architecture manual. Version 9. SPARC International, Inc. 1994.Google Scholar
- 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 Scholar
Digital Library
- S. Biswas, M. Zhang, and M. D. Bond. Lightweight data race detection for production runs.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- H.-J. Boehm. Position paper: Nondeterminism is unavoidable, but data races are pure evil. In RACES, pages 9–14, 2012. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In International Conference on Computer Aided Verification, 2008. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- P. Godefroid. Model checking for programming languages using verisoft. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 174–186, 1997. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Huang, Q. Luo, and G. Rosu. GPredict: Generic Predictive Concurrency Analysis. In International Conference on Software Engineering, 2015. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- P. Lam, E. Bodden, and L. Hendren. The soot framework for Java program analysis: a retrospective, 2011.Google Scholar
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7):558– 565, 1978. Google Scholar
Digital Library
- T. Liu, C. Curtsinger, and E. D. Berger. Dthreads: Efficient deterministic multithreading. In ACM Symposium on Operating Systems Principles, pages 327–336, 2011. Google Scholar
Digital 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, pages 134–143, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. H. B. Netzer and B. P. Miller. What are race conditions: Some issues and formalizations. LOPLAS, 1992. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- K. Sen. Race directed random testing of concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 11–21, 2008. Google Scholar
Digital Library
- K. Serebryany and T. Iskhodzhanov. Threadsanitizer: data race detection in practice. In WBIA, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- C. Wang, S. Kundu, M. K. Ganai, and A. Gupta. Symbolic predictive analysis for concurrent programs. In FM, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital 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, 2005. Google Scholar
Digital Library
Index Terms
Precise and maximal race detection from incomplete traces
Recommendations
Precise and maximal race detection from incomplete traces
OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsWe 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 ...
RDIT: race detection from incomplete traces
ESEC/FSE 2015: Proceedings of the 2015 10th Joint Meeting on Foundations of Software EngineeringWe present RDIT, a novel dynamic algorithm to precisely detect data races in multi-threaded programs with incomplete trace information -- the presence of missing events. RDIT enhances the classical Happens-Before algorithm by relaxing the need to ...
Maximal sound predictive race detection with control flow abstraction
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and ImplementationDespite the numerous static and dynamic program analysis techniques in the literature, data races remain one of the most common bugs in modern concurrent software. Further, the techniques that do exist either have limited detection capability or are ...







Comments