The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.06 - June (2012 vol.23)
pp: 1060-1072
Shan Lu , University of Wisconsin-Madison, Madison
Soyeon Park , University of California, San Diego, La Jolla
Yuanyuan Zhou , University of California, San Diego, La Jolla
ABSTRACT
Concurrency bugs are among the most difficult to detect and diagnose of all software bugs. This paper combats concurrency bugs from the perspective of programmers' synchronization intentions. We first study the root causes of 74 real-world concurrency bugs to understand what types of synchronization assumptions are violated in real world. This study reveals two classes of synchronization intentions that are common, frequently violated, and understudied—single-variable atomicity intention and multivariable correlation intention. Following this study, two bug detection tools, AVIO and MUVI, are proposed to automatically infer these two types of synchronization intentions and detect related bugs. Specifically, AVIO automatically extracts access interleaving invariants and detects a variety of atomicity-violations during production runs. It can work both with and without special hardware support in our implementation. MUVI automatically infers multivariable correlations through static analysis and detects multivariable concurrency bugs. Our evaluation with real-world large multithreaded applications shows that AVIO can detect more atomicity-violation bugs with 15 times fewer false positives on average than previous solutions. Besides, AVIO-H incurs negligible (0.4-0.5 percent) overhead. MUVI successfully extracts 6,449 access correlations from Linux, Mozilla, MySQL, and PostgreSQL with high (83 percent) accuracy. Race detectors extended by MUVI can correctly identify the root causes of real-world multivariable concurrency bugs in our experiments. They also report four new multivariable concurrency bugs that have never been reported before.
INDEX TERMS
Concurrency bugs, atomicity violation, bug detection.
CITATION
Shan Lu, Soyeon Park, Yuanyuan Zhou, "Detecting Concurrency Bugs from the Perspectives of Synchronization Intentions", IEEE Transactions on Parallel & Distributed Systems, vol.23, no. 6, pp. 1060-1072, June 2012, doi:10.1109/TPDS.2011.254
REFERENCES
[1] R. Alur, P. Cerny, P. Madhusudan, and W. Nam, "Synthesis of Interface Specifications for Java Classes," Proc. 32nd ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL), 2005.
[2] C.S. Ananian, K. Asanovic, B.C. Kuszmaul, C.E. Leiserson, and S. Lie, "Unbounded Transactional Memory," Proc. 11th Int'l Symp. High-Performance Computer Architecture (HPCA), 2005.
[3] C. Artho, K. Havelund, and A. Bierre, "High-Level Data Races," Proc. First Int'l Workshop Verification and Validation of Enterprise Information Systems, 2003.
[4] M. Burrows and K.R.M. Leino, "Finding Stale-Value Errors in Concurrent Programs," Compaq SRC Technical Note 2002-04, 2002.
[5] L. Ceze, P. Montesinos, C. von Praun, and J. Torrellas, "Colorama: Architectural Support for Data-Centric Synchronization," Proc. IEEE 13th Int'l Symp. High-Performance Computer Architecture (HPCA), 2007.
[6] J.-D. Choi et al., "Efficient and Precise Datarace Detection for Multithreaded Object-Oriented Programs," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2002.
[7] A. Dinning and E. Schonberg, "An Empirical Comparison of Monitoring Algorithms for Access Anomaly Detection," Proc. Second ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP ), 1990.
[8] A. Dinning and E. Schonberg, "Detecting Access Anomalies in Programs with Critical Sections," Proc. ACM/ONR Workshop Parallel and Distributed Debugging (AOWPDD), 1991.
[9] D. Engler and K. Ashcraft, "RacerX: Effective Static Detection of Race Conditions and Deadlocks," Proc. ACM 19th Symp. Operating Systems Principles (SOSP), 2003.
[10] D. Engler, D.Y. Chen, S. Hallem, A. Chou, and B. Chelf, "Bugs as Deviant Behavior: A General Approach to Inferring Errors in Systems Code," Proc. ACM 18th Symp. Operating Systems Principles (SOSP), pp. 57-72, 2001.
[11] M. Ernst, A. Czeisler, W.G. Griswold, and D. Notkin, "Quickly Detecting Relevant Program Invariants," Proc. 22nd Int'l Conf. Software Eng. (ICSE), 2000.
[12] C. Flanagan and S.N. Freund, "Atomizer: A Dynamic Atomicity Checker for Multithreaded Programs," Proc. 18th Int'l Parallel and Distributed Processing (POPL), 2004.
[13] C. Flanagan and S. Qadeer, "A Type and Effect System for Atomicity," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2003.
[14] G. Grahne and J. Zhu, "Efficiently Using Prefix-Trees in Mining Frequent Itemsets," Proc. IEEE First ICDM Workshop Frequent Item Set Mining Implementations (FIMI '03), Nov. 2003.
[15] L. Hammond, V. Wong, M. Chen, B.D. Carlstrom, J.D. Davis, B. Hertzberg, M.K. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun, "Transactional Memory Coherence and Consistency," Proc. 31st Ann. Int'l Symp. Computer Architecture (ISCA), 2004.
[16] S. Hangal and M.S. Lam, "Tracking Down Software Bugs Using Automatic Anomaly Detection," Proc. 24th Int'l Conf. Software Eng. (ICSE), 2002.
[17] N. Hardavellas, S. Somogyi, T.F. Wenisch, R.E. Wunderlich, S. Chen, J. Kim, B. Falsafi, J.C. Hoe, and A.G. Nowatzyk, "Simflex: A Fast, Accurate, Flexible Full-System Simulation Framework for Performance Evaluation of Server Architecture," SIGMETRICS Performance Evaluation Rev., vol. 31, no. 4, pp. 31-35, 2004.
[18] M. Herlihy and J.E.B. Moss, "Transactional Memory: Architectural Support for Lock-Free Data Structures," Proc. 20th Ann. Int'l Symp. Computer Architecture (ISCA), 1993.
[19] T. Kremenek, P. Twohey, G. Back, A. Ng, and D. Engler, "From Uncertainty to Belief: Inferring the Specification within," Proc. Seventh Symp. Operating Systems Design and Implementation (OSDI), 2006.
[20] Z. Li and Y. Zhou, "PR-Miner: Automatically Extracting Implicit Programming Rules and Detecting Violations in Large Software Code," Proc. 10th European Software Eng. Conf. Held Jointly with 13th ACM SIGSOFT Int'l Symp. Foundations of Software Eng. (FSE), 2005.
[21] B. Liblit, A. Aiken, A.X. Zheng, and M.I. Jordan, "Bug Isolation via Remote Program Sampling," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2003.
[22] S. Lu, J. Tucek, F. Qin, and Y. Zhou, "Avio: Detecting Atomicity Violations via Access Interleaving Invariants," Proc. 12th Int'l Conf. Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2006.
[23] B. Lucia and L. Ceze, "Finding Concurrency Bugs with Context-aware Communication Graphs," Proc. IEEE/ACM 42nd Ann. Int'l Symp. Microarchitecture (MICRO), 2009.
[24] C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V.J. Reddi, and K. Hazelwood, "Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2005.
[25] B. McCloskey, F. Zhou, D. Gay, and E. Brewer, "Autolocker: Synchronization Inference for Atomic Sections," Proc. Ann. Symp. Principles of Programming Languages (POPL), 2006.
[26] S.L. Min and J.-D. Choi, "An Efficient Cache-Based Access Anomaly Detection Scheme," Proc. Fourth Int'l Conf. Architectural Support for Programming Languages and Operating Systems (ASPLOS), 1991.
[27] K.E. Moore, J. Bobba, M.J. Moravan, M.D. Hill, and D.A. Wood, "Logtm: Log-Based Transactional Memory," Proc. 12th Int'l Symp. High-Performance Computer Architecture (HPCA), 2006.
[28] N. Nethercote and J. Seward, "Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2007.
[29] R.H.B. Netzer and B.P. Miller, "Improving the Accuracy of Data Race Detection," Proc. Third ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP), 1991.
[30] R. O'Callahan and J.-D. Choi, "Hybrid Dynamic Data Race Detection," Proc. Ninth ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP), 2003.
[31] D. Perkovic and P.J. Keleher, "Online Data-Race Detection via Coherency Guarantees," Proc. Second USENIX Symp. Operating Systems Design and Implementation (OSDI), 1996.
[32] M. Prvulovic, "Cord:cost-Effective (and Nearly Overhead-Free) Order-Reordering and Data Race Detection," Proc. Int'l Symp. High-Performance Computer Architecture (HPCA), 2006.
[33] M. Prvulovic and J. Torrellas, "ReEnact: Using Thread-level Speculation Mechanisms to Debug Data Races in Multithreaded Codes," Proc. 30th Ann. Int'l Symp. Computer Architecture (ISCA), 2003.
[34] A. Sasturkar, R. Agarwal, L. Wang, and S.D. Stoller, "Automated Type-Based Analysis of Data Races and Atomicity," Proc. 10th ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP), 2005.
[35] S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson, "Eraser: A Dynamic Data Race Detector for Multithreaded Programs," ACM Trans. Computer Systems, vol. 15, pp. 391-411, 1997.
[36] SecurityFocus, Software Bug Contributed to Blackout, 2003.
[37] L. Wang and S.D. Stoller, "Static Analysis for Programs with Non-Blocking Synchronization," Proc. 10th ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP), 2005.
[38] J. Whaley, M.C. Martin, and M.S. Lam, "Automatic Extraction of Object-Oriented Component Interfaces," Proc. ACM SIGSOFT Int'l Symp. Software Testing and Analysis (ISSTA), 2002.
[39] M. Xu, R. Bodík, and M.D. Hill, "A Serializability Violation Detector for Shared-Memory Server Programs," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI) 2005.
[40] J. Yang, D. Evans, D. Bhardwaj, T.B. t, and M. Das, "Perracotta: Mining Temporal API Rules from Imperfect Traces," Proc. 28th Int'l Conf. Software Eng. (ICSE), 2006.
[41] J. Yu and S. Narayanasamy, "A Case for an Interleaving Constrained Shared-Memory Multi-Processor," Proc. 36th Ann. Int'l Symp. Computer Architecture (ISCA), 2009.
[42] Y. Yu, T. Rodeheffer, and W. Chen, "Racetrack: Efficient Detection of Data Race Conditions via Adaptive Tracking," Proc. ACM 20th Symp. Operating Systems Principles (SOSP), 2005.
[43] P. Zhou, W. Liu, F. Long, S. Lu, F. Qin, Y. Zhou, S. Midkiff, and J. Torrellas, "AccMon: Automatically Detecting Memory-Related Bugs via Program Counter-Based Invariants," Proc. 37th Int'l Symp. Microarchitecture (MICRO), 2004.
25 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool