skip to main content
10.1145/1950365.1950395acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

ConSeq: detecting concurrency bugs through sequential errors

Authors Info & Claims
Published:05 March 2011Publication History

ABSTRACT

Concurrency bugs are caused by non-deterministic interleavings between shared memory accesses. Their effects propagate through data and control dependences until they cause software to crash, hang, produce incorrect output, etc. The lifecycle of a bug thus consists of three phases: (1) triggering, (2) propagation, and (3) failure.

Traditional techniques for detecting concurrency bugs mostly focus on phase (1)--i.e., on finding certain structural patterns of interleavings that are common triggers of concurrency bugs, such as data races. This paper explores a consequence-oriented approach to improving the accuracy and coverage of state-space search and bug detection. The proposed approach first statically identifies potential failure sites in a program binary (i.e., it first considers a phase (3) issue). It then uses static slicing to identify critical read instructions that are highly likely to affect potential failure sites through control and data dependences (phase (2)). Finally, it monitors a single (correct) execution of a concurrent program and identifies suspicious interleavings that could cause an incorrect state to arise at a critical read and then lead to a software failure (phase (1)).

ConSeq's backwards approach, (3)!(2)!(1), provides advantages in bug-detection coverage and accuracy but is challenging to carry out. ConSeq makes it feasible by exploiting the empirical observationthat phases (2) and (3) usually are short and occur within one thread. Our evaluation on large, real-world C/C++ applications shows that ConSeq detects more bugs than traditional approaches and has a much lower false-positive rate.

