Abstract

Concurrency bugs are notoriously hard to detect and reproduce. Controlled concurrency testing (CCT) techniques aim to offer a solution, where a scheduler explores the space of possible interleavings of a concurrent program looking for bugs. Since the set of possible interleavings is typically very large, these schedulers employ heuristics that prioritize the search to “interesting” subspaces. However, current heuristics are typically tuned to specific bug patterns, which limits their effectiveness in practice. In this paper, we present QL, a learning-based CCT framework where the likelihood of an action being selected by the scheduler is influenced by earlier explorations. We leverage the classical Q-learning algorithm to explore the space of possible interleavings, allowing the exploration to adapt to the program under test, unlike previous techniques. We have implemented and evaluated QL on a set of microbenchmarks, complex protocols, as well as production cloud services. In our experiments, we found QL to consistently outperform the state-of-the-art in CCT.

Highlights

  • Testing concurrent programs for defects can be challenging

  • We present QL, a learning-based concurrency testing (CCT) framework where the likelihood of an action being selected by the scheduler is influenced by earlier explorations

  • The main contributions of this paper are as follows: (1) We provide a novel mapping of the problem of testing a program for concurrency bugs onto the general reinforcement learning scenario (Section 4)

Read more

Summary

Introduction

Testing concurrent programs for defects can be challenging. The term Heisenbug has often been used to refer to concurrency bugs because they can be hard to find, diagnose and fix [Gray 1986; Musuvathi et al 2008]. Traditional techniques, such as stress testing, are unable to uncover many concurrency bugs. Such techniques offer little control over orderings among workers, fail to exercise a sufficient number of program behaviors, and are a poor certification for the correctness or reliability of a concurrent program. Concurrent programs often contain insidious defects that remain latent

Objectives
Results
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call