Actor concurrency bugs: a comprehensive study on symptoms, root causes, API usages, and differences

Actor concurrency is becoming increasingly important in the development of real-world software systems. Although actor concurrency may be less susceptible to some multithreaded concurrency bugs, such as low-level data races and deadlocks, it comes with its own bugs that may be different. However, the fundamental characteristics of actor concurrency bugs, including their symptoms, root causes, API usages, examples, and differences when they come from different sources are still largely unknown. Actor software development can significantly benefit from a comprehensive qualitative and quantitative understanding of these characteristics, which is the focus of this work, to foster better API documentation, development practices, testing, debugging, repairing, and verification frameworks. To conduct this study, we take the following major steps. First, we construct a set of 186 real-world Akka actor bugs from Stack Overflow and GitHub via manual analysis of 3,924 Stack Overflow questions, answers, and comments and 3,315 GitHub commits, messages, original and modified code snippets, issues, and pull requests. Second, we manually study these actor bugs and their fixes to understand and classify their symptoms, root causes, and API usages. Third, we study the differences between the commonalities and distributions of symptoms, root causes, and API usages of our Stack Overflow and GitHub actor bugs. Fourth, we discuss real-world examples of our actor bugs with these symptoms and root causes. Finally, we investigate the relation of our findings with those of previous work and discuss their implications. A few findings of our study are: (1) symptoms of our actor bugs can be classified into five categories, with Error as the most common symptom and Incorrect Exceptions as the least common, (2) root causes of our actor bugs can be classified into ten categories, with Logic as the most common root cause and Untyped Communication as the least common, (3) a small number of Akka API packages are responsible for most of API usages by our actor bugs, and (4) our Stack Overflow and GitHub actor bugs can differ significantly in commonalities and distributions of their symptoms, root causes, and API usages. While some of our findings agree with those of previous work, others sharply contrast.

[1]  Andrian Marcus,et al.  PRF: a framework for building automatic program repair prototypes for JVM-based languages , 2020, ESEC/SIGSOFT FSE.

[2]  Hridesh Rajan,et al.  Repairing Deep Neural Networks: Fix Patterns and Challenges , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE).

[3]  AKKA , 2020, The Punishment.

[4]  Baishakhi Ray,et al.  An Empirical Study on the Use and Misuse of Java 8 Streams , 2020, FASE.

[5]  Colin S. Gordon Modal assertions for actor correctness , 2019, AGERE!@SPLASH.

[6]  Adrián Riesco,et al.  A core Erlang semantics for declarative debugging , 2019, J. Log. Algebraic Methods Program..

[7]  Raffi Khatchadourian,et al.  Going big: a large-scale study on what big data developers ask , 2019, ESEC/SIGSOFT FSE.

[8]  Hridesh Rajan,et al.  A comprehensive study on deep learning bug characteristics , 2019, ESEC/SIGSOFT FSE.

[9]  Hridesh Rajan,et al.  Boa Meets Python: A Boa Dataset of Data Science Software in Python Language , 2019, 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR).

[10]  Mehdi Bagherzadeh,et al.  Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[11]  Yiying Zhang,et al.  Understanding Real-World Concurrency Bugs in Go , 2019, ASPLOS.

[12]  Stefan Marr,et al.  Multiverse Debugging: Non-Deterministic Debugging for Non-Deterministic Programs (Brave New Idea Paper) , 2019, ECOOP.

[13]  Mehdi Bagherzadeh,et al.  What do concurrency developers ask about?: a large-scale study using stack overflow , 2018, ESEM.

[14]  Mehdi Bagherzadeh,et al.  [Engineering Paper] A Tool for Optimizing Java 8 Stream Software via Automated Refactoring , 2018, 2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[15]  Xinghui Zhao,et al.  A Comprehensive Study on Bugs in Actor Systems , 2018, ICPP.

[16]  Mauro Pezzè,et al.  A Survey of Recent Trends in Testing Concurrent Software Systems , 2018, IEEE Transactions on Software Engineering.

