Abstract
Detection of data races in Java programs remains a difficult problem. The best static techniques produce many false positives, and also the best dynamic techniques leave room for improvement. We present a new technique called race directed scheduling that for a given race candidate searches for an input and a schedule that lead to the race. The search iterates a combination of concolic execution and schedule improvement, and turns out to find useful inputs and schedules efficiently. We use an existing technique to produce a manageable number of race candidates. Our experiments on 23 Java programs found 72 real races that were missed by the best existing dynamic techniques. Among those 72 races, 31 races were found with schedules that have between 1 million and 108 million events, which suggests that they are rare and hard-to-find races.
- https://code.google.com/p/jchord/issues/attachmentText?id=53&aid=530000001&name=SOR.java&token=aYxeQMsIH8M6_VpOVEgmST9XHnw%3A1385586794467.Google Scholar
- http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/ArrayList.java.Google Scholar
- http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/TreeSet.java.Google Scholar
- http://web.engr.illinois.edu/~sorrent1/penelope/experiments.html.Google Scholar
- http://www2.epcc.ed.ac.uk/computing/research_activities/jomp/grande.html.Google Scholar
- http://db.apache.org/derby/derby_downloads.html.Google Scholar
- https://code.google.com/p/jchord/downloads/detail?name=chord-src-2.1.tar.gz.Google Scholar
- http://sourceforge.net/projects/dacapobench/files.Google Scholar
- M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems, 28(2):207--255, 2006. Google Scholar
Digital Library
- Sarita~V. Adve, Mark~D. Hill, Barton~P. Miller, and Robert H. B. Netzer. Detecting data races on weak memory systems. In Proceedings of ISCA, International Symposium on Computer Architecture, pages 234--243, 1991. Google Scholar
Digital Library
- M. Arnold, M. Vechev, and E. Yahav. Qvm: An efficient runtime for detecting defects in deployed systems. In OOPSLA, ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 143--162, 2008. Google Scholar
Digital Library
- Stephen~M. Blackburn, Robin Garner, Chris Hoffmann, Asjad~M. Khang, Kathryn~S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel~Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han~Lee Intel, J. Eliot~B. Moss, Aashish Phansalkar, Darko Stefanovic, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA'06, 21st annual ACM SIGPLAN conference on Object-Oriented Programming Systems, Languages, and Applications, pages 169--190, 2006. Google Scholar
Digital Library
- Eric Bodden, Andreas Sewe, Jan Sinschek, Hela Oueslati, and Mira Mezini. Taming reflection: Aiding static analysis in the presence of reflection and custom class loaders. In ICSE, 33rd International Conference on Software Engineering, May 2011. Google Scholar
Digital Library
- Michael~D. Bond, Katherine~E. Coons, and Kathryn~S. McKinley. Pacer: Proportional detection of data races. In Proceedings of PLDI'10, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121--133, 2010. Google Scholar
Digital Library
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In OOPSLA, ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 211--230, 2002. Google Scholar
Digital Library
- Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. A randomized scheduler with probabilistic guarantees of finding concurrency bugs. In ASPLOS, International Conference on Architectural Support for Programming Languages and Operating Systems, March 2010. Google Scholar
Digital Library
- J. Burnim and K. Sen. Heuristics for scalable dynamic test generation. In Proc. 23rd IEEE/ACM International Conference on Automated Software Engineering, pages 443--446, 2008. Google Scholar
Digital Library
- Cristian Cadar, Paul Twohey, Vijay Ganesh, and Dawson Engler. Exe: A system for automatically generating inputs of death using symbolic execution. In Proceedings of 13th ACM Conference on Computer and Communications Security, 2006. Google Scholar
Digital Library
- Peter Collingbourne, Alastair~F. Donaldson, Jeroen Ketema, and Shaz Qadeer. Interleaving and lock-step semantics for analysis and verification of gpu kernels. In Proceedings of ESOP, European Symposium on Programming, pages 270--289. Springer-Verlag (LNCS), 2013. Google Scholar
Digital Library
- Laura Effinger-Dean, Hans-J. Boehm, Dhruva Chakrabarti, and Pramod Joisha. Extended sequential reasoning for data-race-free programs. In ACM SIGPLAN Workshop on Memory Systems Performance and Correctness, June 2011. Google Scholar
Digital Library
- Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. Goldilocks: Efficiently computing the happens-before relation using locksets. In Proceedings of FATES/RV, Workshop on Formal Approaches to Testing and Runtime Verification, pages 193--208, 2006. Google Scholar
Digital Library
- D. Engler and K. Ashcraft. RacerX: Effective, static detection of race conditions and deadlocks. In SOSP, Nineteenth ACM Symposium on Operating Systems Principles, pages 237--252, 2003. Google Scholar
Digital Library
- Cormac Flanagan and Stephen~N. Freund. Fasttrack: Efficient and precise dynamic race detection. In Proceedings of PLDI'09, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121--133, 2009. Google Scholar
Digital Library
- European~Organization for Nuclear Research~(CERN). Colt. http://acs.lbl.gov/software/colt/.Google Scholar
- Apache~Software Foundation. Derby. http://db.apache.org/derby.Google Scholar
- S. N. Freund. Type-based race detection for Java. In PLDI, ACM SIGPLAN 2000 Conference on Programming language design and implementation, pages 219--232, 2000. Google Scholar
Digital Library
- Patrice Godefroid, Nils Klarlund, and Koushik Sen. Dart: directed automated random testing. In Proceedings of PLDI'05, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 213--223, 2005. Google Scholar
Digital Library
- Klaus Havelund and Thomas Pressburger. Model checking Java programs using Java pathfinder. Software Tools for Technology Transfer, 2(4):366--381, 2000.Google Scholar
Cross Ref
- Thomas~A. Henzinger, Ranjit Jhala, and Rupak Majumdar. Race checking by context inference. In Proceedings of PLDI'04, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--13, 2004. Google Scholar
Digital Library
- M. Jump, S. M. Blackburn, and K. S. McKinley. Dynamic object sampling for pretenuring. In ICMM, ACM International Symposium on Memory Management, pages 152--162, 2004. Google Scholar
Digital Library
- Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput., C--28,9:690--691, September 1979. Google Scholar
Digital Library
- Rupak Majumdar and Ru-Gang Xu. Directed test generation using symbolic grammars. In Proceedings of the twenty-second IEEE/ACM International Conference on Automated Software Engineering, 2007. Google Scholar
Digital Library
- Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. Literace: Effective sampling for lightweight data-race detection. In Proceedings of PLDI'09, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 134--143, 2009. Google Scholar
Digital Library
- Mayur Naik, Alex Aiken, and John Whaley. Effective static race detection for Java. In Proceedings of PLDI'06, ACM SIGPLAN Conference on Programming Language Design and Implementation, 2006. Google Scholar
Digital Library
- Robert O'Callahan and Jong-Deok Choi. Hybrid dynamic data race detection. In Proceedings of the ACM Conference on Principles and Practice of Parallel Programming, pages 167--178, 2003. Google Scholar
Digital Library
- Oracle. JDK, 1.4.2. http://www.oracle.com/technetwork/java/javase/index-jsp-138567.html.Google Scholar
- Chang-Seo Park, Koushik Sen, Paul Hargrove, and Costin Iancu. Efficient data race detection for distributed memory parallel programs. In Proceedings of IEEE Conference on Supercomputing, 2011. Google Scholar
Digital Library
- E. Pozniansky and A. Schuster. MultiRace: Efficient on-the-fly data race detection in multithreaded C+ programs. Concurrency and Computation: Practice and Experience, 19(3):327--340, 2007. Google Scholar
Digital Library
- Polyvios Pratikakis, Jeffrey~S. Foster, and Michael Hicks. LockSmith: Context sensitive correlation analysis for race detection. In PLDI, ACM Conference on Programming Language Design and Implementation, pages 320--331, 2006. Google Scholar
Digital Library
- P. Sack, B. E. Bliss, Z. Ma, P. Petersen, and J. Torrellas. Accurate and efficient filtering for the Intel thread checker race detector. In ASID, 1st workshop on Architectural and System Support for Improving Software Dependability, pages 34--41, 2006. Google Scholar
Digital Library
- Mahmoud Said, Chao Wang, Zijiang Yang, and Karem~A. Sakallah. Generating data race witnesses by an SMT-based analysis. In NASA Formal Methods, pages 313--327, 2011. Google Scholar
Digital Library
- Raimondas Sasnauskas, Oscar~Soria Dustmann, Benjamin~Lucien Kaminski, Klaus Wehrle, Carsten Weise, and Stefan Kowalewski. Scalable symbolic execution of distributed systems. In Proceedings of ICDCS, International Conference on Distributed Computing Systems, pages 333--342, 2011. Google Scholar
Digital Library
- A. Sasturkar, R. Agarwal, L. Wang, and S. D. Stoller. Automated type-based analysis of data races and atomicity. In PPoPP, Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 83--94, 2005. Google Scholar
Digital Library
- Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. Eraser: A dynamic data race detector for multithreaded programs. Transactions on Computer Systems, 15(4):391--411, November 1997. Google Scholar
Digital Library
- Koushik Sen. Concolic testing. In Proceedings of the twenty-second IEEE/ACM International Conference on Automated Software Engineering, pages 571--572, 2007. Google Scholar
Digital Library
- Koushik Sen. Effective random testing of concurrent programs. In IEEE/ACM International Conference on Automated Software Engineering, pages 323--332, 2007. Google Scholar
Digital Library
- Koushik Sen. Race directed random testing of concurrent programs. In Proceedings of PLDI'08, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 11--21, Tucson, Arizona, June 2008. Google Scholar
Digital Library
- Koushik Sen and Gul Agha. Cute and jcute: Concolic unit testing and explicit path model-checking tools. In Proc. 18th International Conference on Computer Aided Verification, pages 419--423, 2006. Google Scholar
Digital Library
- Koushik Sen and Gul Agha. A race-detection and flipping algorithm for automated testing of multi-threaded programs. In Proceedings of Haifa Verification Conference, pages 166--182, 2006. Google Scholar
Digital Library
- Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. Sound predictive race detection in polynomial time. In Proceedings of POPL'12, SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 387--400, 2012. Google Scholar
Digital Library
- L. A. Smith, J. M. Bull, and J. Obdrzalek. A parallel Java grande benchmark suite. November 2001.Google Scholar
- N. Sterling. WARLOCK -- a static data race analysis tool. In USENIX Winter Technical Conference, pages 97--106, 1993.Google Scholar
- Raja Vallé-Rai, Etienne Gagnon, Laurie Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. Optimizing Java bytecode using the soot framework: Is it feasible? In Proceedings of CC'00, International Conference on Compiler Construction. Springer-Verlag (LNCS), 2000. Google Scholar
Digital Library
- C. von Praun and T. R. Gross. Object race detection. In OOPSLA, ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 70--82, 2001. Google Scholar
Digital Library
- J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static race detection on millions of lines of code. In European Software Engineering Conference and ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 205--214, 2007. Google Scholar
Digital Library
- Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient detection of data race conditions via adaptive tracking. In SOSP, ACM Symposium on Operating Systems Principles, pages 221--234, 2005. Google Scholar
Digital Library
Index Terms
Race directed scheduling of concurrent programs
Recommendations
Race directed scheduling of concurrent programs
PPoPP '14: Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programmingDetection of data races in Java programs remains a difficult problem. The best static techniques produce many false positives, and also the best dynamic techniques leave room for improvement. We present a new technique called race directed scheduling ...
Race directed random testing of concurrent programs
PLDI '08Bugs in multi-threaded programs often arise due to data races. Numerous static and dynamic program analysis techniques have been proposed to detect data races. We propose a novel randomized dynamic analysis technique that utilizes potential data race ...
Race directed random testing of concurrent programs
PLDI '08: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and ImplementationBugs in multi-threaded programs often arise due to data races. Numerous static and dynamic program analysis techniques have been proposed to detect data races. We propose a novel randomized dynamic analysis technique that utilizes potential data race ...







Comments