Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

CTrigger: exposing atomicity violation bugs from their hiding places

Published: 07 March 2009 Publication History

Abstract

Multicore hardware is making concurrent programs pervasive. Unfortunately, concurrent programs are prone to bugs. Among different types of concurrency bugs, atomicity violation bugs are common and important. Existing techniques to detect atomicity violation bugs suffer from one limitation: requiring bugs to manifest during monitored runs, which is an open problem in concurrent program testing.
This paper makes two contributions. First, it studies the interleaving characteristics of the common practice in concurrent program testing (i.e., running a program over and over) to understand why atomicity violation bugs are hard to expose. Second, it proposes CTrigger to effectively and efficiently expose atomicity violation bugs in large programs. CTrigger focuses on a special type of interleavings (i.e., unserializable interleavings) that are inherently correlated to atomicity violation bugs, and uses trace analysis to systematically identify (likely) feasible unserializable interleavings with low occurrence-probability. CTrigger then uses minimum execution perturbation to exercise low-probability interleavings and expose difficult-to-catch atomicity violation.
We evaluate CTrigger with real-world atomicity violation bugs from four sever/desktop applications (Apache, MySQL, Mozilla, and PBZIP2) and three SPLASH2 applications on 8-core machines. CTrigger efficiently exposes the tested bugs within 1--235 seconds, two to four orders of magnitude faster than stress testing. Without CTrigger, some of these bugs do not manifest even after 7 full days of stress testing. In addition, without deterministic replay support, once a bug is exposed, CTrigger can help programmers reliably reproduce it for diagnosis. Our tested bugs are reproduced by CTrigger mostly within 5 seconds, 300 to over 60000 times faster than stress testing.

References

[1]
P. Barford, and M. Crovella.Generating representative Web Workloads for network and server performance evaluation.In ACM SIGMETRICS, June 1998.
[2]
B. Beizer.Software testing techniques, 2nd edition. New York: Van Nostrand Reinhold, 1990.
[3]
A. Bron, E. Farchi, Y. Magid, Y. Nir and S. Ur.Applications of synchronization coverage.In PPoPP, 2005.
[4]
O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur.Multi-threaded Java program test generation. In IBM Systems Journal, 2002.
[5]
C. Flanagan, and S. N. Freund.Atomizer: a dynamic atomicity checker for multithreaded programs. In POPL, 2004.
[6]
C. Flanagan, and S. Qadeer.A type and effect system for atomicity. In PLDI, 2003.
[7]
C. Hammer, J. Dolby, M. Vaziri, and F. Tip. Dynamic detection of atomic-set-serializability violations. In ICSE, 2008.
[8]
M. J. Harrold, and B. A. Malloy. Data flow testing of parallelized code. In ICSM, 1992.
[9]
P. V. Koppol, and K.-C. Tai. An incremental approach to structural testing of concurrent software. In ISSTA, 1996.
[10]
J. R. Larus, and R. Rajwar. Transactional memory. Morgan & Claypool, 2006.
[11]
S. Lu, W. Jiang, and Y. Zhou. A study of interleaving coverage criteria. In FSE, 2007.
[12]
S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes -- A comprehensive study of real world concurrency bug characteristics. In ASPLOS, 2008.
[13]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting atomicity violations via access interleaving invariants. In ASPLOS, 2006.
[14]
B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-Aid: Detecting and surviving atomicity violations. In ISCA, 2008.
[15]
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.
[16]
M. Musuvathi, and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007.
[17]
M. Musuvathi, S. Qadeer, T. Ball, and G. Basler. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008.
[18]
N. Nethercote, and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In PLDI, 2007.
[19]
R. H. B. Netzer, and B. P. Miller. Improving the accuracy of data race detection.In PPoPP, 1991.
[20]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. AndersonEraser: A dynamic data race detector for multithreaded programs. In ACM TOCS, 1997.
[21]
Software Bug Contributed to Blackout. SecurityFocus. http://www.securityfocus.com/news/8016
[22]
K. Sen. Race directed random testing of concurrent programs. In PLDI, 2008.
[23]
K. Sen, and G. Agha. Automated systematic testing of open distributed programs. In FSE, 2006.
[24]
R. N. Taylor, D. L. Levine, and C. D. Kelly. Structural testing of concurrent programs. In IEEE Transactions on Software Engineering, 1992.
[25]
M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL, 2006.
[26]
S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: characterization and methodological considerations. In ISCA, 1995.
[27]
M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005.
[28]
C.-S. D. Yang, A. L. Souter, and L. L. Pollock. All-du-path coverage for parallel programs. In ISSTA, 1998.
[29]
Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient detection of data race conditions via adaptive tracking. In SOSP, 2005.

