ABSTRACT
Concurrency bugs are among the most difficult to test and diagnose of all software bugs. The multicore technology trend worsens this problem. Most previous concurrency bug detection work focuses on one bug subclass, data races, and neglects many other important ones such as atomicity violations, which will soon become increasingly important due to the emerging trend of transactional memory models.This paper proposes an innovative, comprehensive, invariantbased approach called AVIO to detect atomicity violations. Our idea is based on a novel observation called access interleaving invariant, which is a good indication of programmers' assumptions about the atomicity of certain code regions. By automatically extracting such invariants and detecting violations of these invariants at run time, AVIO can detect a variety of atomicity violations.Based on this idea, we have designed and built two implementations of AVIO and evaluated the trade-offs between them. The first implementation, AVIO-S, is purely in software, while the second, AVIO-H, requires some simple extensions to the cache coherence hardware. AVIO-S is cheaper and more accurate but incurs much higher overhead and thus more run-time perturbation than AVIOH. Therefore, AVIO-S is more suitable for in-house bug detection and postmortem bug diagnosis, while AVIO-H can be used for bug detection during production runs.We evaluate both implementations of AVIO using large realworld server applications (Apache and MySQL) with six representative real atomicity violation bugs, and SPLASH-2 benchmarks. Our results show that AVIO detects more tested atomicity violations of various types and has 25 times fewer false positives than previous solutions on average.
- C.S. Ananian, K. Asanovic, B.C. Kuszmaul, C.E. Leiserson, and S. Lie. Unbounded transactional memory. In HPCA, 2005. Google Scholar
Digital Library
- L.A. Barroso, K. Gharachorloo, R. McNamara, A. Nowatzyk, S. Qadeer, B. Sano, S. Smith, R. Stets, and B. Verghese. Piranha: a scalable architecture based on single-chip multiprocessing. In ISCA, 2000. Google Scholar
Digital Library
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In OOPSLA, 2002. Google Scholar
Digital Library
- M. Burrows and K.R.M. Leino. Finding stale-value errors in concurrent programs. In Compaq SRC Technical Note 2002-04, 2002.Google Scholar
- S. Chandra and P.M. Chen. How fail-stop are faulty programs? In FTCS, 1998. Google Scholar
Digital Library
- J.-D. Choi et al. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI, 2002. Google Scholar
Digital Library
- A. Dinning and E. Schonberg. An empirical comparison of monitoring algorithms for access anomaly detection. In PPoPP, 1990. Google Scholar
Digital Library
- D. Engler and K. Ashcraft. RacerX: Effective, static detection of race conditions and deadlocks. In SOSP, 2003. Google Scholar
Digital Library
- M. Ernst, A. Czeisler, W.G. Griswold, and D. Notkin. Quickly detecting relevant program invariants. In ICSE, 2000. Google Scholar
Digital Library
- C. Flanagan and S.N. Freund. Type-based race detection for java. In PLDI, 2000. Google Scholar
Digital Library
- C. Flanagan and S.N. Freund. Atomizer: a dynamic atomicity checker for multithreaded programs. In POPL, 2004. Google Scholar
Digital Library
- C. Flanagan and S. Qadeer. A type and effect system for atomicity. In PLDI, 2003. Google Scholar
Digital Library
- 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. In ISCA, 2004. Google Scholar
Digital Library
- S. Hangal and M.S. Lam. Tracking down software bugs using automatic anomaly detection. In ICSE, 2002. Google Scholar
Digital Library
- 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 Perform. Eval. Rev., 31(4), 2004. Google Scholar
Digital Library
- T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA, 2003. Google Scholar
Digital Library
- T.A. Henzinger, R. Jhala, and R. Majumdar. Race checking by context inference. In PLDI, 2004. Google Scholar
Digital Library
- M. Herlihy and J.E.B. Moss. Transactional memory: architectural support for lock-free data structures. In ISCA, 1993. 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, July 1978. Google Scholar
Digital Library
- B. Liblit, A. Aiken, A.X. Zheng, and M.I. Jordan. Bug isolation via remote program sampling. In PLDI, 2003. Google Scholar
Digital Library
- 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. In PLDI, 2005. Google Scholar
Digital Library
- P.S. Magnusson, F. Dahlgren, H. Grahn, M. Karlsson, F. Larsson, F. Lundholm, A. Moestedt, J. Nilsson, P. Stenstrom, and B. Werner. Simics/sun4m: A virtual workstation. In Usenix Annual Technical Conference, 1998. Google Scholar
Digital Library
- S.L. Min and J.-D. Choi. An efficient cache-based access anomaly detection scheme. In ASPLOS, 1991. Google Scholar
Digital Library
- S. Narayanasamy, G. Pokam, and B. Calder. Bugnet: Continuously recording program execution for deterministic replay debugging. In ISCA, 2005. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: A program supervision framework. ENTCS, 2003.Google Scholar
- R.H.B. Netzer and B.P. Miller. Improving the accuracy of data race detection. In PPoPP, 1991. Google Scholar
Digital Library
- R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In PPoPP, 2003. Google Scholar
Digital Library
- D. Perkovic and P.J. Keleher. Online data-race detection via coherency guarantees. In OSDI, 1996. Google Scholar
Digital Library
- E. Pozniansky and A. Schuster. Efficient on-the-fly data race detection in multithreaded c++ programs. In PPoPP, 2003. Google Scholar
Digital Library
- M. Prvulovic. Cord:cost-effective (and nearly overhead-free) orderreordering and data race detection. In HPCA, 2006.Google Scholar
- M. Prvulovic and J. Torrellas. ReEnact: Using thread-level speculation mechanisms to debug data races in multithreaded codes. In ISCA, 2003. Google Scholar
Digital Library
- B. Richards and J.R. Larus. Protocol-based data-race detection. In SPDT, 1998. Google Scholar
Digital Library
- A. Sasturkar, R. Agarwal, L. Wang, and S.D. Stoller. Automated type-based analysis of data races and atomicity. In PPoPP, 2005. 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 TOCS, 1997. Google Scholar
Digital Library
- SecurityFocus. Software bug contributed to blackout.Google Scholar
- N. Tuck, B. Calder, and G. Varghese. Hardware and binary modification support for code pointer protection from buffer overflow. In MICRO, 2004. Google Scholar
Digital Library
- M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL, 2006. Google Scholar
Digital Library
- C. von Praun and T.R. Gross. Object race detection. In OOPSLA, 2001. Google Scholar
Digital Library
- L. Wang and S.D. Stoller. Static analysis for programs with nonblocking synchronization. In PPoPP, 2005. Google Scholar
Digital Library
- S.C. Woo, M. Ohara, E. Torrie, J.P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In ISCA, 1995. Google Scholar
Digital Library
- M. Xu, R. Bodik, and M.D. Hill. A "flight data recorder" for enabling full-system multiprocessor deterministic replay. In ISCA, 2003. Google Scholar
Digital Library
- M. Xu, R. Bodík, and M.D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005. Google Scholar
Digital Library
- Y. Yu, T. Rodeheffer, and W. Chen. Racetrack: Efficient detection of data race conditions via adaptive tracking. In SOSP, 2005. Google Scholar
Digital Library
- 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. In MICRO, 2004. Google Scholar
Digital Library
- P. Zhou, F. Qin, W. Liu, Y. Zhou, and J. Torrellas. iWatcher: Efficient Architecture Support for Software Debugging. In ISCA, 2004. Google Scholar
Digital Library
Index Terms
AVIO: detecting atomicity violations via access interleaving invariants
Recommendations
AVIO: detecting atomicity violations via access interleaving invariants
Proceedings of the 2006 ASPLOS ConferenceConcurrency bugs are among the most difficult to test and diagnose of all software bugs. The multicore technology trend worsens this problem. Most previous concurrency bug detection work focuses on one bug subclass, data races, and neglects many other ...
AVIO: detecting atomicity violations via access interleaving invariants
Proceedings of the 2006 ASPLOS ConferenceConcurrency bugs are among the most difficult to test and diagnose of all software bugs. The multicore technology trend worsens this problem. Most previous concurrency bug detection work focuses on one bug subclass, data races, and neglects many other ...
AVIO: detecting atomicity violations via access interleaving invariants
Proceedings of the 2006 ASPLOS ConferenceConcurrency bugs are among the most difficult to test and diagnose of all software bugs. The multicore technology trend worsens this problem. Most previous concurrency bug detection work focuses on one bug subclass, data races, and neglects many other ...








Comments