[17]  Yifan Chen,et al.  An empirical study on TensorFlow program bugs , 2018, ISSTA.

[18]  Gul A. Agha,et al.  Targeted Test Generation for Actor Systems , 2018, ECOOP.

[19]  Jie Wang,et al.  A comprehensive study on real world concurrency bugs in Node.js , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[20]  Hridesh Rajan,et al.  Order types: static reasoning about message races in asynchronous message passing concurrency , 2017, AGERE!@SPLASH.

[21]  Hanspeter Mössenböck,et al.  A principled approach towards debugging communicating event-loops , 2017, AGERE!@SPLASH.

[22]  Na Meng,et al.  Secure Coding Practices in Java: Challenges and Vulnerabilities , 2017, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[23]  Hanspeter Mössenböck,et al.  A Study of Concurrency Bugs and Advanced Development Support for Actor-based Programs , 2017, Programming with Actors.

[24]  Coen De Roover,et al.  Mailbox Abstractions for Static Analysis of Actor Programs , 2017, ECOOP.

[25]  Mark C. Lewis,et al.  Object-Orientation, Abstraction, and Data Structures Using Scala , 2016 .

[26]  Ali Mesbah,et al.  Discovering bug patterns in JavaScript , 2016, SIGSOFT FSE.

[27]  Joeri De Koster,et al.  43 Years of Actors: a Taxonomy of Actor Models and Their Key Properties , 2016, AGERE!@SPLASH.

[28]  Philipp Haller,et al.  LaCasa: lightweight affinity and object capabilities in Scala , 2016, OOPSLA.

[29]  Xinli Yang,et al.  What Security Questions Do Developers Ask? A Large-Scale Study of Stack Overflow Posts , 2016, Journal of Computer Science and Technology.

[30]  Emad Shihab,et al.  What are mobile developers asking about? A large scale study using stack overflow , 2016, Empirical Software Engineering.

[31]  Xiaodong Gu,et al.  Deep API learning , 2016, SIGSOFT FSE.

[32]  Yan Zhang,et al.  AntMiner: Mining More Bugs by Reducing Noise Interference , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[33]  Mira Mezini,et al.  "Jumping Through Hoops": Why do Java Developers Struggle with Cryptography APIs? , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[34]  Shan Lu,et al.  TaxDC: A Taxonomy of Non-Deterministic Concurrency Bugs in Datacenter Distributed Systems , 2016, ASPLOS.

[35]  Hridesh Rajan,et al.  On ordering problems in message passing software , 2016, MODULARITY.

[36]  Sophia Drossopoulou,et al.  Deny capabilities for safe, fast actors , 2015, AGERE!@SPLASH.

[37]  Premkumar T. Devanbu,et al.  On the "Naturalness" of Buggy Code , 2015, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[38]  Pascal Felber,et al.  Dynamic Message Processing and Transactional Memory in the Actor Model , 2015, DAIS.

[39]  Premkumar T. Devanbu,et al.  Assert Use in GitHub Projects , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[40]  Bo Zhou,et al.  Predicting concurrency bugs: how many, what kind and where are they? , 2015, EASE.

[41]  Hridesh Rajan,et al.  Panini: a concurrent programming model for solving pervasive and oblivious interference , 2015, MODULARITY.

[42]  He Li,et al.  A formal semantics for debugging synchronous message passing-based concurrent programs , 2014, Science China Information Sciences.

[43]  Tanakorn Leesatapornwongsa,et al.  What Bugs Live in the Cloud? A Study of 3000+ Issues in Cloud Systems , 2014, SoCC.

[44]  Joeri De Koster,et al.  Towards Composable Concurrency Abstractions , 2014, PLACES.

[45]  Ahmed E. Hassan,et al.  What are developers talking about? An analysis of topics and trends in Stack Overflow , 2014, Empirical Software Engineering.

[46]  Martin Monperrus,et al.  A critical review of "automatic patch generation learned from human-written patches": essay on the problem statement and the evaluation of automatic software repair , 2014, ICSE.

