Efficient dynamic verification of concurrent programs

  • Authors:
  • Yu Yang

  • Affiliations:
  • The University of Utah

  • Venue:
  • Efficient dynamic verification of concurrent programs
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Revealing concurrency errors in multithreaded programs is difficult. Many "unexpected" thread interactions can only be manifested with intricate low probability event sequences. As a result, they often escape conventional testing, and manifest years after code deployment. Dynamic verification methods have proven promising for revealing errors in the implementation of real world concurrent programs. They work on real applications and libraries, and side-step the high complexity of model construction and state capture by concretely executing programs, and replaying the executions for covering the different thread interleavings. However, with the increase of the program size, the state space—specifically the number of schedules—of a concurrent program grows exponentially. To solve this problem and make dynamic verification be applicable to general concurrent programs, we make the following contributions. First, we propose a family of algorithms for reducing the search spaces of concurrent programs for dynamic verification. The first algorithm is stateful dynamic partial order reduction, which detects visited states by capturing the states of multithreaded programs in concrete executions in a light-weight way. The second algorithm is property-driven pruning, which infers properties of a subspace by exploring only part of the subspace. The third algorithm is automatic symmetry discovery, which reveals symmetry in multithreaded programs using dynamic program analysis. The fourth algorithm is distributed dynamic partial order reduction, which uses computer clusters to speed up the search and at the same time still get the benefit of dynamic partial order reduction. Second, we built Inspect, a framework for dynamic verification of multithreaded C programs. Inspect is able to either expose concurrency bugs inside a multithreaded program, or guarantee that the program is free from concurrency errors under the specific test harnesses. Inspect combines program analysis, program instrumentation and dynamic model checking in a unique way to realize efficient dynamic verification. We have implemented our efficient dynamic verification algorithms in Inspect and applied Inspect to examine realistic multithreaded applications. The experiments show that our algorithms can significantly reduce the time to verify realistic multithreaded applications while guaranteeing completeness and soundness.