References

  1. G. Altekar and I. Stoica. ODR: output-deterministic replay for multicore debugging. In SOSP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Balakrishnan, R. Gruian, T. Reps, and T. Teitelbaum. CodeSurfer/x86 -- A platform for analyzing x86 executables, (tool demonstration paper). In CC, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Balakrishnan and T. Reps. Analyzing memory accesses in x86 executables. In Compiler Construction, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: safe multithreaded programming for C/C. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Bessey, K. Block, B. Chelf, A. Chou, B. Fulton, S. Hallem, C. Henri-Gros, A. Kamsky, S. McPeak, and D. Engler. A few billion lines of code later: using static analysis to find bugs in the real world. Commun. ACM, 53(2):66--75, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. F. Bourdoncle. Efficient chaotic iteration strategies with widenings. In Int. Conf. on Formal Methods in Prog. and their Appl., 1993.Google ScholarGoogle ScholarCross RefCross Ref
  7. S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In ASPLOS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Burnim and K. Sen. Asserting and checking determinism for multithreaded programs. In FSE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Cadar, D. Dunbar, and D. R. Engler. Klee: Unassisted and automatic generation of high-coverage tests for complex systems programs. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cherokee. Cherokee: The Fastest free Web Server out there! http://www.cherokee-project.com/.Google ScholarGoogle Scholar
  11. L. Chew and D. Lie. Kivati: Fast detection and prevention of atomicity violations. In EuroSys, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J.-D. Choi et al. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Click. The Click Modular Router Projec. http://read.cs.ucla.edu/click/click.Google ScholarGoogle Scholar
  14. J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: deterministic shared memory multiprocessing. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Dimitrov and H. Zhou. Anomaly-based bug prediction, isolation, and validation: an automated approach for software debugging. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur. Multi-threaded Java program test generation. IBM Systems Journal, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Ernst, A. Czeisler, W. G. Griswold, and D. Notkin. Quickly detecting relevant program invariants. In ICSE, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The daikon system for dynamic detection of likely invariants. Sci. Comput. Program., 69(1-3):35--45, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Godefroid, N. Klarlund, and K. Sen. Dart: directed automated random testing. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. W. Gu, Z. Kalbarczyk, R. K. Iyer, and Z.-Y. Yang. Characterization of Linux kernel behavior under errors. In DSN, 2003.Google ScholarGoogle Scholar
  22. S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. In TOPLAS, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Jhala and R. Majumdar. Software model checking. Computing Surveys, 41(4), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Jula, D. Tralamazza, C. Zamfir, and G. Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. Kidd, P. Lammich, T. Touilli, and T. Reps. A static technique for checking for multiple-variable data races. Software Tools for Technology Transfer, 2010.Google ScholarGoogle Scholar
  26. V. Kuznetsov, V. Chipounov, and G. Candea. Testing closed-source binary device drivers with DDT. In USENIX, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Lal and T. Reps. Reducing concurrent analysis under a context bound to sequential analysis. Form. Methods Syst. Des., 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. I. Lee and R. K. Iyer. Faults, symptoms, and software fault tolerance in the Tandem GUARDIAN90 Operating System. IEEE, pages 20--29, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  29. N. G. Leveson and C. S. Turner. An investigation of the therac-25 accidents. Computer, 26(7):18--41, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. X. Li and D. Yeung. Application-level correctness and its impact on fault tolerance. In HPCA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. S. Lu, S. Park, C. Hu, X. Ma, W. Jiang, Z. Li, R. A. Popa, and Y. Zhou. MUVI: Automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs. In SOSP, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes -- a comprehensive study of real world concurrency bug characteristics. In ASPLOS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: detecting atomicity violations via access interleaving invariants. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. B. Lucia and L. Ceze. Finding concurrency bugs with context-aware communication graphs. In MICRO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. B. Lucia, L. Ceze, and K. Strauss. Colorsafe: architectural support for debugging and dynamically avoiding multi-variable atomicity violations. In ISCA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-aid: Detecting and surviving atomicity violations. In ISCA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. R. H. B. Netzer and B. P. Miller. Improving the accuracy of data race detection. In PPoPP, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. M. Olszewski, J. Ansel, and S. P. Amarasinghe. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. S. Park, S. Lu, and Y. Zhou. Ctrigger: Exposing atomicity violation bugs from their finding places. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. S. Park, R. W. Vuduc, and M. J. Harrold. Falcon: fault localization in concurrent programs. In ICSE '10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. S. Park, Y. Zhou, W. Xiong, Z. Yin, R. Kaushik, K. H. Lee, and S. Lu. PRES: probabilistic replay with execution sketching on multiprocessors. In SOSP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. D. K. Pradhan. Fault-Tolerant Computer System Design. Prentice-Hall, Incorporated, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. S. Qadeer and D. Wu. Kiss: keep it simple and sequential. In PLDI, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: Treating bugs as allergies c a safe method to survive software failures. In SOSP, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. L. Ryzhyk, P. Chubb, I. Kuz, and G. Heiser. Dingo: taming device drivers. In EuroSys, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM TOCS, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. SecurityFocus. Software bug contributed to blackout. http://www.securityfocus.com/news/8016.Google ScholarGoogle Scholar
  53. K. Sen. Race directed random testing of concurrent programs. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. K. Sen, D. Marinov, and G. Agha. Cute: a concolic unit testing engine for c. In ESEC/SIGSOFT FSE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Y. Shi, S. Park, Z. Yin, S. Lu, Y. Zhou, W. Chen, and W. Zheng. Do i use the wrong definition? defuse: Definition-use invariants for detecting concurrency and sequential bugs. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Y. Wang, T. Kelly, M. Kudlur, S. Lafortune, and S. A. Mahlke. Gadara: Dynamic deadlock avoidance for multithreaded programs. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. D. Weeratunge, X. Zhang, and S. Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In ASPLOS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. M. Weiser. Program slicing. In IEEE Transactions on Software Engineering, 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  61. W. Xiong, S. Park, J. Zhang, Y. Zhou, and Z. Ma. Ad hoc synchronization considered harmful. In OSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. J. Yu and S. Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In ISCA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Y. Yu, T. Rodeheffer, and W. Chen. Racetrack: Efficient detection of data race conditions via adaptive tracking. In SOSP, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. C. Zamfir and G. Candea. Execution synthesis: A technique for automated software debugging. In EuroSys, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. W. Zhang, C. Sun, and S. Lu. ConMem: Detecting severe concurrency bugs through an effect-oriented approach. In ASPLOS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. ConSeq: detecting concurrency bugs through sequential errors

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ASPLOS XVI: Proceedings of the sixteenth international conference on Architectural support for programming languages and operating systems
      March 2011
      432 pages
      ISBN:9781450302661
      DOI:10.1145/1950365
      • cover image ACM SIGARCH Computer Architecture News
        ACM SIGARCH Computer Architecture News  Volume 39, Issue 1
        ASPLOS '11
        March 2011
        407 pages
        ISSN:0163-5964
        DOI:10.1145/1961295
        Issue’s Table of Contents
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 46, Issue 3
        ASPLOS '11
        March 2011
        407 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1961296
        Issue’s Table of Contents

      Copyright © 2011 ACM

      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: 5 March 2011

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate535of2,713submissions,20%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader