Systematic testing of our concurrency primitives #6957
Labels
A-concurrency
Area: Concurrency
A-runtime
Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
A-testsuite
Area: The testsuite used to check the correctness of rustc
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
@brson and I were talking about different strategies for verifying our concurrency primitives (task spawn/scheduling, pipes, arcs), specifically wondering if the technique I work on during my "day job" (i.e. grad student) could be applied.
In short, systematic testing means exploring the state space of possible test executions that can result from different thread interleavings. This depends on a notion of decision points, which are code locations where the testing framework "should try" to force threads to interleave in different ways. The set of decision points defines an execution tree which represents the state space (size = {number of threads}^{number of decision points}). If there is a bug in some branches of the tree, but not others, that bug is a race condition.
Though my research focuses on kernel-level testing, a colleague of mine at CMU has developed a tool for doing the same thing on userspace programs, called dBug (http://www.cs.cmu.edu/~jsimsa/dbug/). It uses LD_PRELOAD to interpose on library calls, such as pthread operations and file I/O.
There are two points which need consideration before introducing dBug and Rust to each other:
The text was updated successfully, but these errors were encountered: