AtomRace: data race and atomicity violation detector and healer
https://doi.org/10.1145/1390841.1390848Abstract
The paper proposes a novel algorithm called AtomRace for a dynamic detection of data races. Data races are detected as a special case of atomicity violations on atomic sections specially dened to span just particular read/write instructions and the transfer of control to and from them. A key ingredient allowing AtomRace to eciently detect races on such short atomic sections is a use of techniques for a careful injection of noise into the scheduling of the monitored programs. The approach is very simple, fully automated, avoids false alarms, and allows for a lower overhead and better scalability than many other existing dynamic data race detection algorithms. We illustrate these facts by a set of experiments with a prototype implementation of Atom-Race. Moreover, we also show that AtomRace can be easily extended to not only detect races, but also to automatically heal them. Further, AtomRace can also be applied to detect atomicity violations on more general atomic sections than those used for the data race detection. They can be dened by the user or obtained by some static analysis.
References (33)
- REFERENCES
- C. Artho, K. Havelund, and A. Biere. High-level data races, 2003.
- N. Ayewah, W. Pugh, J. D. Morgenthaler, J. Penix, and Y. Zhou. Using ndbugs on production software. In OOPSLA '07: Companion to the 22nd ACM SIGPLAN conference on Object oriented programming systems and applications companion, pages 805806, New York, NY, USA, 2007. ACM.
- J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Ecient and precise datarace detection for multithreaded object-oriented programs. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pages 258269, New York, NY, USA, 2002. ACM Press.
- O. Edelstein, E. Farchi, E. Goldin, Y. Nir, G. Ratsaby, and S. Ur. Framework for testing multi-threaded java programs. Concurrency and Computation: Practice and Experience, 15(3-5):485499, 2003.
- T. Elmas, S. Qadeer, and S. Tasiran. Precise data-race detection and ecient model checking using locksets. Technical Report MSR-TR-2005-118, Microsoft Research, March 2006.
- T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: a race and transaction-aware java runtime. In PLDI '07: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, pages 245255, New York, NY, USA, 2007. ACM Press.
- D. Engler and K. Ashcraft. Racerx: eective, static detection of race conditions and deadlocks. SIGOPS Oper. Syst. Rev., 37(5):237252, 2003.
- C. Flanagan and S. N. Freund. Type-based race detection for java. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 219232, New York, NY, USA, 2000. ACM Press.
- C. Flanagan and S. N. Freund. Atomizer: a dynamic atomicity checker for multithreaded programs. SIGPLAN Not., 39(1):256267, 2004.
- T. Henzinger, R. Jhala, R. Majumdar, and S. Qadeer. Thread-modular abstraction renement. In Proceedings of the 15th International Conference on Computer-Aided Verication (CAV), pages 262274. Lecture Notes in Computer Science 2725, Springer-Verlag, January 2003.
- D. H. Hovemeyer. Simple and eective static analysis to nd bugs. PhD thesis, College Park, MD, USA, 2005. Director-William W. Pugh.
- V. Kahlon, Y. Yang, S. Sankaranarayanan, and A. Gupta. Fast and accurate static data-race detection for concurrent programs. In CAV, pages 226239, 2007.
- B. K°ena, Z. Letko, R. Tzoref, S. Ur, and T. Vojnar. Healing data races on-the-y. In PADTAD '07: Proceedings of the 2007 ACM workshop on Parallel and distributed systems: testing and debugging, pages 5464, New York, NY, USA, 2007. ACM.
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558565, 1978.
- Z. Letko. Dynamic data race detection and self-healing in java programs. Master's thesis, Faculty of Information Technology, Brno University of Technology, 2008. to appear in.
- S. Lu, J. Tucek, F. Qin, and Y. Zhou. Avio: detecting atomicity violations via access interleaving invariants. In ASPLOS-XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, pages 3748, New York, NY, USA, 2006. ACM Press.
- F. Mattern. Virtual time and global states of distributed systems. In Parallel and Distributed Algorithms: proceedings of the International Workshop on Parallel and Distributed Algorithms. 1988.
- R. Nagpaly, K. Pattabiramanz, D. Kirovski, and B. Zorn. Position paper -tolerace: Tolerating and detecting races. In STMCS: Second Workshop on Software Tools for Multi-Core Systems (STMCS), 2007.
- M. Naik, A. Aiken, and J. Whaley. Eective static race detection for java. SIGPLAN Not., 41(6):308319, 2006.
- Y. Nir-Buchbinder and S. Ur. Contest listeners: a concurrency-oriented infrastructure for java test and heal tools. In SOQUA '07: Fourth international workshop on Software quality assurance, pages 916, New York, NY, USA, 2007. ACM.
- R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In PPoPP '03: Proceedings of the ninth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 167178, New York, NY, USA, 2003. ACM Press.
- T. Peierls, B. Goetz, J. Bloch, J. Bowbeer, D. Lea, and D. Holmes. Java Concurrency in Practice. Addison-Wesley Professional, 2005.
- P. Pratikakis, J. S. Foster, and M. Hicks. Locksmith: context-sensitive correlation analysis for race detection. SIGPLAN Not., 41(6):320331, 2006.
- A. Sasturkar, R. Agarwal, L. Wang, and S. D. Stoller. Automated type-based analysis of data races and atomicity. In PPoPP '05: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 8394, New York, NY, USA, 2005. ACM.
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multi-threaded programs. In SOSP '97: Proceedings of the sixteenth ACM symposium on Operating systems principles, pages 2737, New York, NY, USA, 1997. ACM Press.
- R. Tzoref, S. Ur, and Y. Nir. Deadlocks: from exhibiting to healing. In 8th International Workshop on Runtime Verication, (satellite event of ETAPS'08), 2008.
- R. Tzoref, S. Ur, and E. Yom-Tov. Instrumenting where it hurts: an automatic concurrent debugging technique. In ISSTA '07: Proceedings of the 2007 international symposium on Software testing and analysis, pages 2738, New York, NY, USA, 2007. ACM.
- M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 334345, New York, NY, USA, 2006. ACM Press.
- C. von Praun and T. Gross. Static detection of atomicity violations in object-oriented programs, 2003.
- C. von Praun and T. R. Gross. Object race detection. In OOPSLA '01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 7082, New York, NY, USA, 2001. ACM Press.
- M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. SIGPLAN Not., 40(6):114, 2005.
- Y. Yu, T. Rodeheer, and W. Chen. Racetrack: ecient detection of data race conditions via adaptive tracking. SIGOPS Oper. Syst. Rev., 39(5):221234, 2005.