Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

Flint: fixing linearizability violations

Published: 15 October 2014 Publication History

Abstract

Writing concurrent software while achieving both correctness and efficiency is a grand challenge. To facilitate this task, concurrent data structures have been introduced into the standard library of popular languages like Java and C#. Unfortunately, while the operations exposed by concurrent data structures are atomic (or linearizable), compositions of these operations are not necessarily atomic. Recent studies have found many erroneous implementations of composed concurrent operations.
We address the problem of fixing nonlinearizable composed operations such that they behave atomically. We introduce Flint, an automated fixing algorithm for composed Map operations. Flint accepts as input a composed operation suffering from atomicity violations. Its output, if fixing succeeds, is a composed operation that behaves equivalently to the original operation in sequential runs and is guaranteed to be atomic. To our knowledge, Flint is the first general algorithm for fixing incorrect concurrent compositions.
We have evaluated Flint on 48 incorrect compositions from 27 popular applications, including Tomcat and MyFaces. The results are highly encouraging: Flint is able to correct 96% of the methods, and the fixed version is often the same as the fix by an expert programmer and as efficient as the original code.

References

[1]
A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools (Second Edition). Addison-Wesley Longman Publishing Co., Inc., 2006.
[2]
A. W. Appel and J. Palsberg. Modern Compiler Implementation in Java (Second Edition). Cambridge University Press, 2002.
[3]
S. Burckhardt, C. Dern, M. Musuvathi, and R. Tan. Line-up: a complete and automatic linearizability checker. In PLDI, 2010.
[4]
L. Chew and D. Lie. Kivati: Fast detection and prevention of atomicity violations. In EuroSys, 2010.
[5]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and K. F. Zadeck. Efficiently computing static single assignment form and the control dependence graph. TOPLAS, 1991.
[6]
D. Dice, O. Shalev, and N. Shavit. Transactional locking ii. In DISC, 2006.
[7]
G. Golan-Gueta, G. Ramalingam, M. Sagiv, and E. Yahav. Concurrent libraries with foresight. In PLDI, 2013.
[8]
P. Hawkins, A. Aiken, K. Fisher, M. Rinard, and M. Sagiv. Concurrent data representation synthesis. In PLDI, 2012.
[9]
M. Herlihy and E. Koskinen. Transactional boosting: a methodology for highly-concurrent transactional objects. In PPoPP, 2008.
[10]
M. Herlihy, V. Luchangco, and M. Moir. A flexible framework for implementing software transactional memory. In OOPSLA '06.
[11]
M. P. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. TOPLAS, 1990.
[12]
G. Jin, L. Song, W. Zhang, S. Lu, and B. Liblit. Automated atomicity-violation fixing. In PLDI, 2011.
[13]
G. A. Kildall. A unified approach to global program optimization. In POPL, 1973.
[14]
M. Kulkarni, D. Nguyen, D. Prountzos, X. Sui, and K. Pingali. Exploiting the commutativity lattice. In PLDI, 2011.
[15]
H. T. Kung and J. T. Robinson. On optimistic methods for concurrency control. TODS, 1981.
[16]
Y. Lin and D. Dig. Check-then-act misuse of java concurrent collections. In ICST, pages 164--173, 2013.
[17]
P. Liu, J. Dolby, and C. Zhang. Finding incorrect compositions of atomicity. In ESEC/FSE, 2013.
[18]
P. Liu and C. Zhang. Axis: automatically fixing atomicity violations through solving control constraints. In ICSE '12.
[19]
B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-aid: Detecting and surviving atomicity violations. In ISCA, 2008.
[20]
D. Prountzos, R. Manevich, K. Pingali, and K. S. McKinley. A shape analysis for optimizing parallel graph programs. In POPL, 2011.
[21]
S. Rajamani, G. Ramalingam, V. P. Ranganath, and K. Vaswani. Isolator: dynamically ensuring isolation in concurrent programs. In ASPLOS, 2009.
[22]
P. Ratanaworabhan, M. Burtscher, D. Kirovski, B. G. Zorn, R. Nagpal, and K. Pattabiraman. Detecting and tolerating asymmetric races. In PPOPP, 2009.
[23]
M. Sch\"afer, M. Verbaere, T. Ekman, and O. Moor. Stepping stones over the refactoring rubicon. In ECOOP, 2009.
[24]
O. Shacham. Verifying Atomicity of Composed Concurrent Operations. PhD thesis, Tel Aviv University, 2012.
[25]
O. Shacham, N. G. Bronson, A. Aiken, M. Sagiv, M. T. Vechev, and E. Yahav. Testing atomicity of composed concurrent operations. 2011.
[26]
O. Shacham, E. Yahav, G. Gueta, A. Aiken, N. Bronson, M. Sagiv, and M. Vechev. Verifying atomicity via data independence. In ISSTA, 2014.
[27]
N. Shavit. Data structures in the multicore age. CACM, 2011.
[28]
O. Tripp, R. Manevich, J. Field, and M. Sagiv. Janus: exploiting parallelism via hindsight. In PLDI, 2012.
[29]
O. Tripp and N. Rinetzky. Tightfit: Adaptive parallelization with foresight. In ESEC/FSE, 2013.
[30]
O. Tripp, G. Yorsh, J. Field, and M. Sagiv. Hawkeye: effective discovery of dataflow impediments to parallelization. In OOPSLA, 2011.
[31]
P.vCerný, T. A. Henzinger, A. Radhakrishna, L. Ryzhyk, and T. Tarrach. Efficient synthesis for concurrency by semantics-preserving transformations. In CAV, 2013.
[32]
M. T. Vechev and E. Yahav. Deriving linearizable fine-grained concurrent objects. In PLDI, 2008.
[33]
D. Weeratunge, X. Zhang, and S. Jaganathan. Accentuating the positive: Atomicity inference and enforcement using correct executions. In OOPSLA, 2011.
[34]
J. Yu and S. Narayanasamy. Tolerating concurrency bugs using transactions as lifeguards. In MICRO, 2010.
[35]
W. Zhang, M. de Kruijf, A. Li, S. Lu, and K. Sankaralingam. Conair: Featherweight concurrency bug recovery via single-threaded idempotent execution. In ASPLOS, 2013.

