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.
- A. Aiken and D. Gay. Barrier Inference. In POPL, 1998. Google Scholar
Digital Library
- S. Anand, C. S. Păsăreanu, and W. Visser. Symbolic Execution with Abstract Subsumption Checking. In SPIN, 2006. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- T. Bergan, N. Hunt, L. Ceze, and S. Gribble. Deterministic Process Groups in dOS. In OSDI, 2010. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Probabilistic Calling Context. In OOPSLA, 2007. Google Scholar
Digital Library
- S. Bucur, V. Ureche, C. Zamfir, and G. Candea. Parallel Symbolic Execution for Automated Real-World Software Testing. In EuroSys, 2011. Google Scholar
Digital Library
- S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In ASPLOS, 2010. Google Scholar
Digital Library
- C. Cadar, D. Dunbar, and D. Engler. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In OSDI, 2008. Google Scholar
Digital Library
- M. Costa, M. Castro, L. Zhou, L. Zhang, and M. Peinado. Bouncer: Securing Software by Blocking Bad Input. In SOSP, 2007. Google Scholar
Digital Library
- H. Cui, J. Wu, C. che Tsai, and J. Yang. Stable Deterministic Multithreading Through Schedule Memoization. In OSDI, 2010. Google Scholar
Digital Library
- H. Cui, J. Wu, J. Gallagher, H. Guo, and J. Yang. Efficient Deterministic Multithreading through Schedule Relaxation. In SOSP, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- C. Flanagan and P. Godefroid. Dynamic Partial-Order Reduction for Model Checking Software. In POPL, 2005. Google Scholar
Digital Library
- V. Ganesh and D. L. Dill. A Decision Procedure for Bit-vectors and Arrays. In CAV, 2007. Google Scholar
Digital Library
- P. Godefroid. Compositional Dynamic Test Generation. In POPL, 2007. Google Scholar
Digital Library
- P. Godefroid. Higher-Order Test Generation. In PLDI, 2011. Google Scholar
Digital Library
- P. Godefroid and D. Luchaup. Automatic Partial Loop Summarization in Dynamic Test Generation. In ISSTA, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- V. Kahlon, C. Wang, and A. Gupta. Monotonic Partial Order Reduction: An Optimal Symbolic Partial Order Reduction Technique. In CAV, 2007. Google Scholar
Digital Library
- V. Kuznetsov, J. Kinder, S. Bucur, and G. Candea. Efficient State Merging in Symbolic Execution. In PLDI, 2012. Google Scholar
Digital Library
- S. La Torre, P. Madhusudan, and G. Parlato. Context-Bounded Analysis of Concurrent Queue Systems. In TACAS, 2008. Google Scholar
Digital Library
- S. La Torre, P. Madhusudan, and G. Parlato. Reducing Context-Bounded Concurrent Reachability to Sequential Reachability. In CAV, 2009. Google Scholar
Digital Library
- O. Laadan, N. Viennot, and J. Nieh. Transparent, Lightweight Application Execution Replay on Commodity Multiprocessor Operating Systems. In SIGMETRICS, 2010. Google Scholar
Digital Library
- A. Lal and T. Reps. Reducing Concurrent Analysis Under a Context Bound to Sequential Analysis. In CAV, 2008. Google Scholar
Digital Library
- L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21(7), July 1978. Google Scholar
Digital Library
- C. Lattner. Macroscopic Data Structure Analysis and Optimization. PhD thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL, May 2005. Google Scholar
Digital Library
- Y. A. Liu and S. D. Stoller. From Recursion to Iteration: What are the Optimizations? In PEPM, 1999. Google Scholar
Digital Library
- B. Lucia, L. Ceze, and K. Strauss. ColorSafe: Architectural Support for Debugging and Dynamically Avoiding Multi-Variable Atomicity Violations. In ISCA, 2010. Google Scholar
Digital Library
- B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-Aid: Detecting and Surviving Atomicity Violations. In ISCA, 2008. Google Scholar
Digital Library
- M. Musuvathi and S. Qadeer. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In PLDI, 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- G. Naumovich, G. S. Avrunin, and L. A. Clarke. An Efficient Algorithm for Computing MHP Information for Concurrent Java Programs. In FSE, 1999. Google Scholar
Digital Library
- M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient Deterministic Multithreading in Software. In ASPLOS, 2009. Google Scholar
Digital Library
- S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing Atomicity Violation Bugs from their Hiding Places. In ASPLOS, 2009. Google Scholar
Digital Library
- S. Qadeer and D. Wu. KISS: Keep It Simple and Sequential. In PLDI, 2005. Google Scholar
Digital Library
- M. Rinard. Analysis of Multithreaded Programs. In Static Analysis Symposium (SAS), 2001. Google Scholar
Digital Library
- S. Tobin-Hochstadt and D. Van Horn. Higher-Order Symbolic Execution via Contracts. In OOPSLA, 2012. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Xu, M. Hill, and R. Bodik. A Regulated Transitive Reduction for Longer Memory Race Recording. In ASPLOS, 2006. Google Scholar
Digital Library
- 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 Scholar
- Y. Zhang and E. Duesterwald. Barrier Matching for Programs With Textually Unaligned Barriers. In PPoPP, 2007. Google Scholar
Digital Library
Index Terms
Input-covering schedules for multithreaded programs
Recommendations
Input-covering schedules for multithreaded programs
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsWe 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 ...
Symbolic execution of multithreaded programs from arbitrary program contexts
OOPSLA '14We describe an algorithm to perform symbolic execution of a multithreaded program starting from an arbitrary program context. We argue that this can enable more efficient symbolic exploration of deep code paths in multithreaded programs by allowing the ...
Symbolic execution of multithreaded programs from arbitrary program contexts
OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & ApplicationsWe describe an algorithm to perform symbolic execution of a multithreaded program starting from an arbitrary program context. We argue that this can enable more efficient symbolic exploration of deep code paths in multithreaded programs by allowing the ...







Comments