skip to main content
article

RaceTrack: efficient detection of data race conditions via adaptive tracking

Published:20 October 2005Publication History
Skip Abstract Section

Abstract

Bugs due to data races in multithreaded programs often exhibit non-deterministic symptoms and are notoriously difficult to find. This paper describes RaceTrack, a dynamic race detection tool that tracks the actions of a program and reports a warning whenever a suspicious pattern of activity has been observed. RaceTrack uses a novel hybrid detection algorithm and employs an adaptive approach that automatically directs more effort to areas that are more suspicious, thus providing more accurate warnings for much less over-head. A post-processing step correlates warnings and ranks code segments based on how strongly they are implicated in potential data races. We implemented RaceTrack inside the virtual machine of Microsoft's Common Language Runtime (product version v1.1.4322) and monitored several major, real-world applications directly out-of-the-box,without any modification. Adaptive tracking resulted in a slowdown ratio of about 3x on memory-intensive programs and typically much less than 2x on other programs,and a memory ratio of typically less than 1.2x. Several serious data race bugs were revealed, some previously unknown.

References

  1. S. V. Adve, M. D. Hill, B. P. Miller, and R. H. B. Netzer. Detecting data races on weak memory systems. In Proceedings of the 18th Annual International Symposium on Computer Architecture (ISCA), pages 234--243, May 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Boyapati and M. Rinard. A parameterized type system for race-free Java programs. In Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications (OOPSLA), Oct. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Broder, S. Glassman, M. Manasse, and G. Zweig. Syntactic clustering of the web. In Proceedings of the 6th International World Wide Web Conference, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise data race detection for object oriented programs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 285--297, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J.-D. Choi, B. P. Miller, and R. H. B. Netzer. Techniques for debugging parallel programs with flowback analysis. ACM Transactions on Programming Languages and Systems, 13(4):491--530, October 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Christiaens and K. De Bosschere. TRaDe, a topological approach to on-the-fly race detection in Java programs. In Proceedings of the Java Virtual Machine Research and Technology Symposium (JVM), Apr. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Dinning and E. Schonberg. An empirical comparison of monitoring algorithms for access anomaly detection. In Proceedings of the 2nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 1--10, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Dinning and E. Schonberg. Detecting access anomalies in programs with critical sections. In PADD '91: Proceedings of the 1991 ACM/ONR workshop on Parallel and distributed debugging, pages 85--96, New York, NY, USA, 1991. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ecma International. Standard ECMA-335: Common language infrastructure (CLI), 2002. http://www.ecma-international.org/publications/standards/Ecma335.htm.Google ScholarGoogle Scholar
  10. D. Engler and K. Ashcraft. RacerX: Effective, static detection of race conditions and deadlocks. In Proceedings of the 19th ACM Symposium on Operating Systems Principles (SOSP), pages 237--252, October 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. N. Freund. Type-based race detection for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 219--232, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Gough and K. Gough. Compiling for the .NET Common Language Runtime. Prentice Hall PTR, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. J. Harrow. Runtime checking of multithreaded applications with visual threads. In Proceedings of the 7th International SPIN Workshop on SPIN Model Checking and Software Verification, pages 331--342, London, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Henzinger, R. Jhala, and R. Majumder. Race checking by context inference. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7):558--565, July 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. MacCormick, N. Murphy, M. Najork, C. A. Thekkath, and L. Zhou. Boxwood: Abstractions as the foundation for storage infrastructure. In Proceedings of the 6th Symposium on Operating Systems Design and Implementation (OSDI), pages 105--120, Dec. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. F. Mattern. Virtual time and global states of distributed systems. In C. M. et al., editor, Proc. Workshop on Parallel and Distributed Algorithms, pages 215--226, North-Holland / Elsevier, 1989.Google ScholarGoogle Scholar
  18. J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Proceedings of Supercomputing, November 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Microsoft Corporation. Basic class library communities. http://msdn.microsoft.com/netframework/programming/classlibraries/.Google ScholarGoogle Scholar
  20. Microsoft Corporation. Shared source common language infrastructure 1.0 release, Nov. 2002. http://msdn.microsoft.com/net/sscli.Google ScholarGoogle Scholar
  21. H. Nishiyama. Detecting data races using dynamic escape analysis based on read barrier. In Proceedings of the 3rd Virtual Machine Research and Technology Symposium (VM), May 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 167--178, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Perković and P. J. Keleher. Online data-race detection via coherency guarantees. In The Second Symposium on Operating Systems Design and Implementation (OSDI), pages 47--57, Oct. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. E. Pozniansky and A. Schuster. Efficient on-the-fly race detection in multithreaded C++ programs. In Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Praun and T. Gross. Object race detection. In Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications (OOPSLA), pages 70--82, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. O. Rabin. Fingerprinting by random polynomials. Report TR--15--81, Department of Computer Science, Harvard University, 1981.Google ScholarGoogle Scholar
  27. M. Ronsse and K. De Bosschere. RecPlay: A fully integrated practical record/replay system. ACM Transactions on Computer Systems, 17(2):133--152, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multi-threaded programs. ACM Transactions on Computer Systems, 15(4):391--411, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. D. C. Schmidt and T. Harrison. Double-checked locking: An optimization pattern for efficiently initializing and accessing thread-safe objects. In M. Buschmann and D. Riehle, editors, Pattern Languages of Program Design 3. Addison-Wesley, Reading, MA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. E. Schonberg. On-the-fly detection of access anomalies. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 285--297, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Standard Performance Evaluation Corporation. SPEC JBB2000. http://www.spec.org/jbb2000/.Google ScholarGoogle Scholar
  32. N. Sterling. Warlock: A static data race analysis tool. In Proceedings of USENIX Winter Technical Conference, January 1993.Google ScholarGoogle Scholar
  33. Valgrind project. Helgrind: a data-race detector, 2005. http://valgrind.org/docs/manual/hg-manual.html.Google ScholarGoogle Scholar

Index Terms

  1. RaceTrack: efficient detection of data race conditions via adaptive tracking

      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 SIGOPS Operating Systems Review
        ACM SIGOPS Operating Systems Review  Volume 39, Issue 5
        SOSP '05
        December 2005
        290 pages
        ISSN:0163-5980
        DOI:10.1145/1095809
        Issue’s Table of Contents
        • cover image ACM Conferences
          SOSP '05: Proceedings of the twentieth ACM symposium on Operating systems principles
          October 2005
          259 pages
          ISBN:1595930795
          DOI:10.1145/1095810

        Copyright © 2005 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 20 October 2005

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader