skip to main content
research-article

Accentuating the positive: atomicity inference and enforcement using correct executions

Published:22 October 2011Publication History
Skip Abstract Section

Abstract

Concurrency bugs are often due to inadequate synchronization that fail to prevent specific (undesirable) thread interleavings. Such errors, often referred to as Heisenbugs, are difficult to detect, prevent, and repair. In this paper, we present a new technique to increase program robustness against Heisenbugs. We profile correct executions from provided test suites to infer fine-grained atomicity properties. Additional deadlock-free locking is injected into the program to guarantee these properties hold on production runs. Notably, our technique does not rely on witnessing or analyzing erroneous executions. The end result is a scheme that only permits executions which are guaranteed to preserve the atomicity properties derived from the profile. Evaluation results on large, real-world, open-source programs show that our technique can effectively suppress subtle concurrency bugs, with small runtime overheads (typically less than 15%).

References

  1. R. Agarwal, L. Wang, and S. D. Stoller. Detecting Potential Deadlocks with Static Analysis and Runtime Monitoring. In PADTAD'05.Google ScholarGoogle Scholar
  2. T. Bergan, O. Anderson, J. Devietti, L. Ceze, D. Grossman. CoreDet: A Compiler and Runtime System for Deterministic Multithreaded Execution. In ASPLOS'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Bodden and K. Havelund. Racer: Effective Race Detection Using AspectJ. In ISSTA'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Burckhardt, P. Kothari, M. Musuvathi and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In ASPLOS'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. D. Bond, K. E. Coons and K. S. McKinley. Pacer: Proportional Detection of Data Races. In PLDI'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. Jr. Bocchino, S. Heumann, N. Honarmand, S. V. Adve, V. S. Adve, A. Welc and T. Shpeisman, Safe nondeterminism in a deterministic-by-default parallel language, In POPL'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Chew and D. Lie, Kivati: fast detection and prevention of atomicity violations, In EuroSys'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. F. Chen, T. F. Serbanuta, and G. Rosu. JPredictor: A Predictive Runtime Analysis Tool for Java. In ICSE'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Cherem, T. M. Chilimbi, S. Gulwani. Inferring Locks for Atomic Sections. In PLDI'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. H. Cui, J. Wu, C. Tsai and J. Yang. Stable Deterministic Multithreading through Schedule Memoization. In OSDI'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Cunningham, K. Gudka and S. Eisenbach, Keep off the grass: locking the right path for atomicity, In CC'08/ETAPS'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Diniz and M. Rinard, Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based Programs, In Journal of Parallel and Distributed Computing, 49(1):218--244, 1996, Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. W. Dunlap, D. G. Lucchetti, M. A. Fetterman, and P. M. Chen. Execution Replay of Multiprocessor Virtual Machines. In VEE'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Emmi, J. S. Fischer, R. Jhala, and R. Majumdar. Lock allocation, In POPL'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan and S. N Freund. Atomizer: A Dynamic Atomicity Checker for Multithreaded Programs. In POPL'04. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Hammer, J. Dolby, M. Vaziri, and F. Tip. Dynamic Detection of Atomic-Set-Serializability Violations. In ICSE'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Joshi, M. Naik, K. Sen, and D. Gay. An Effective Dynamic Analysis for Detecting Generalized Deadlocks. In FSE'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Z. Jin, L. Song, W. Zhang, S. Lu, and S. B. Liblit, Automated Atomicity-Violation Fixing. In PLDI'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Lu and S. Park and C. Hu and X. Ma, and W. Jiang and Z. Li and R. Popa, R. and Y. Zhou. MUVI: Automatically Inferring Multi-Variable Access Correlations and Detecting Related Semantic and Concurrency Bugs. In SOSP'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from Mistakes: A Comprehensive Study on Real-World Concurrency Bug Characteristics. In ASPLOS'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. McCloskey, F. Zhou, D. Gay and E. Brewer. Autolocker: Synchronization Inference for Atomic Sections. In POPL'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. Montesinos, M. Hicks, S. T. King, and J. Torrellas. Capo: A Software-Hardware Interface for Practical Deterministic Multiprocessor Replay. In ASPLOS'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Musuvathi and S. Qadeer. Fair Stateless Model Checking. In PLDI'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. O'Callahan and J.-D. Choi. Hybrid Dynamic Data Race Detection. In PPoPP'03. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing Atomicity Violation Bugs from their Hiding Places. In ASPLOS'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. P. Pratikakis, J. S. Foster and M. Hicks. LOCKSMITH: Context-Sensitive Correlation Analysis for Race Detection. In PLDI'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. Rajamani, G. Ramalingam, V. P. Ranganath, and K. Vaswani, ISOLATOR: dynamically ensuring isolation in concurrent programs, In ASPLOS'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Trans. Comp. Sys., 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Vaziri, F. Tip and J. Dolby. Associating Synchronization Constraints with Data in an Object-Oriented Language. In POPL'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. L. Wang and S. D. Stoller. Accurate and Efficient Runtime Detection of Atomicity Errors in Concurrent Programs. In PPoPP'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Weeratunge, X. Zhang and S. Jagannathan, Analyzing multicore dumps to facilitate concurrency bug reproduction. In ASPLOS'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. D. Weeratunge, X. Zhang and S. Jagannathan, Suppressing Concurrency Bugs Using Scheduler Shepherding Feb. 04, 2011, TR-11-002 http://www.cs.purdue.edu/research/technical_reports/2011/TR%2011-002.pdfGoogle ScholarGoogle Scholar
  33. J. Wu, H. Cui and J. Yang. Bypassing Races in Live Applications with Execution Filters. In OSDI'10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Xu, R. Bodik, and M. D. Hill. A Serializability Violation Detector for Shared-Memory Server Programs. In PLDI'05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. Yu and S. Narayanasamy. A Case for an Interleaving Constrained Shared-Memory Multi-Processor. In ISCA'09. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Accentuating the positive: atomicity inference and enforcement using correct executions

        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

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 46, Issue 10
          OOPSLA '11
          October 2011
          1063 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2076021
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
            October 2011
            1104 pages
            ISBN:9781450309400
            DOI:10.1145/2048066

          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: 22 October 2011

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader