osdi2008-chess - Finding and Reproducing Heisenbugs in...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Finding and Reproducing Heisenbugs in Concurrent Programs Madanlal Musuvathi Microsoft Research Shaz Qadeer Microsoft Research Thomas Ball Microsoft Research Gerard Basler ETH Zurich Piramanayagam Arumuga Nainar University of Wisconsin, Madison Iulian Neamtiu University of California, Riverside Abstract Concurrency is pervasive in large systems. Unexpected interference among threads often results in “Heisenbugs” that are extremely difficult to reproduce and eliminate. We have implemented a tool called C HESS for finding and reproducing such bugs. When attached to a program, C HESS takes control of thread scheduling and uses ef- ficient search techniques to drive the program through possible thread interleavings. This systematic explo- ration of program behavior enables C HESS to quickly uncover bugs that might otherwise have remained hid- den for a long time. For each bug, C HESS consistently reproduces an erroneous execution manifesting the bug, thereby making it significantly easier to debug the prob- lem. C HESS scales to large concurrent programs and has found numerous bugs in existing systems that had been tested extensively prior to being tested by C HESS . C HESS has been integrated into the test frameworks of many code bases inside Microsoft and is used by testers on a daily basis. 1 Introduction Building concurrent systems is hard. Subtle interactions among threads and the timing of asynchronous events can result in concurrency errors that are hard to find, reproduce, and debug. Stories are legend of so-called “Heisenbugs” [18] that occasionally surface in systems that have otherwise been running reliably for months. Slight changes to a program, such as the addition of debugging statements, sometimes drastically reduce the likelihood of erroneous interleavings, adding frustration to the debugging process. The main contribution of this paper is a new tool called C HESS for systematic and deterministic testing of con- current programs. When attached to a concurrent pro- gram, C HESS takes complete control over the scheduling of threads and asynchronous events, thereby capturing all the interleaving nondeterminism in the program. This provides two important benefits. First, if an execution re- sults in an error, C HESS has the capability to reproduce the erroneous thread interleaving. This substantially im- proves the debugging experience. Second, C HESS uses systematic enumeration techniques [10, 37, 17, 31, 45, 22] to force every run of the program along a differ- ent thread interleaving. Such a systematic exploration greatly increases the chances of finding errors in exist- ing tests. More importantly, there is no longer a need to artificially “stress” the system, such as increasing the number of threads, in order to get interleaving coverage — a common and recommended practice in testing con- current systems. As a result, C HESS can find in simple configurations errors that would otherwise only show up in more complex configurations.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern