skip to main content
10.1145/1806596.1806626acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

PACER: proportional detection of data races

Published:05 June 2010Publication History

ABSTRACT

Data races indicate serious concurrency bugs such as order, atomicity, and sequential consistency violations. Races are difficult to find and fix, often manifesting only after deployment. The frequency and unpredictability of these bugs will only increase as software adds parallelism to exploit multicore hardware. Unfortunately, sound and precise race detectors slow programs by factors of eight or more and do not scale to large numbers of threads.

This paper presents a precise, low-overhead sampling-based data race detector called Pacer. PACER makes a proportionality guarantee: it detects any race at a rate equal to the sampling rate, by finding races whose first access occurs during a global sampling period. During sampling, PACER tracks all accesses using the dynamically sound and precise FastTrack algorithm. In nonsampling periods, Pacer discards sampled access information that cannot be part of a reported race, and Pacer simplifies tracking of the happens-before relationship, yielding near-constant, instead of linear, overheads. Experimental results confirm our theoretical guarantees. PACER reports races in proportion to the sampling rate. Its time and space overheads scale with the sampling rate, and sampling rates of 1-3% yield overheads low enough to consider in production software. The resulting system provides a "get what you pay for" approach that is suitable for identifying real, hard-to-reproduce races in deployed systems.

References

  1. 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
  2. M. Abadi, T. Harris, and M. Mehrara. Transactional Memory with Strong Atomicity Using Off-the-Shelf Memory Protection Hardware. In ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 185--196, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Alpern, C. R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J. J. Barton, S. F. Hummel, J. C. Sheperd, and M. Mergen. Implementing Jalapeño in Java. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 314--324, Denver, CO, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Arnold, M. Vechev, and E. Yahav. QVM: An Efficient Runtime for Detecting Defects in Deployed Systems. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 143--162, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. F. Bacon, R. Konuru, C. Murthy, and M. Serrano. Thin Locks: Featherweight Synchronization for Java. In ACM Conference on Programming Language Design and Implementation, pages 258--268, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, 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ć, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 169--190, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. M. Blackburn and K. S. McKinley. Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance. In ACM Conference on Programming Language Design and Implementation, pages 22--32, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional Detection of Data Races. Extended technical report.Google ScholarGoogle Scholar
  9. C. Boyapati, R. Lee, and M. Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 211--230, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. T. M. Chilimbi and M. Hauswirth. Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 156--164, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and Precise Datarace Detection for Multithreaded Object-Oriented Programs. In ACM Conference on Programming Language Design and Implementation, pages 258--269, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Christiaens and K. D. Bosschere. Accordion Clocks: Logical Clocks for Data Race Detection. In International European Conference on Parallel Processing, pages 494--503, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A Race and Transaction-Aware Java Runtime. In ACM Conference on Programming Language Design and Implementation, pages 245--255, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation, pages 121--133, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan and S. N. Freund. Adversarial Memory For Detecting Destructive Races. In ACM Conference on Programming Language Design and Implementation, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Gray. Why Do Computers Stop and What Can Be Done About It? In Symposium on Reliability in Distributed Software and Database Systems, pages 3--12, 1986.Google ScholarGoogle Scholar
  17. T. Harris, S. Tomic, A. Cristal, and O. Unsal. Dynamic Filtering: Multi-Purpose Architecture Support for Language Runtime Systems. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 39--52, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. A. Henzinger, R. Jhala, and R. Majumdar. Race Checking by Context Inference. In ACM Conference on Programming Language Design and Implementation, pages 1--13, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Hirzel and T. Chilimbi. Bursty Tracing: A Framework for Low-Overhead Temporal Profiling. In ACM Workshop on Feedback-Directed and Dynamic Optimization, pages 117--126, 2001.Google ScholarGoogle Scholar
  20. M. Jump, S. M. Blackburn, and K. S. McKinley. Dynamic Object Sampling for Pretenuring. In ACM International Symposium on Memory Management, pages 152--162, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed system. Communications of the ACM, 21(7):558--565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Liblit, M. Naik, A. X. Zheng, A. Aiken, and M. I. Jordan. Scalable Statistical Bug Isolation. In ACM Conference on Programming Language Design and Implementation, pages 15--26, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. B. R. Liblit. Cooperative Bug Isolation. PhD thesis, University of California at Berkeley, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 329--339, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting Atomicity Violations via Access-Interleaving Invariants. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 37--48, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In ACM Symposium on Principles of Programming Languages, pages 378--391, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: Effective Sampling for Lightweight Data-Race Detection. In ACM Conference on Programming Language Design and Implementation, pages 134--143, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Mattern. Virtual Time and Global States of Distributed Systems. In Workshop on Parallel and Distributed Algorithms, pages 215--226, 1988.Google ScholarGoogle Scholar
  29. M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In ACM Conference on Programming Language Design and Implementation, pages 308--319, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically Classifying Benign and Harmful Data Races Using Replay Analysis. In ACM Conference on Programming Language Design and Implementation, pages 22--31, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Parker, G. Popek, G. Rudisin, A. Stoughton, B. Walker, E. Walton, J. Chow, D. Edwards, S. Kiser, and C. Kline. Detection of Mutual Inconsistency in Distributed Systems. IEEE Transactions on Software Engineering, 9(3):240--247, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. E. Pozniansky and A. Schuster. MultiRace: Efficient On-the-Fly Data Race Detection in Multithreaded C++ Programs. Concurrency and Computation: Practice & Experience, 19(3):327--340, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. P. Pratikakis, J. S. Foster, and M. Hicks. LOCKSMITH: Context-Sensitive Correlation Analysis for Race Detection. In ACM Conference on Programming Language Design and Implementation, pages 320--331, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multi-Threaded Programs. In ACM Symposium on Operating Systems Principles, pages 27--37, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.Google ScholarGoogle Scholar
  36. A. Thakur, R. Sen, B. Liblit, and S. Lu. Cooperative Crug Isolation. In International Workshop on Dynamic Analysis, pages 35--41, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. C. von Praun and T. R. Gross. Object Race Detection. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 70--82, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In European Software Engineering Conference and the ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 205--214, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In ACM Symposium on Operating Systems Principles, pages 221--234, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. PACER: proportional detection of data races

      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
      • Published in

        cover image ACM Conferences
        PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2010
        514 pages
        ISBN:9781450300193
        DOI:10.1145/1806596
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 45, Issue 6
          PLDI '10
          June 2010
          496 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1809028
          Issue’s Table of Contents

        Copyright © 2010 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 5 June 2010

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

      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!