Abstract
Data races are subtle and difficult to detect errors that arise during concurrent program execution. Traditional testing techniques fail to find these errors, but recent research has shown that targeted dynamic analysis techniques can be developed to precisely detect races (i.e., no false race reports are generated) that occur during program execution. Unfortunately, precise race detection is still too expensive to be used in practice. State-of-the-art techniques still slow down program execution by a factor of eight or more. In this paper, we incorporate an optimization technique based on the observation that many thread-shared objects are written early in their lifetimes and then become read-only for the remainder of their lifetimes; these are known as stationary objects. The main contribution of our work is the insight that once a stationary object becomes thread-shared, races cannot occur. Therefore, our proposed approach does not monitor access to these objects. As such, our system only incurs an average overhead of 45% of that of an implementation of FastTrack, a low-overhead dynamic race detector. We then compared the effectiveness of our approach to de- tect races in deployed environments with that of Pacer, a sampling based race detector based on FastTrack. We found that our approach can detect over five times more races than Pacer when we budget 50% for runtime overhead.
- M. Abadi, C. Flanagan, and S. N. Freund. Types for Safe Locking: Static Race Detection for Java. ACM Transactions on Programing Languages and Systems, 28:207--255, March 2006. Google Scholar
Digital Library
- Apache Software Foundation. Datarace on org.apache.catalina.loader.webappclassloader. https://issues.apache.org/bugzilla/show_bug.cgi?id=37458.Google Scholar
- M. Arnold, M. Vechev, and E. Yahav. QVM: An Efficient Runtime for Detecting Defects in Deployed Systems. In Proceedings of the Conference on Object-Oriented Programming Systems Languages and Applications, pages 143--162, 2008. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. Eliot, B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), pages 169--190, Portland, Oregon, USA, 2006. Google Scholar
Digital Library
- E. Bodden. Efficient Hybrid Typestate Analysis by Determining Continuation-Equivalent States. In Int'l. Conf. on Soft. Eng., 2010. Google Scholar
Digital Library
- E. Bodden, L. J. Hendren, P. Lam, O. Lhoták, and N. A. Naeem. Collaborative Runtime Verification with Tracematches. In Works. on Runtime Verif., pages 22--37, March 2007. Google Scholar
Digital Library
- E. Bodden, P. Lam, and L. Hendren. Finding Programming Errors Earlier by Evaluating Runtime Monitors Ahead-of-Time. In International Symposium on Foundation of Software Engineering, pages 36--47, New York, NY, USA, 2008. Google Scholar
Digital Library
- E. Bodden, P. Lam, and L. J. Hendren. Clara: A framework for partially evaluating finite-state runtime monitors ahead of time. In RV, pages 183--197, Malta, November 2010. Google Scholar
Digital Library
- R. Bodık, R. Gupta, and V. Sarkar. ABCD: Eliminating Array Bounds Checks on Demand. In Proceedings of the Conference on Programming Language Design and Implementation, pages 321--333, 2000. Google Scholar
Digital Library
- M. Bond. Pacer: Proportional Detection of Data Races - ID: 2988434. http://sourceforge.net/tracker/?func=detail&aid=2988434&group_id=128805&atid=723235. Google Scholar
Digital Library
- M. D. Bond, K. E. Coons, and K. S. McKinley. PACER: Proportional Detection of Data Races. In Proceedings of the Conference on Programming Language Design and Implementation, pages 255--268, Toronto, Ontario, Canada, June 2010. Google Scholar
Digital Library
- N. G. Bronson, C. Kozyrakis, and K. Olukotun. Feedback-Directed Barrier Optimization in a Strongly Isolated S™. In Proceedings of the 36th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '09, pages 213--225, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- Canonical Ltd. Launchpad: data-races-implementation sql crash. https://bugs.launchpad.net/f-4d-cb/bug/516622.Google Scholar
- J.-D. Choi, M. Gupta, M. J. Serrano, V. C. Sreedhar, and S. P. Midkiff. Stack Allocation and Synchronization Optimizations for Java Using Escape Analysis. ACM Transactions Programming Languages and Systems, 25:876--910, November 2003. 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 Proceedings of the Conference on Programming Language Design and Implementation, pages 258--269, Berlin, Germany, June 2002. Google Scholar
Digital Library
- M. Dwyer, A. Kinneer, and S. Elbaum. Adaptive Online Program Analysis. In Proceedings of the International Conference on Software Engineering, pages 220--229, 2007. Google Scholar
Digital Library
- M. Dwyer and R. Purandare. Residual dynamic typestate analysis. In Proceedings of the International Conference on Automated Software Engineering, pages 124--133, 2007. Google Scholar
Digital Library
- M. B. Dwyer, M. Diep, and S. Elbaum. Reducing the cost of path property monitoring through sampling. In Int'l. Conf. on Aut. Soft. Eng., pages 228--237, 2008. Google Scholar
Digital Library
- T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A Race and Transaction-Aware Java Runtime. In Proceedings of the Conference on Programming Language Design and Implementation, pages 245--255, San Diego, California, USA, June 2007. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In Proceedings of the Conference on Programming Language Design and Implementation, pages 121--133, Dublin, Ireland, June 2009. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. RoadRunner: Dynamic Analysis Framework for Concurrent Programs. In Proceedings of the 9th ACM SIGPLAN-SIGSOFT workshop on Program Analysis for Software Tools and Engineering, pages 1--8, Toronto, Ontario, Canada, 2010. ACM. Google Scholar
Digital Library
- T. A. Henzinger, R. Jhala, and R. Majumdar. Race Checking by Context Inference. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '04, pages 1--13. ACM, 2004. Google Scholar
Digital Library
- Jikes RVM. Jikes research virtual machine. http://jikesrvm.org, 2011.Google Scholar
- M. Jump, S. M. Blackburn, and K. S. McKinley. Dynamic object sampling for pretenuring. In Proceedings of the 4th International Symposium on Memory Management, pages 152--162, Vancouver, BC, Canada, 2004. Google Scholar
Digital Library
- K. Kim, T. Yavuz-Kahveci, and B. A. Sanders. Precise Data Race Detection in a Relaxed Memory Model Using Heuristic-Based Model Checking. In Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, ASE '09, pages 495--499. IEEE Computer Society, 2009. Google Scholar
Digital Library
- L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21:558--565, July 1978. Google Scholar
Digital Library
- K. Lee and S. P. Midkiff. A Two-Phase Escape Analysis for Parallel Java Programs. In Proceedings of the Conference on Parallel Architectures and Compilation Techniques, pages 53--62, Seattle, Washington, USA, 2006. Google Scholar
Digital Library
- Liang T. Chen. The Challenge of Race Conditions in Parallel Programming. http://developers.sun.com/solaris/articles/\\raceconditions.html.Google Scholar
- A. Loginov, E. Yahav, S. Chandra, S. Fink, N. Rinetzky, and M. Nanda. Verifying Dereference Safety via Expanding-Scope Analysis. In Proceedings of the International Symposium on Software Testing and Analysis, ISSTA '08, pages 213--224, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: Effective Sampling for Lightweight Data-Race Detection. In Proceedings of the Conference on Programming Language Design and Implementation, pages 134--143, Dublin, Ireland, June 2009. Google Scholar
Digital Library
- S. P. Midkiff, J. E. Moreira, and M. Snir. Optimizing Array Reference Checking in Java Programs. IBM Systems Journal, 37(3):409--453, 1998. Google Scholar
Digital Library
- M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In Proceedings of the Conference on Programming Language Design and Implementation, pages 308--319, Ottawa, Ontario, Canada, June 2006. Google Scholar
Digital Library
- R. O'Callahan and J.-D. Choi. Hybrid Dynamic Data Race Detection. In Proceedings of the Symposium on Principles and Practice of Parallel Programming, pages 167--178, San Diego, California, USA, 2003. Google Scholar
Digital Library
- Oracle Corp. The java language specification. http://java.sun.com/docs/books/jls/, 2011.Google Scholar
- E. Pozniansky and A. Schuster. Efficient On-the-Fly Data Race Detection in Multithreaded CGoogle Scholar
- Programs. In Proceedings of the ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 179--190, San Diego, California, USA, 2003.Google Scholar
- E. Pozniansky and A. Schuster. MultiRace: Efficient on-the-fly Data Race Detection in Multithreaded C+ programs: Research Articles. Concurrency and Computation: Practice and Experience - Parallel and Distributed Systems: Testing and Debugging (PADTAD), 19:327--340, March 2007. Google Scholar
Digital Library
- R. Purandare, M. Dwyer, and S. Elbaum. Monitor Optimization via Stutter-Equivalent Loop Transformation. In Proceedings of the Conference on Object-Oriented Programming Systems Languages and Applications, pages 270--285, 2010. Google Scholar
Digital Library
- I. Rogers, J. Zhao, C. Kirkham, and I. Watson. Constraint Based Optimization of Stationary Fields. In Proceedings of the International Symposium on Principles and Practice of Programming in Java, PPPJ '08, pages 95--104, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Transactions on Computer Systems, 15:391--411, November 1997. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPECjbb2005. On-Line Documentation, 2005. http://www.spec.org/jbb2005.Google Scholar
- R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng., 12(1):157--171, 1986. Google Scholar
Digital Library
- C. Unkel. Stationary Fields in Object-Oriented Programs. PhD thesis, Stanford University, Stanford, CA, USA, 2009.Google Scholar
- C. Unkel and M. S. Lam. Automatic Inference of Stationary Fields: A Generalization of Java's Final Fields. In Proceedings of the Symposium on Principles of Programming Languages, pages 183--195, San Francisco, California, USA, January 2008. Google Scholar
Digital Library
- J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The foundations of Software Engineering, pages 205--214, Dubrovnik, Croatia, 2007. Google Scholar
Digital Library
- F. Xian, W. Srisa-an, and H. Jiang. Contention-Aware Scheduler: Unlocking Execution Parallelism in Multithreaded Java Programs. In Proceedings of the Conference on Object-Oriented Programming Systems Languages and Applications, pages 163--180, Nashville, TN, USA, October 2008. Google Scholar
Digital Library
- Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In Proceedings of the ACM Symposium on Operating Systems Principles, pages 221--234, Brighton, United Kingdom, 2005. Google Scholar
Digital Library
Index Terms
SOS: saving time in dynamic race detection with stationary analysis
Recommendations
SOS: saving time in dynamic race detection with stationary analysis
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsData races are subtle and difficult to detect errors that arise during concurrent program execution. Traditional testing techniques fail to find these errors, but recent research has shown that targeted dynamic analysis techniques can be developed to ...
Efficient Sampling-based Lock Contention Profiling for Java
ICPE '17: Proceedings of the 8th ACM/SPEC on International Conference on Performance EngineeringConcurrent code commonly uses locks. Choosing between simpler but less scalable and more sophisticated but error-prone locking mechanisms is difficult during development. Therefore, lock contention analysis at run-time is crucial to aid such decisions.
...
Efficient Tracing and Versatile Analysis of Lock Contention in Java Applications on the Virtual Machine Level
ICPE '16: Proceedings of the 7th ACM/SPEC on International Conference on Performance EngineeringConcurrent programming has become a necessity in order to benefit from recent advances in processor design. However, implementing correct and scalable locking for accessing shared resources remains a challenge. Examining lock contention in an ...







Comments