Title :
Finding Atomicity-Violation Bugs through Unserializable Interleaving Testing
Author :
Lu, Shan ; Park, Soyeon ; Zhou, Yuanyuan
Author_Institution :
Comput. Sci. Dept., Univ. of Wisconsin- Madison, Madison, WI, USA
Abstract :
Multicore hardware is making concurrent programs pervasive. Unfortunately, concurrent programs are prone to bugs. Among different types of concurrency bugs, atomicity violations are common and important. How to test the interleaving space and expose atomicity-violation bugs is an open problem. This paper makes three contributions. First, it designs and evaluates a hierarchy of four interleaving coverage criteria using 105 real-world concurrency bugs. This study finds a coverage criterion (Unserializable Interleaving Coverage) that balances the complexity and the capability of exposing atomicity-violation bugs well. Second, it studies stress testing to understand why this common practice cannot effectively expose atomicity-violation bugs from the perspective of unserializable interleaving coverage. Third, it designs CTrigger following the unserializable interleaving coverage criterion. CTrigger uses trace analysis to identify feasible unserializable interleavings, and then exercises low-probability interleavings to expose atomicity-violation bugs. We evaluate CTrigger with real-world atomicity-violation bugs from seven applications. CTrigger efficiently exposes these bugs within 1-235 seconds, two to four orders of magnitude faster than stress testing. Without CTrigger, some of these bugs do not manifest even after seven days of stress testing. Furthermore, once a bug is exposed, CTrigger can reliably reproduce it, usually within 5 seconds, for diagnosis.
Keywords :
formal verification; multiprocessing systems; probability; program debugging; ubiquitous computing; concurrency bugs; finding atomicity violation bugs; low probability interleavings; multicore hardware; pervasive concurrent programs; trace analysis; unserializable interleaving coverage; unserializable interleaving testing; Complexity theory; Computer bugs; Concurrent computing; Instruction sets; Stress; Synchronization; Testing; Testing and debugging; bug characteristics; concurrent programming; debugging aids; diagnostics; test coverage of code; testing strategies;
Journal_Title :
Software Engineering, IEEE Transactions on
DOI :
10.1109/TSE.2011.35