skip to main content
research-article

Race directed scheduling of concurrent programs

Authors Info & Claims
Published:06 February 2014Publication History
Skip Abstract Section

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.

References

  1. https://code.google.com/p/jchord/issues/attachmentText?id=53&aid=530000001&name=SOR.java&token=aYxeQMsIH8M6_VpOVEgmST9XHnw%3A1385586794467.Google ScholarGoogle Scholar
  2. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/ArrayList.java.Google ScholarGoogle Scholar
  3. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/TreeSet.java.Google ScholarGoogle Scholar
  4. http://web.engr.illinois.edu/~sorrent1/penelope/experiments.html.Google ScholarGoogle Scholar
  5. http://www2.epcc.ed.ac.uk/computing/research_activities/jomp/grande.html.Google ScholarGoogle Scholar
  6. http://db.apache.org/derby/derby_downloads.html.Google ScholarGoogle Scholar
  7. https://code.google.com/p/jchord/downloads/detail?name=chord-src-2.1.tar.gz.Google ScholarGoogle Scholar
  8. http://sourceforge.net/projects/dacapobench/files.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. European~Organization for Nuclear Research~(CERN). Colt. http://acs.lbl.gov/software/colt/.Google ScholarGoogle Scholar
  25. Apache~Software Foundation. Derby. http://db.apache.org/derby.Google ScholarGoogle Scholar
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. Klaus Havelund and Thomas Pressburger. Model checking Java programs using Java pathfinder. Software Tools for Technology Transfer, 2(4):366--381, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput., C--28,9:690--691, September 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. Oracle. JDK, 1.4.2. http://www.oracle.com/technetwork/java/javase/index-jsp-138567.html.Google ScholarGoogle Scholar
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  45. Koushik Sen. Concolic testing. In Proceedings of the twenty-second IEEE/ACM International Conference on Automated Software Engineering, pages 571--572, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Koushik Sen. Effective random testing of concurrent programs. In IEEE/ACM International Conference on Automated Software Engineering, pages 323--332, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  50. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  51. L. A. Smith, J. M. Bull, and J. Obdrzalek. A parallel Java grande benchmark suite. November 2001.Google ScholarGoogle Scholar
  52. N. Sterling. WARLOCK -- a static data race analysis tool. In USENIX Winter Technical Conference, pages 97--106, 1993.Google ScholarGoogle Scholar
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  55. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  56. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Race directed scheduling of concurrent programs

    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 49, Issue 8
      PPoPP '14
      August 2014
      390 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2692916
      Issue’s Table of Contents
      • cover image ACM Conferences
        PPoPP '14: Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming
        February 2014
        412 pages
        ISBN:9781450326568
        DOI:10.1145/2555243

      Copyright © 2014 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 6 February 2014

      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!