Abstract
Along with the prevalence of multi-threaded programs, concurrency bugs have become one of the most important sources of software bugs. Even worse, due to the non-deterministic nature of concurrency bugs, these bugs are both difficult to detect and fix even after the detection. As a result, it is highly desired to develop an all-around approach that is able to not only detect them during the testing phase but also tolerate undetected bugs during production runs. However, existing bug-detecting and bug-tolerating tools are usually either<italic>1)</italic>constrained in types of bugs they can handle or<italic>2)</italic>requiring specific hardware supports for achieving an acceptable overhead. In this paper, we present a novel program invariant, name Anticipating Invariant (<sc>Ai</sc>), that can detect most types of concurrency bugs. More importantly,<sc>Ai</sc>can be used to anticipate many concurrency bugs before any irreversible changes have been made. Thus it enables us to develop a software-only system that is able to forestall failures with a simple thread stalling technique, which does not rely on execution roll-back and hence has good performance. Experiments with 35 real-world concurrency bugs demonstrate that<sc>Ai</sc>is capable of detecting and tolerating many important types of concurrency bugs, including both atomicity and order violations. It has also exposed two new bugs (confirmed by developers) that were never reported before in the literature. Performance evaluation with 6 representative parallel programs shows that<sc>Ai</sc>incurs negligible overhead (<inline-formula><tex-math notation="LaTeX">$ < 1\%$</tex-math><alternatives><inline-graphic xlink:href="wu-ieq1-2531666.gif" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink"/></alternatives></inline-formula>) for many nontrivial desktop and server applications.
Description
A Lightweight System for Detecting and Tolerating Concurrency Bugs - IEEE Journals & Magazine
Links and resources
Tags