[47]  Sergey Bykov,et al.  Orleans: Distributed Virtual Actors for Programmability and Scalability , 2014 .

[48]  Éric Tanter,et al.  Parallel actor monitors: Disentangling task-level parallelism from data partitioning in the actor model , 2014, Sci. Comput. Program..

[49]  Ralph E. Johnson,et al.  Bita: Coverage-guided, automatic testing of actor programs , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[50]  Ralph E. Johnson,et al.  Why Do Scala Developers Mix the Actor Model with other Concurrency Models? , 2013, ECOOP.

[51]  C.-H. Luke Ong,et al.  Automatic Verification of Erlang-Style Concurrency , 2013, SAS.

[52]  Axel Legay,et al.  TransDPOR: A Novel Dynamic Partial-Order Reduction Technique for Testing Actor Programs , 2012, FMOODS/FORTE.

[53]  Philip J. Guo,et al.  Characterizing and predicting which bugs get reopened , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[54]  Stas Negara,et al.  Inferring ownership transfer for efficient message passing , 2011, PPoPP '11.

[55]  Darko Marinov,et al.  Evaluating Ordering Heuristics for Dynamic Partial-Order Reduction Techniques , 2010, FASE.

[56]  Darko Marinov,et al.  A Framework for State-Space Exploration of Java-Based Actor Programs , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[57]  Neelam Soundarajan,et al.  Enforcing behavioral constraints in evolving aspect-oriented programs , 2008, FOAL.

[58]  Yuanyuan Zhou,et al.  Learning from mistakes: a comprehensive study on real world concurrency bug characteristics , 2008, ASPLOS.

[59]  Sunghun Kim,et al.  How long did it take to fix bugs? , 2006, MSR '06.

[60]  Edward A. Lee The problem with threads , 2006, Computer.

[61]  Koushik Sen,et al.  Automated Systematic Testing of Open Distributed Programs , 2006, FASE.

[62]  Zhenmin Li,et al.  PR-Miner: automatically extracting implicit programming rules and detecting violations in large software code , 2005, ESEC/FSE-13.

[63]  Sally Fincher,et al.  Making sense of card sorting data , 2005, Expert Syst. J. Knowl. Eng..

[64]  Eitan Farchi,et al.  Applications of synchronization coverage , 2005, PPoPP.

[65]  David Hovemeyer,et al.  Finding bugs is easy , 2004, SIGP.

[66]  Mayur Naik,et al.  From symptom to cause: localizing errors in counterexample traces , 2003, POPL '03.

[67]  K RajamaniSriram,et al.  From symptom to cause , 2003 .

[68]  P. Bak,et al.  Learning from mistakes , 1997, Neuroscience.

[69]  Joe Armstrong,et al.  Programming Erlang: Software for a Concurrent World , 1993 .

[70]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[71]  Carl Hewitt,et al.  Concurrent Programming Using Actors: Exploiting large-Scale Parallelism , 1985, FSTTCS.

[72]  Gul A. Agha,et al.  Types for Progress in Actor Programs , 2019, Models, Languages, and Tools for Concurrent and Distributed Programming.

[73]  Javier Cámara,et al.  Special section on Foundations of Coordination Languages and Software Architectures , 2016, Sci. Comput. Program..

[74]  D.2.2 [Design Tools and Techniques] Modules and interfaces,Object-oriented design methods D.2.3 [Coding Tools and Techniques] Object-Oriented Programming D.3.3 [Programming Languages] Language Constructs and Features- Control structures , 2013 .

[75]  Jie Yu,et al.  Finding and Tolerating Concurrency Bugs , 2013 .

[76]  Marc Pantel,et al.  A set-constraint-based analysis of actors , 1997 .

[77]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[78]  V. V. Shkurba Ordering problems , 1967 .

[79]  Iulian Neamtiu,et al.  The Journal of Systems and Software 85 (2012) 2275–2292 Contents lists available at SciVerse ScienceDirect The Journal of Systems and Software , 2022 .