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 language | English |
|---|---|
| Title of host publication | 22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Proceedings |
| Publisher | Association for Computing Machinery |
| Pages | 318-329 |
| Number of pages | 12 |
| ISBN (Electronic) | 9781450330565 |
| DOIs | |
| Publication status | Published - 16 Nov 2014 |
| Event | 22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Hong Kong, China Duration: 16 Nov 2014 → 21 Nov 2014 |
Publication series
| Name | Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering |
|---|---|
| Volume | 16-21-November-2014 |
Conference
| Conference | 22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 |
|---|---|
| Country/Territory | China |
| City | Hong Kong |
| Period | 16/11/14 → 21/11/14 |
Bibliographical note
Publisher Copyright:Copyright 2014 ACM.
Keywords
- Concurrency bugs
- Context-aware fixing