Document Open Access Logo

Automated Detection of Serializability Violations Under Weak Consistency

Authors Kartik Nagar, Suresh Jagannathan



PDF
Thumbnail PDF

File

LIPIcs.CONCUR.2018.41.pdf
  • Filesize: 0.59 MB
  • 18 pages

Document Identifiers

Author Details

Kartik Nagar
  • Purdue University, USA
Suresh Jagannathan
  • Purdue University, USA

Cite AsGet BibTex

Kartik Nagar and Suresh Jagannathan. Automated Detection of Serializability Violations Under Weak Consistency. In 29th International Conference on Concurrency Theory (CONCUR 2018). Leibniz International Proceedings in Informatics (LIPIcs), Volume 118, pp. 41:1-41:18, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2018)
https://doi.org/10.4230/LIPIcs.CONCUR.2018.41

Abstract

While a number of weak consistency mechanisms have been developed in recent years to improve performance and ensure availability in distributed, replicated systems, ensuring the correctness of transactional applications running on top of such systems remains a difficult and important problem. Serializability is a well-understood correctness criterion for transactional programs; understanding whether applications are serializable when executed in a weakly-consistent environment, however remains a challenging exercise. In this work, we combine a dependency graph-based characterization of serializability and leverage the framework of abstract executions to develop a fully-automated approach for statically finding bounded serializability violations under any weak consistency model. We reduce the problem of serializability to satisfiability of a formula in First-Order Logic (FOL), which allows us to harness the power of existing SMT solvers. We provide rules to automatically construct the FOL encoding from programs written in SQL (allowing loops and conditionals) and express consistency specifications as FOL formula. In addition to detecting bounded serializability violations, we also provide two orthogonal schemes to reason about unbounded executions by providing sufficient conditions (again, in the form of FOL formulae) whose satisfiability implies the absence of anomalies in any arbitrary execution. We have applied the proposed technique on TPC-C, a real-world database program with complex application logic, and were able to discover anomalies under Parallel Snapshot Isolation (PSI), and verify serializability for unbounded executions under Snapshot Isolation (SI), two consistency mechanisms substantially weaker than serializability.

Subject Classification

ACM Subject Classification
  • Theory of computation → Automated reasoning