Cited By

View all
  • (2023)Efficient linearizability checking for actor‐based systemsSoftware: Practice and Experience10.1002/spe.325153:11(2163-2199)Online publication date: 22-Aug-2023
  • (2022)CODIT: Code Editing With Tree-Based Neural ModelsIEEE Transactions on Software Engineering10.1109/TSE.2020.302050248:4(1385-1399)Online publication date: 1-Apr-2022
  • (2018)A systematic survey on automated concurrency bug detection, exposing, avoidance, and fixing techniquesSoftware Quality Journal10.1007/s11219-017-9385-326:3(855-889)Online publication date: 1-Sep-2018
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 10
OOPSLA '14
October 2014
907 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2714064
  • Editor:
  • Andy Gill
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
    October 2014
    946 pages
    ISBN:9781450325851
    DOI:10.1145/2660193
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 October 2014
Published in SIGPLAN Volume 49, Issue 10

Check for updates

Author Tags

  1. atomic compositions
  2. concurrency bug fixing
  3. linearizability violations

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)0
Reflects downloads up to 24 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Efficient linearizability checking for actor‐based systemsSoftware: Practice and Experience10.1002/spe.325153:11(2163-2199)Online publication date: 22-Aug-2023
  • (2022)CODIT: Code Editing With Tree-Based Neural ModelsIEEE Transactions on Software Engineering10.1109/TSE.2020.302050248:4(1385-1399)Online publication date: 1-Apr-2022
  • (2018)A systematic survey on automated concurrency bug detection, exposing, avoidance, and fixing techniquesSoftware Quality Journal10.1007/s11219-017-9385-326:3(855-889)Online publication date: 1-Sep-2018
  • (2017)Automatically diagnosing and repairing error handling bugs in CProceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering10.1145/3106237.3106300(752-762)Online publication date: 21-Aug-2017
  • (2022)C4: verified transactional objectsProceedings of the ACM on Programming Languages10.1145/35273246:OOPSLA1(1-31)Online publication date: 29-Apr-2022
  • (2020)Root Causing Linearizability ViolationsComputer Aided Verification10.1007/978-3-030-53288-8_17(350-375)Online publication date: 14-Jul-2020
  • (2017)Automatically diagnosing and repairing error handling bugs in CProceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering10.1145/3106237.3106300(752-762)Online publication date: 21-Aug-2017
  • (2017)Adaptively generating high quality fixes for atomicity violationsProceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering10.1145/3106237.3106239(303-314)Online publication date: 21-Aug-2017
  • (2016)Understanding and generating high quality patches for concurrency bugsProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering10.1145/2950290.2950309(715-726)Online publication date: 1-Nov-2016
  • (2016)A Lightweight System for Detecting and Tolerating Concurrency BugsIEEE Transactions on Software Engineering10.1109/TSE.2016.253166642:10(899-917)Online publication date: 1-Oct-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media