skip to main content
research-article

Testing atomicity of composed concurrent operations

Published:22 October 2011Publication History
Skip Abstract Section

Abstract

We address the problem of testing atomicity of composed concurrent operations. Concurrent libraries help programmers exploit parallel hardware by providing scalable concurrent operations with the illusion that each operation is executed atomically. However, client code often needs to compose atomic operations in such a way that the resulting composite operation is also atomic while preserving scalability. We present a novel technique for testing the atomicity of client code composing scalable concurrent operations. The challenge in testing this kind of client code is that a bug may occur very rarely and only on a particular interleaving with a specific thread configuration. Our technique is based on modular testing of client code in the presence of an adversarial environment; we use commutativity specifications to drastically reduce the number of executions explored to detect a bug. We implemented our approach in a tool called COLT, and evaluated its effectiveness on a range of 51 real-world concurrent Java programs. Using COLT, we found 56 atomicity violations in Apache Tomcat, Cassandra, MyFaces Trinidad, and other applications.

References

  1. Amino concurrent building blocks. \\http://amino-cbbs.sourceforge.net/.Google ScholarGoogle Scholar
  2. Apache tomcat. http://tomcat.apache.org/.Google ScholarGoogle Scholar
  3. Intel thread building blocks. http://www.threadingbuildingblocks.org/.Google ScholarGoogle Scholar
  4. openjdk. http://hg.openjdk.java.net/jdk7/jaxp/jdk.Google ScholarGoogle Scholar
  5. Amit, D., Rinetzky, N., Reps, T. W., Sagiv, M., and Yahav, E. Comparison under abstraction for verifying linearizability. In CAV (2007), pp. 477--490. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Ball, T., Burckhardt, S., Coons, K. E., Musuvathi, M., and Qadeer, S. Preemption sealing for efficient concurrency testing. In TACAS (2010), pp. 420--434. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bernstein, P. A., Hadzilacos, V., and Goodman, N. Concurrency Control and Recovery in Database Systems. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Burckhardt, S., Dern, C., Musuvathi, M., and Tan, R. Line-up: a complete and automatic linearizability checker. In PLDI (2010), pp. 330--340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Clarke, Jr., E. Synthesis of resource invariants for concurrent programs. TOPLAS 2, 3 (1980), 338--358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Coons, K. E., Burckhardt, S., and Musuvathi, M. GAMBIT: effective unit testing for concurrency libraries. In PPOPP (2010), pp. 15--24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Doherty, S., Detlefs, D. L., Groves, L., Flood, C. H., Luchangco, V., Martin, P. A., Moir, M., Shavit, N., and Guy L. Steele, J. DCAS is not a silver bullet for nonblocking algorithm design. In SPAA (2004), pp. 216--224. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Elmas, T., Tasiran, S., and Qadeer, S. Vyrd: verifying concurrent programs by runtime refinement-violation detection. In PLDI (2005), pp. 27--37. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Filipović, I., O'Hearn, P., Rinetzky, N., and Yang, H. Abstraction for concurrent objects. In ESOP (2009), pp. 252--266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Flanagan, C., and Freund, S. N. Atomizer: A dynamic atomicity checker for multithreaded programs. In POPL (2004), pp. 256--267. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Flanagan, C., Freund, S. N., and Yi, J. Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. In PLDI (2008), pp. 293--303. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Flanagan, C., and Qadeer, S. Thread-modular model checking. In SPIN (2003), pp. 213--224. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Flanagan, C., and Qadeer, S. A type and effect systrm for atomicity. In PLDI (2003), pp. 338--349. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Godefroid, P. Partial-Order Methods for the Verification of Concurrent Systems: An Approach to the State-Explosion Problem. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., and Lea, D. Java Concurrency in Practice. Addison Wesley, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gotsman, A., Berdine, J., Cook, B., and Sagiv, M. Thread-modular shape analysis. In PLDI (2007), pp. 266--277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Herlihy, M. P., and Wing, J. M. Linearizability: a correctness condition for concurrent objects. TOPLAS 12, 3 (1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hoare, C. A. R. Towards a theory of parallel programming. 1972.Google ScholarGoogle Scholar
  23. Jones, C. B. Specification and design of (parallel) programs. 1983.Google ScholarGoogle Scholar
  24. Musuvathi, M., and Qadeer, S. Iterative context bounding for systematic testing of multithreaded programs. In PLDI (2007), pp. 446--455. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P. A., and Neamtiu, I. Finding and reproducing heisenbugs in concurrent programs. In OSDI (2008), pp. 267--280. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Park, C.-S., and Sen, K. Randomized active atomicity violation detection in concurrent programs. In SIGSOFT (2008), pp. 135--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Shavit, N. Data structures in the multicore age. Commun. ACM 54 (March 2011), 76--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Vechev, M., Yahav, E., and Yorsh, G. Experience with model checking linearizability. In SPIN (2009), pp. 261--278. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Weihl, W. E. Commutativity-based concurrency control for abstract data types. IEEE Trans. Computers 37, 12 (1988), 1488--1505. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Testing atomicity of composed concurrent operations

        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 46, Issue 10
          OOPSLA '11
          October 2011
          1063 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2076021
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
            October 2011
            1104 pages
            ISBN:9781450309400
            DOI:10.1145/2048066

          Copyright © 2011 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 22 October 2011

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!