skip to main content
research-article

Input-covering schedules for multithreaded programs

Published:29 October 2013Publication History
Skip Abstract Section

Abstract

We propose constraining multithreaded execution to small sets of input-covering schedules, which we define as follows: given a program P, we say that a set of schedules ∑ covers all inputs of program P if, when given any input, P's execution can be constrained to some schedule in ∑ and still produce a semantically valid result.

Our approach is to first compute a small ∑ for a given program P, and then, at runtime, constrain P's execution to always follow some schedule in ∑, and never deviate. We have designed an algorithm that uses symbolic execution to systematically enumerate a set of input-covering schedules, ∑. To deal with programs that run for an unbounded length of time, we partition execution into bounded epochs, find input-covering schedules for each epoch in isolation, and then piece the schedules together at runtime. We have implemented this algorithm along with a constrained execution runtime for pthreads programs, and we report results

Our approach has the following advantage: because all possible runtime schedules are known a priori, we can seek to validate the program by thoroughly verifying each schedule in ∑, in isolation, without needing to reason about the huge space of thread interleavings that arises due to conventional nondeterministic execution.

References

  1. A. Aiken and D. Gay. Barrier Inference. In POPL, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Anand, C. S. Păsăreanu, and W. Visser. Symbolic Execution with Abstract Subsumption Checking. In SPIN, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Bergan, J. Devietti, N. Hunt, and L. Ceze. The Deterministic Execution Hammer: How Well Does it Actually Pound Nails? In Workshop on Determinism and Correctness in Parallel Programming (WoDet), 2011.Google ScholarGoogle Scholar
  4. T. Bergan, D. Grossman, and L. Ceze. Symbolic Execution of Multithreaded Programs from Arbitrary Program Contexts. Technical Report UW-CSE-13-08-01, Univ. of Washington.Google ScholarGoogle Scholar
  5. T. Bergan, N. Hunt, L. Ceze, and S. Gribble. Deterministic Process Groups in dOS. In OSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. D. Bond and K. S. McKinley. Probabilistic Calling Context. In OOPSLA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Bucur, V. Ureche, C. Zamfir, and G. Candea. Parallel Symbolic Execution for Automated Real-World Software Testing. In EuroSys, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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
  9. C. Cadar, D. Dunbar, and D. Engler. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Costa, M. Castro, L. Zhou, L. Zhang, and M. Peinado. Bouncer: Securing Software by Blocking Bad Input. In SOSP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Cui, J. Wu, C. che Tsai, and J. Yang. Stable Deterministic Multithreading Through Schedule Memoization. In OSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. Cui, J. Wu, J. Gallagher, H. Guo, and J. Yang. Efficient Deterministic Multithreading through Schedule Relaxation. In SOSP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. L. Effinger-Dean, H.-J. Boehm, P. Joisha, and D. Chakrabarti. Extended Sequential Reasoning for Data-Race-Free Programs. In Workshop on Memory Systems Performance and Correctness (MSPC), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Flanagan and P. Godefroid. Dynamic Partial-Order Reduction for Model Checking Software. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. V. Ganesh and D. L. Dill. A Decision Procedure for Bit-vectors and Arrays. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Godefroid. Compositional Dynamic Test Generation. In POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Godefroid. Higher-Order Test Generation. In PLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. Godefroid and D. Luchaup. Automatic Partial Loop Summarization in Dynamic Test Generation. In ISSTA, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Hansen, P. Schachte, and H. Sondergaard. State Joining and Splitting for the Symbolic Execution of Binaries. In Intl. Conf. on Runtime Verification (RV), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V. Kahlon, C. Wang, and A. Gupta. Monotonic Partial Order Reduction: An Optimal Symbolic Partial Order Reduction Technique. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Kuznetsov, J. Kinder, S. Bucur, and G. Candea. Efficient State Merging in Symbolic Execution. In PLDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. La Torre, P. Madhusudan, and G. Parlato. Context-Bounded Analysis of Concurrent Queue Systems. In TACAS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. La Torre, P. Madhusudan, and G. Parlato. Reducing Context-Bounded Concurrent Reachability to Sequential Reachability. In CAV, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. O. Laadan, N. Viennot, and J. Nieh. Transparent, Lightweight Application Execution Replay on Commodity Multiprocessor Operating Systems. In SIGMETRICS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Lal and T. Reps. Reducing Concurrent Analysis Under a Context Bound to Sequential Analysis. In CAV, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21(7), July 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Lattner. Macroscopic Data Structure Analysis and Optimization. PhD thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Y. A. Liu and S. D. Stoller. From Recursion to Iteration: What are the Optimizations? In PEPM, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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
  30. B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-Aid: Detecting and Surviving Atomicity Violations. In ISCA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Musuvathi and S. Qadeer. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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
  33. G. Naumovich, G. S. Avrunin, and L. A. Clarke. An Efficient Algorithm for Computing MHP Information for Concurrent Java Programs. In FSE, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient Deterministic Multithreading in Software. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing Atomicity Violation Bugs from their Hiding Places. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. S. Qadeer and D. Wu. KISS: Keep It Simple and Sequential. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Rinard. Analysis of Multithreaded Programs. In Static Analysis Symposium (SAS), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Tobin-Hochstadt and D. Van Horn. Higher-Order Symbolic Execution via Contracts. In OOPSLA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. J. Wu, Y. Tang, G. Hu, H. Cui, and J. Yang. Sound and Precise Analysis of Parallel Programs through Schedule Specialization. In PLDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. Xu, M. Hill, and R. Bodik. A Regulated Transitive Reduction for Longer Memory Race Recording. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. J. Yang, H. Cui, and J. Wu. Determinism Is Overrated: What Really Makes Multithreaded Programs Hard to Get Right and What Can Be Done About It. In HotPar, 2013.Google ScholarGoogle Scholar
  42. Y. Zhang and E. Duesterwald. Barrier Matching for Programs With Textually Unaligned Barriers. In PPoPP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Input-covering schedules for multithreaded programs

        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 48, Issue 10
          OOPSLA '13
          October 2013
          867 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2544173
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
            October 2013
            904 pages
            ISBN:9781450323741
            DOI:10.1145/2509136

          Copyright © 2013 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 October 2013

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!