Cited By

View all
  • (2025)A generalized, rule-based method for the detection of intermittent faults in software programsJournal of Systems and Software10.1016/j.jss.2024.112228219:COnline publication date: 1-Jan-2025
  • (2023)Efficient regression testing of distributed real-time reactive systems in the context of model-driven developmentSoftware and Systems Modeling10.1007/s10270-023-01086-522:5(1565-1587)Online publication date: 6-Mar-2023
  • (2023)Informed Memory Access MonitoringPerformance Analysis of Parallel Applications for HPC10.1007/978-981-99-4366-1_4(73-97)Online publication date: 19-Jun-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 44, Issue 3
ASPLOS 2009
March 2009
346 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1508284
Issue’s Table of Contents
  • cover image ACM Conferences
    ASPLOS XIV: Proceedings of the 14th international conference on Architectural support for programming languages and operating systems
    March 2009
    358 pages
    ISBN:9781605584065
    DOI:10.1145/1508244
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 07 March 2009
Published in SIGPLAN Volume 44, Issue 3

Check for updates

Author Tags

  1. concurrency bug
  2. software testing

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)32
  • Downloads (Last 6 weeks)2
Reflects downloads up to 02 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)A generalized, rule-based method for the detection of intermittent faults in software programsJournal of Systems and Software10.1016/j.jss.2024.112228219:COnline publication date: 1-Jan-2025
  • (2023)Efficient regression testing of distributed real-time reactive systems in the context of model-driven developmentSoftware and Systems Modeling10.1007/s10270-023-01086-522:5(1565-1587)Online publication date: 6-Mar-2023
  • (2023)Informed Memory Access MonitoringPerformance Analysis of Parallel Applications for HPC10.1007/978-981-99-4366-1_4(73-97)Online publication date: 19-Jun-2023
  • (2023)Software Fault Localization: an Overview of Research, Techniques, and ToolsHandbook of Software Fault Localization10.1002/9781119880929.ch1(1-117)Online publication date: 21-Apr-2023
  • (2022)Fuzzing with automatically controlled interleavings to detect concurrency bugsJournal of Systems and Software10.1016/j.jss.2022.111379191:COnline publication date: 1-Sep-2022
  • (2021)On interleaving space exploration of multi-threaded programsFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-020-9501-615:4Online publication date: 1-Aug-2021
  • (2020)IFIX: Fixing Concurrency Bugs While They Are Introduced2020 25th International Conference on Engineering of Complex Computer Systems (ICECCS)10.1109/ICECCS51672.2020.00025(155-164)Online publication date: Oct-2020
  • (2020)Detection of intermittent faults in software programs through identification of suspicious shared variable access patternsJournal of Systems and Software10.1016/j.jss.2019.110455159:COnline publication date: 1-Jan-2020
  • (2020)Convoider: A Concurrency Bug Avoider Based on Transparent Software Transactional MemoryInternational Journal of Parallel Programming10.1007/s10766-019-00642-148:1(32-60)Online publication date: 1-Feb-2020
  • (2019)Concurrency Bug Avoiding Based on Optimized Software Transactional MemoryScientific Programming10.1155/2019/94043232019Online publication date: 1-Jan-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media