Grail: Context-aware fixing of concurrency bugs

Peng Liu, Omer Tripp, Charles Zhang

Research output: Chapter in Book/Conference Proceeding/ReportConference Paper published in a bookpeer-review

47 Citations (Scopus)

Abstract

Writing efficient synchronization for multithreaded programs is notoriously hard. The resulting code often contains subtle concurrency bugs. Even worse, many bug fixes introduce new bugs. A classic example, seen widely in practice, is deadlocks resulting from fixing of an atomicity violation. These complexities have motivated the development of automated fixing techniques. Current techniques generate fixes that are typically conservative, giving up on available parallelism. Moreover, some of the techniques cannot guarantee the correctness of a fix, and may introduce deadlocks similarly to manual fix, whereas techniques that ensure correctness do so at the expense of even greater performance loss. We present Grail, a novel fixing algorithm that departs from previous techniques by simultaneously providing both correctness and optimality guarantees. Grail synthesizes bugfree yet optimal lock-based synchronization. To achieve this, Grail builds an analysis model of the buggy code that is both contextual, distinguishing different aliasing contexts to ensure efficiency, and global, accounting for the entire synchronization behavior of the involved threads to ensure correctness. Evaluation of Grail on 12 bugs from popular codebases confirms its practical advantages, especially compared with existing techniques: Grail patches are, in general, ≥ 40% more efficient than the patches produced by other techniques, and incur only 2% overhead.

Original languageEnglish
Title of host publication22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Proceedings
PublisherAssociation for Computing Machinery
Pages318-329
Number of pages12
ISBN (Electronic)9781450330565
DOIs
Publication statusPublished - 16 Nov 2014
Event22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Hong Kong, China
Duration: 16 Nov 201421 Nov 2014

Publication series

NameProceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering
Volume16-21-November-2014

Conference

Conference22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014
Country/TerritoryChina
CityHong Kong
Period16/11/1421/11/14

Bibliographical note

Publisher Copyright:
Copyright 2014 ACM.

Keywords

  • Concurrency bugs
  • Context-aware fixing

Fingerprint

Dive into the research topics of 'Grail: Context-aware fixing of concurrency bugs'. Together they form a unique fingerprint.

Cite this