[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1596550.1596574acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Finding race conditions in Erlang with QuickCheck and PULSE

Published: 31 August 2009 Publication History

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.

Supplementary Material

JPG File (findingraceconditionsinerlangwithquickcheckandpulse.jpg)
MP4 File (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.
[2]
Thomas Arts and Lars-Åke Fredlund. Trace analysis of Erlang programs. SIGPLAN Notices, 37 (12): 18--24, 2002.
[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.
[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.
[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.
[6]
Lars-Åke Fredlund and Hans Svensson. McErlang: a model checker for a distributed functional programming language. SIGPLAN Not., 42 (9): 125--136, 2007.
[7]
Emden R. Gansner and Stephen C. North. An open graph visualization system and its applications. Software - Practice and Experience, 30: 1203--1233, 1999.
[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.
[9]
John Hughes. QuickCheck Testing for Fun and Profit. In 9th Int. Symp. on Practical Aspects of Declarative Languages. Springer, 2007.
[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.
[11]
Klein, Lu, and Netzer. Detecting race conditions in parallel programs that use semaphores. Algorithmica, 35: 321--345, 2003.
[12]
Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, 28 (9): 690--691, 1979.
[13]
Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21 (7): 558--565, 1978.
[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.
[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.
[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.
[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.
[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.
[19]
Koushik Sen. Race directed random testing of concurrent programs. SIGPLAN Not., 43 (6): 11--21, 2008.
[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.
[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.
[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.

Cited By

View all
  • (2024)Type-Level Property Based TestingProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678206(37-49)Online publication date: 28-Aug-2024
  • (2024)Controlled Scheduling of Concurrent Elixir ProgramsProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678195(67-75)Online publication date: 28-Aug-2024
  • (2024)Executable contracts for elixirJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2024.101019(101019)Online publication date: Oct-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

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
  • 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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 August 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Erlang
  2. QuickCheck
  3. race conditions

Qualifiers

  • Research-article

Conference

ICFP '09
Sponsor:
ICFP '09: ACM SIGPLAN International Conference on Functional Programming
August 31 - September 2, 2009
Edinburgh, Scotland

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)17
  • Downloads (Last 6 weeks)0
Reflects downloads up to 28 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Type-Level Property Based TestingProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678206(37-49)Online publication date: 28-Aug-2024
  • (2024)Controlled Scheduling of Concurrent Elixir ProgramsProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678195(67-75)Online publication date: 28-Aug-2024
  • (2024)Executable contracts for elixirJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2024.101019(101019)Online publication date: Oct-2024
  • (2024)Reversible debugging of concurrent Erlang programs: Supporting imperative primitivesJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2024.100944(100944)Online publication date: Jan-2024
  • (2022)Property-Based Testing: Climbing the Stairway to VerificationProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567520(84-97)Online publication date: 29-Nov-2022
  • (2022)Quickstrom: property-based acceptance testing with LTL specificationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523728(1025-1038)Online publication date: 9-Jun-2022
  • (2020)Effective Concurrency Testing for Distributed SystemsProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378484(1141-1156)Online publication date: 9-Mar-2020
  • (2019)Learning and statistical model checking of system response timesSoftware Quality Journal10.1007/s11219-018-9432-827:2(757-795)Online publication date: 1-Jun-2019
  • (2018)Statistical Model Checking of Response Times for Different System DeploymentsDependable Software Engineering. Theories, Tools, and Applications10.1007/978-3-319-99933-3_11(153-169)Online publication date: 26-Aug-2018
  • (2018)Cheap Remarks About Concurrent ProgramsFunctional and Logic Programming10.1007/978-3-319-90686-7_17(264-279)Online publication date: 24-Apr-2018
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media