A trace simplification technique for effective debugging of concurrent programs

  • Authors:
  • Nicholas Jalbert;Koushik Sen

  • Affiliations:
  • UC Berkeley, Berkeley, CA, USA;UC Berkeley, Berkeley, CA, USA

  • Venue:
  • Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Concurrent programs are notoriously difficult to debug. We see two main reasons for this: 1) concurrency bugs are often difficult to reproduce, 2) traces of buggy concurrent executions can be complicated by fine-grained thread interleavings. Recently, a number of efficient techniques have tried to address the former reproducibility problem; however, there is no effective solution for the latter trace simplification problem. In this paper, we formalize and prove the trace simplification problem is NP-hard. We then propose a heuristic algorithm, Tinertia, that transforms a buggy execution trace into an easier-to-understand simplified trace. Tinertia works by automatically and iteratively increasing the granularity of the thread interleavings in the buggy trace. Tinertia cannot guarantee optimal simplification; however, we empirically show that our algorithm often generates optimally simplified traces. Moreover, we show that in the simplified trace, the locations of preemptive context switches point to the cause of the bug. We have implemented Tinertia in a tool for C/C++ programs using Pthreads and applied it to 11 benchmarks with up to 37,000 lines of code.