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.
- 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
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional Detection of Data Races. Extended technical report.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- C. Flanagan and S. N. Freund. Adversarial Memory For Detecting Destructive Races. In ACM Conference on Programming Language Design and Implementation, 2010. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed system. Communications of the ACM, 21(7):558--565, 1978. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- B. R. Liblit. Cooperative Bug Isolation. PhD thesis, University of California at Berkeley, 2004. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- F. Mattern. Virtual Time and Global States of Distributed Systems. In Workshop on Parallel and Distributed Algorithms, pages 215--226, 1988.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.Google Scholar
- A. Thakur, R. Sen, B. Liblit, and S. Lu. Cooperative Crug Isolation. In International Workshop on Dynamic Analysis, pages 35--41, 2009. Google Scholar
Digital Library
- 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 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 the 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 ACM Symposium on Operating Systems Principles, pages 221--234, 2005. Google Scholar
Digital Library
Index Terms
PACER: proportional detection of data races
Recommendations
PACER: proportional detection of data races
PLDI '10Data 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 ...
Dynamic race detection for C++11
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesThe intricate rules for memory ordering and synchronisation associated with the C/C++11 memory model mean that data races can be difficult to eliminate from concurrent programs. Dynamic data race analysis can pinpoint races in large and complex ...
Extended sequential reasoning for data-race-free programs
MSPC '11: Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and CorrectnessMost multithreaded programming languages prohibit or discourage data races. By avoiding data races, we are guaranteed that variables accessed within a synchronization-free code region cannot be modified by other threads, allowing us to reason about such ...







Comments