skip to main content
research-article

Flint: fixing linearizability violations

Authors Info & Claims
Published:15 October 2014Publication History
Skip Abstract Section

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

Index Terms

  1. Flint: fixing linearizability violations

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • 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

        Copyright © 2014 ACM

        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

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader