Kivati: fast detection and prevention of atomicity violations

  • Authors:
  • Lee Chew;David Lie

  • Affiliations:
  • University of Toronto, Toronto, ON, Canada;University of Toronto, Toronto, ON, Canada

  • Venue:
  • Proceedings of the 5th European conference on Computer systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Bugs in concurrent programs are extremely difficult to find and fix during testing. In this paper, we propose Kivati, which can efficiently detect and prevent atomicity violation bugs. Kivati imposes an average run-time overhead of 19%, which makes it practical to deploy on software in production environments. The key attribute that allows Kivati to impose this low overhead is its use of hardware watchpoints, which can be found on most commodity processors. Kivati combines watchpoints with a simple static analysis that annotates regions of codes that likely need to be executed atomically. The watchpoints are then used to monitor these regions for interleaving accesses that may lead to an atomicity violation. When an atomicity violation is detected, Kivati dynamically reorders the access to prevent the violation from occurring. Kivati can be run in prevention mode, which optimizes for performance, or in bug-finding mode, which trades some performance for an enhanced ability to find bugs. We implement and evaluate a prototype of Kivati that protects applications written in C on Linux/x86 platforms. We find that Kivati is able to detect and prevent atomicity violation bugs in real applications, and imposes very reasonable overheads when doing so.