Keywords
  • Weak Consistency
  • Serializability
  • Database Applications

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Tpc-c benchmark. http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-c_v5.11.0.pdf. Online; Accessed 20 April 2018.
  2. Atul Adya, Barbara Liskov, and Patrick E. O'Neil. Generalized isolation level definitions. In Proceedings of the 16th International Conference on Data Engineering, San Diego, California, USA, February 28 - March 3, 2000, pages 67-78, 2000. URL: http://dx.doi.org/10.1109/ICDE.2000.839388.
  3. Peter Bailis, Alan Fekete, Ali Ghodsi, Joseph M. Hellerstein, and Ion Stoica. Scalable atomic visibility with RAMP transactions. ACM Trans. Database Syst., 41(3):15:1-15:45, 2016. URL: http://dx.doi.org/10.1145/2909870.
  4. Hal Berenson, Philip A. Bernstein, Jim Gray, Jim Melton, Elizabeth J. O'Neil, and Patrick E. O'Neil. A critique of ANSI SQL isolation levels. In Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data, San Jose, California, May 22-25, 1995., pages 1-10, 1995. URL: http://dx.doi.org/10.1145/223784.223785.
  5. Giovanni Bernardi and Alexey Gotsman. Robustness against consistency models with atomic visibility. In 27th International Conference on Concurrency Theory, CONCUR 2016, August 23-26, 2016, Québec City, Canada, pages 7:1-7:15, 2016. URL: http://dx.doi.org/10.4230/LIPIcs.CONCUR.2016.7.
  6. Philip A. Bernstein, Vassco Hadzilacos, and Nathan Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1987. Google Scholar
  7. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin T. Vechev. Serializability for eventual consistency: criterion, analysis, and applications. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017, pages 458-472, 2017. URL: http://dl.acm.org/citation.cfm?id=3009895.
  8. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin T. Vechev. Static serializability analysis for causal consistency. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018, pages 90-104, 2018. URL: http://dx.doi.org/10.1145/3192366.3192415.
  9. Sebastian Burckhardt, Daan Leijen, Manuel Fähndrich, and Mooly Sagiv. Eventually consistent transactions. In Programming Languages and Systems - 21st European Symposium on Programming, ESOP 2012, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24 - April 1, 2012. Proceedings, pages 67-86, 2012. URL: http://dx.doi.org/10.1007/978-3-642-28869-2_4.
  10. Sebastian Burckhardt, Daan Leijen, Jonathan Protzenko, and Manuel Fähndrich. Global sequence protocol: A robust abstraction for replicated shared state. In 29th European Conference on Object-Oriented Programming, ECOOP 2015, July 5-10, 2015, Prague, Czech Republic, pages 568-590, 2015. URL: http://dx.doi.org/10.4230/LIPIcs.ECOOP.2015.568.
  11. Michael J. Cahill, Uwe Röhm, and Alan David Fekete. Serializable isolation for snapshot databases. ACM Trans. Database Syst., 34(4):20:1-20:42, 2009. URL: http://dx.doi.org/10.1145/1620585.1620587.
  12. Andrea Cerone, Giovanni Bernardi, and Alexey Gotsman. A framework for transactional consistency models with atomic visibility. In 26th International Conference on Concurrency Theory, CONCUR 2015, Madrid, Spain, September 1.4, 2015, pages 58-71, 2015. URL: http://dx.doi.org/10.4230/LIPIcs.CONCUR.2015.58.
  13. Andrea Cerone and Alexey Gotsman. Analysing snapshot isolation. In Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing, PODC 2016, Chicago, IL, USA, July 25-28, 2016, pages 55-64, 2016. URL: http://dx.doi.org/10.1145/2933057.2933096.
  14. Andrea Cerone, Alexey Gotsman, and Hongseok Yang. Algebraic laws for weak consistency. In 28th International Conference on Concurrency Theory, CONCUR 2017, September 5-8, 2017, Berlin, Germany, pages 26:1-26:18, 2017. URL: http://dx.doi.org/10.4230/LIPIcs.CONCUR.2017.26.
  15. Natacha Crooks, Youer Pu, Lorenzo Alvisi, and Allen Clement. Seeing is believing: A client-centric specification of database isolation. In Proceedings of the ACM Symposium on Principles of Distributed Computing, PODC 2017, Washington, DC, USA, July 25-27, 2017, pages 73-82, 2017. URL: http://dx.doi.org/10.1145/3087801.3087802.
  16. Alan Fekete. Allocating isolation levels to transactions. In Proceedings of the Twenty-fourth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, June 13-15, 2005, Baltimore, Maryland, USA, pages 206-215, 2005. URL: http://dx.doi.org/10.1145/1065167.1065193.
  17. Alan Fekete, Dimitrios Liarokapis, Elizabeth J. O'Neil, and Patrick E. O'Neil a fnd Dennis E. Shasha. Making snapshot isolation serializable. ACM Trans. Database Syst., 30(2):492-528, 2005. URL: http://dx.doi.org/10.1145/1071610.1071615.
  18. Seth Gilbert and Nancy A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News, 33(2):51-59, 2002. URL: http://dx.doi.org/10.1145/564585.564601.
  19. Alexey Gotsman, Hongseok Yang, Carla Ferreira, Mahsa Najafzadeh, and Marc Shapiro. 'cause i'm strong enough: reasoning about consistency choices in distributed systems. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20 - 22, 2016, pages 371-384, 2016. URL: http://dx.doi.org/10.1145/2837614.2837625.
  20. Sudhir Jorwekar, Alan Fekete, Krithi Ramamritham, and S. Sudarshan. Automating the detection of snapshot isolation anomalies. In Proceedings of the 33rd International Conference on Very Large Data Bases, University of Vienna, Austria, September 23-27, 2007, pages 1263-1274, 2007. URL: http://www.vldb.org/conf/2007/papers/industrial/p1263-jorwekar.pdf.
  21. Gowtham Kaki, Kartik Nagar, Mahsa Najafzadeh, and Suresh Jagannathan. Alone together: compositional reasoning and inference for weak isolation. PACMPL, 2(POPL):27:1-27:34, 2018. URL: http://dx.doi.org/10.1145/3158115.
  22. Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, and David G. Andersen. Don't settle for eventual: scalable causal consistency for wide-area storage with COPS. In Proceedings of the 23rd ACM Symposium on Operating Systems Principles 2011, SOSP 2011, Cascais, Portugal, October 23-26, 2011, pages 401-416, 2011. URL: http://dx.doi.org/10.1145/2043556.2043593.
  23. Madan Musuvathi. Systematic concurrency testing using CHESS. In Proceedings of the 6th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging, held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2008), PADTAD 2008, Seattle, Washington, USA, July 20-21, 2008, page 10, 2008. URL: http://dx.doi.org/10.1145/1390841.1390851.
  24. Kartik Nagar and Suresh Jagannathan. Automated Detection of Serializability Violations under Weak Consistency (Extended Version). URL: http://arxiv.org/abs/1806.08416.
  25. K. C. Sivaramakrishnan, Gowtham Kaki, and Suresh Jagannathan. Declarative programming over eventually consistent data stores. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Portland, OR, USA, June 15-17, 2015, pages 413-424, 2015. URL: http://dx.doi.org/10.1145/2737924.2737981.
  26. Yair Sovran, Russell Power, Marcos K. Aguilera, and Jinyang Li. Transactional storage for geo-replicated systems. In Proceedings of the 23rd ACM Symposium on Operating Systems Principles 2011, SOSP 2011, Cascais, Portugal, October 23-26, 2011, pages 385-400, 2011. URL: http://dx.doi.org/10.1145/2043556.2043592.
  27. Douglas B. Terry, Vijayan Prabhakaran, Ramakrishna Kotla, Mahesh Balakrishnan, Marcos K. Aguilera, and Hussam Abu-Libdeh. Consistency-based service level agreements for cloud storage. In ACM SIGOPS 24th Symposium on Operating Systems Principles, SOSP 13, Farmington, PA, USA, November 3-6, 2013, pages 309-324, 2013. URL: http://dx.doi.org/10.1145/2517349.2522731.
  28. Todd Warszawski and Peter Bailis. Acidrain: Concurrency-related attacks on database-backed web applications. In Proceedings of the 2017 ACM International Conference on Management of Data, SIGMOD Conference 2017, Chicago, IL, USA, May 14-19, 2017, pages 5-20, 2017. URL: http://dx.doi.org/10.1145/3035918.3064037.
  29. Kamal Zellag and Bettina Kemme. Consistency anomalies in multi-tier architectures: automatic detection and prevention. VLDB J., 23(1):147-172, 2014. URL: http://dx.doi.org/10.1007/s00778-013-0318-x.
  30. Yang Zhang, Russell Power, Siyuan Zhou, Yair Sovran, Marcos K. Aguilera, and Jinyang Li. Transaction chains: achieving serializability with low latency in geo-distributed storage systems. In ACM SIGOPS 24th Symposium on Operating Systems Principles, SOSP '13, Farmington, PA, USA, November 3-6, 2013, pages 276-291, 2013. URL: http://dx.doi.org/10.1145/2517349.2522729.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail