skip to main content
research-article

Finding race conditions in Erlang with QuickCheck and PULSE

Authors Info & Claims
Published:31 August 2009Publication History
Skip Abstract Section

Abstract

We address the problem of testing and debugging concurrent, distributed Erlang applications. In concurrent programs, race conditions are a common class of bugs and are very hard to find in practice. Traditional unit testing is normally unable to help finding all race conditions, because their occurrence depends so much on timing. Therefore, race conditions are often found during system testing, where due to the vast amount of code under test, it is often hard to diagnose the error resulting from race conditions. We present three tools (QuickCheck, PULSE, and a visualizer) that in combination can be used to test and debug concurrent programs in unit testing with a much better possibility of detecting race conditions. We evaluate our method on an industrial concurrent case study and illustrate how we find and analyze the race conditions.

Skip Supplemental Material Section

Supplemental Material

findingraceconditionsinerlangwithquickcheckandpulse.mp4

References

  1. Cyrille Artho, Klaus Havelund, and Shinichi Honiden. Visualization of concurrent program executions. In COMPSAC '07: Proc. of the 31st Annual International Computer Software and Applications Conference, pages 541--546, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Thomas Arts and Lars-Åke Fredlund. Trace analysis of Erlang programs. SIGPLAN Notices, 37 (12): 18--24, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Thomas Arts, John Hughes, Joakim Johansson, and Ulf Wiger. Testing Telecoms Software with Quviq QuickCheck. In ERLANG '06: Proc. of the 2006 ACM SIGPLAN workshop on Erlang. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Koen Claessen and John Hughes. QuickCheck: a lightweight tool for random testing of Haskell programs. In ICFP '00: Proc. of the fifth ACM SIGPLAN international conference on Functional programming, pages 268--279, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Mats Cronqvist. Troubleshooting a large Erlang system. In ERLANG '04: Proc. of the 2004 ACM SIGPLAN workshop on Erlang, pages 11--15, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Lars-Åke Fredlund and Hans Svensson. McErlang: a model checker for a distributed functional programming language. SIGPLAN Not., 42 (9): 125--136, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Emden R. Gansner and Stephen C. North. An open graph visualization system and its applications. Software - Practice and Experience, 30: 1203--1233, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. P. Herlihy and J. M. Wing. Axioms for concurrent objects. In POPL '87: Proc. of the 14th ACM SIGACT-SIGPLAN symposium on Principles of Prog. Lang., pages 13--26, New York, NY, USA, 1987. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. John Hughes. QuickCheck Testing for Fun and Profit. In 9th Int. Symp. on Practical Aspects of Declarative Languages. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dean F. Jerding, John T. Stasko, and Thomas Ball. Visualizing interactions in program executions. In In Proc. of the 19th International Conference on Software Engineering, pages 360--370, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Klein, Lu, and Netzer. Detecting race conditions in parallel programs that use semaphores. Algorithmica, 35: 321--345, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  12. Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, 28 (9): 690--691, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21 (7): 558--565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. SIGARCH Comput. Archit. News, 36 (1): 329--339, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Shahar Maoz, Asaf Kleinbort, and David Harel. Towards trace visualization and exploration for reactive systems. In VLHCC '07: Proc. of the IEEE Symposium on Visual Languages and Human-Centric Computing, pages 153--156, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gérard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, pages 267--280, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Robert H. B. Netzer and Barton P. Miller. On the complexity of event ordering for shared-memory parallel program executions. In In Proc. of the 1990 Int. Conf. on Parallel Processing, pages 93--97, 1990.Google ScholarGoogle Scholar
  18. Chang-Seo Park and Koushik Sen. Randomized active atomicity violation detection in concurrent programs. In SIGSOFT '08/FSE-16: Proc. of the 16th ACM SIGSOFT International Symposium on Foundations of software engineering, pages 135--145, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Koushik Sen. Race directed random testing of concurrent programs. SIGPLAN Not., 43 (6): 11--21, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. H. Svensson and L.-Å. Fredlund. A more accurate semantics for distributed Erlang. In Erlang '07: Proc. of the 2007 SIGPLAN Erlang Workshop, pages 43--54, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Topol, J.T. Stasko, and V. Sunderam. Integrating visualization support into distributed computing systems. Proc. of the 15th Int. Conf. on: Distributed Computing Systems, pages 19--26, May-Jun 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Ulf T. Wiger. Extended process registry for Erlang. In ERLANG '07: Proc. of the 2007 SIGPLAN workshop on ERLANG Workshop, pages 1--10, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Finding race conditions in Erlang with QuickCheck and PULSE

    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 44, Issue 9
      ICFP '09
      September 2009
      343 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1631687
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '09: Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
        August 2009
        364 pages
        ISBN:9781605583327
        DOI:10.1145/1596550

      Copyright © 2009 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 31 August 2009

      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!