Advertisement

A Study of Concurrency Bugs and Advanced Development Support for Actor-based Programs

  • Carmen Torres Lopez
  • Stefan Marr
  • Elisa Gonzalez Boix
  • Hanspeter Mössenböck
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10789)

Abstract

The actor model is an attractive foundation for developing concurrent applications because actors are isolated concurrent entities that communicate through asynchronous messages and do not share state. Thereby, they avoid concurrency bugs such as data races, but are not immune to concurrency bugs in general.

This study taxonomizes concurrency bugs in actor-based programs reported in literature. Furthermore, it analyzes the bugs to identify the patterns causing them as well as their observable behavior. Based on this taxonomy, we further analyze the literature and find that current approaches to static analysis and testing focus on communication deadlocks and message protocol violations. However, they do not provide solutions to identify livelocks and behavioral deadlocks.

The insights obtained in this study can be used to improve debugging support for actor-based programs with new debugging techniques to identify the root cause of complex concurrency bugs.

Keywords

Actor model Concurrency Bugs Survey 

Notes

Acknowledgments

This research is funded by a collaboration grant of the Austrian Science Fund (FWF) with the project I2491-N31 and the Research Foundation Flanders (FWO Belgium) with the project number G004816N.

References

  1. 1.
    Abbaspour Asadollah, S., Sundmark, D., Eldh, S., Hansson, H., Afzal, W.: 10 Years of research on debugging concurrent and multicore software: a systematic mapping study. Software Qual. J. 25(1), 49–82 (2017).  https://doi.org/10.1007/s11219-015-9301-7CrossRefGoogle Scholar
  2. 2.
    Abbaspour Asadollah, S., Sundmark, D., Eldh, S., Hansson, H., Enoiu, E.P.: A study of concurrency bugs in an open source software. In: Crowston, K., Hammouda, I., Lundell, B., Robles, G., Gamalielsson, J., Lindman, J. (eds.) OSS 2016. IAICT, vol. 472, pp. 16–31. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-39225-7_2
  3. 3.
    Agha, G.: ACTORS: a model of concurrent computation in distributed systems. Ph.D. thesis, MIT, Artificial Intelligence Laboratory, June 1985Google Scholar
  4. 4.
    Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in ERLANG. Prentice Hall, Englewood Cliffs (1993)zbMATHGoogle Scholar
  5. 5.
    Aronis, S., Sagonas, K.: The shared-memory interferences of Erlang/OTP built-ins. In: Chechina, N., Fritchie, S.L. (eds.) Erlang Workshop, pp. 43–54. ACM (2017). http://dblp.uni-trier.de/db/conf/erlang/erlang2017.html#AronisS17
  6. 6.
    Artho, C., Havelund, K., Biere, A.: High-level data races. Softw. Test., Verif. Reliab. 13(4), 207–227 (2003). http://dblp.uni-trier.de/db/journals/stvr/stvr13.html#ArthoHB03CrossRefGoogle Scholar
  7. 7.
    Avizienis, A., Laprie, J.C., Randell, B., Landwehr, C.: Basic concepts and taxonomy of dependable and secure computing. IEEE Trans. Dependable Secur. Comput. 1(1), 11–33 (2004)CrossRefGoogle Scholar
  8. 8.
    Beschastnikh, I., Wang, P., Brun, Y., Ernst, M.D.: Debugging distributed systems. Commun. ACM 59(8), 32–37 (2016)CrossRefGoogle Scholar
  9. 9.
    Bracha, G., von der Ahé, P., Bykov, V., Kashai, Y., Maddox, W., Miranda, E.: Modules as objects in newspeak. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 405–428. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-14107-2_20
  10. 10.
    Brito, M., Felizardo, K.R., Souza, P., Souza, S.: Concurrent software testing: a systematic review. On testing software and systems: Short Papers, p. 79 (2010)Google Scholar
  11. 11.
    Cassar, I., Francalanza, A.: On synchronous and asynchronous monitor instrumentation for actor-based systems. In: Proceedings 13th International Workshop on Foundations of Coordination Languages and Self-Adaptive Systems, pp. 54–68. FOCLASA 2014, September 2014Google Scholar
  12. 12.
    Christakis, M., Gotovos, A., Sagonas, K.: Systematic testing for detecting concurrency errors in Erlang programs. In: 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation (ICST), pp. 154–163. IEEE (2013)Google Scholar
  13. 13.
    Christakis, M., Sagonas, K.: Static detection of race conditions in Erlang. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 119–133. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-11503-5_11CrossRefGoogle Scholar
  14. 14.
    Christakis, M., Sagonas, K.: Detection of asynchronous message passing errors using static analysis. In: Rocha, R., Launchbury, J. (eds.) PADL 2011. LNCS, vol. 6539, pp. 5–18. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-18378-2_3CrossRefGoogle Scholar
  15. 15.
    Christakis, M., Sagonas, K.: Static Detection of Deadlocks in Erlang. Technical report, June 2011Google Scholar
  16. 16.
    Claessen, K., et al.: Finding race conditions in Erlang with QuickCheck and PULSE. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP 2009, pp. 149–160. ACM (2009)Google Scholar
  17. 17.
    Colaço, J.L., Pantel, M., Sallé, P.: A Set-Constraint-based analysis of Actors. In: Bowman, H., Derrick, J., et al. (eds.) Formal Methods for Open Object-based Distributed Systems. IFIPAICT, pp. 107–122. Springer, Boston (1997).  https://doi.org/10.1007/978-0-387-35261-9_8CrossRefGoogle Scholar
  18. 18.
    Coscas, P., Fouquier, G., Lanusse, A.: Modelling actor programs using predicate/transition nets. In: Proceedings Euromicro Workshop on Parallel and Distributed Processing, pp. 194–200, January 1995Google Scholar
  19. 19.
    Dagnat, F., Pantel, M.: Static analysis of communications in Erlang programs, November 2002. http://rsync.erlang.org/euc/02/dagnat.ps.gz
  20. 20.
    Dam, M., Fredlund, L.å.: On the verification of open distributed systems. In: Proceedings of the 1998 ACM Symposium on Applied Computing, SAC 1998, pp. 532–540. ACM (1998)Google Scholar
  21. 21.
    De Koster, J., Van Cutsem, T., De Meuter, W.: 43 years of actors: a taxonomy of actor models and their key properties. In: Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, AGERE 2016, pp. 31–40. ACM (2016)Google Scholar
  22. 22.
    Dedecker, J., Van Cutsem, T., Mostinckx, S., D’Hondt, T., De Meuter, W.: Ambient-oriented programming in ambienttalk. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 230–254. Springer, Heidelberg (2006).  https://doi.org/10.1007/11785477_16CrossRefGoogle Scholar
  23. 23.
    Dijkstra, E.W.: Cooperating sequential processes. In: Genuys, F. (ed.) Programming Languages: NATO Advanced Study Institute, pp. 43–112. Academic Press (1968)Google Scholar
  24. 24.
    D’Osualdo, E., Kochems, J., Ong, C.-H.L.: Automatic verification of Erlang-style concurrency. In: Logozzo, F., Fähndrich, M. (eds.) SAS 2013. LNCS, vol. 7935, pp. 454–476. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-38856-9_24CrossRefGoogle Scholar
  25. 25.
    Dragos, I.: Stack Retention in Debuggers For Concurrent Programs, July 2013. http://iulidragos.com/assets/papers/stack-retention.pdf
  26. 26.
    Garoche, P.-L., Pantel, M., Thirioux, X.: Static safety for an actor dedicated process calculus by abstract interpretation. In: Gorrieri, R., Wehrheim, H. (eds.) FMOODS 2006. LNCS, vol. 4037, pp. 78–92. Springer, Heidelberg (2006).  https://doi.org/10.1007/11768869_8CrossRefGoogle Scholar
  27. 27.
    Gonzalez Boix, E., Noguera, C., De Meuter, W.: Distributed debugging for mobile networks. J. Syst. Softw. 90, 76–90 (2014)CrossRefGoogle Scholar
  28. 28.
    Gotovos, A., Christakis, M., Sagonas, K.: Test-driven development of concurrent programs using concuerror. In: Proceedings of the 10th ACM SIGPLAN Workshop on Erlang, pp. 51–61. ACM (2011)Google Scholar
  29. 29.
    Haller, P., Odersky, M.: Scala Actors: unifying thread-based and event-based programming. Theoretical Computer Science 410(2–3), 202–220 (2009)MathSciNetCrossRefGoogle Scholar
  30. 30.
    Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: Proceedings of the 3rd International Joint Conference on Artificial Intelligence, IJCAI 1973, pp. 235–245. Morgan Kaufmann Publishers Inc. (1973)Google Scholar
  31. 31.
    Hong, S., Park, Y., Kim, M.: Detecting concurrency errors in client-side Java Script web applications. In: 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation (ICST), pp. 61–70. IEEE, March 2014Google Scholar
  32. 32.
    Huch, F.: Verification of Erlang programs using abstract interpretation and model checking. In: Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming, ICFP 1999, pp. 261–272. ACM, New York (1999). http://doi.acm.org/10.1145/317636.317908
  33. 33.
    Hughes, J.M., Bolinder, H.: Testing a database for race conditions with quickcheck. In: Proceedings of the 10th ACM SIGPLAN Workshop on Erlang, Erlang 2011, pp. 72–77. ACM (2011)Google Scholar
  34. 34.
    Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)CrossRefGoogle Scholar
  35. 35.
    Lauterburg, S., Dotta, M., Marinov, D., Agha, G.A.: A framework for state-space exploration of Java-based actor programs. In: 2009 IEEE/ACM International Conference on Automated Software Engineering, pp. 468–479, November 2009Google Scholar
  36. 36.
    Lauterburg, S., Karmani, R.K., Marinov, D., Agha, G.: Basset: a tool for systematic testing of actor programs. In: Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2010, pp. 363–364. ACM (2010)Google Scholar
  37. 37.
    Leesatapornwongsa, T., Lukman, J.F., Lu, S., Gunawi, H.S.: TaxDC: a taxonomy of non-deterministic concurrency bugs in datacenter distributed systems. In: Conte, T., Zhou, Y. (eds.) ASPLOS, pp. 517–530. ACM (2016). http://dblp.uni-trier.de/db/conf/asplos/asplos2016.html#Leesatapornwongsa16
  38. 38.
    Long, Y., Bagherzadeh, M., Lin, E., Upadhyaya, G., Rajan, H.: On ordering problems in message passing software. In: Proceedings of the 15th International Conference on Modularity, pp. 54–65. ACM (2016)Google Scholar
  39. 39.
    Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XIII, pp. 329–339. ACM, New York (2008)Google Scholar
  40. 40.
    Marr, S., Torres Lopez, C., Aumayr, D., Gonzalez Boix, E., Mössenböck, H.: A concurrency-agnostic protocol for multi-paradigm concurrent debugging tools. In: Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages, DLS 2017, pp. 3–14. ACM (2017)Google Scholar
  41. 41.
    Miller, M.S., Tribble, E.D., Shapiro, J.: Concurrency among strangers. In: De Nicola, R., Sangiorgi, D. (eds.) TGC 2005. LNCS, vol. 3705, pp. 195–229. Springer, Heidelberg (2005).  https://doi.org/10.1007/11580850_12CrossRefGoogle Scholar
  42. 42.
    Miriyala, S., Agha, G., Sami, Y.: Visualizing actor programs using predicate transition nets. J. Vis. Lang. Comput. 3(2), 195–220 (1992)CrossRefGoogle Scholar
  43. 43.
    Peierls, T., Goetz, B., Bloch, J., Bowbeer, J., Lea, D., Holmes, D.: Java Concurrency in Practice. Addison-Wesley Professional, Reading (2005)Google Scholar
  44. 44.
    Petrov, B., Vechev, M., Sridharan, M., Dolby, J.: Race detection for web applications. In: ACM SIGPLAN Notices, vol. 47, pp. 251–262. ACM (2012)Google Scholar
  45. 45.
    Prasad, S.K., Gupta, A., Rosenberg, A.L., Sussman, A., Weems, C.C.: Topics in Parallel and Distributed Computing: Introducing Concurrency in Undergraduate Courses, 1st edn. Morgan Kaufmann Publishers Inc., San Francisco (2015)Google Scholar
  46. 46.
    Raychev, V., Vechev, M., Sridharan, M.: Effective race detection for event-driven programs. In: Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2013, pp. 151–166. ACM (2013)Google Scholar
  47. 47.
    Sagonas, K.: Experience from developing the dialyzer: a static analysis tool detecting defects in Erlang applications. In: Proceedings of the ACM SIGPLAN Workshop on the Evaluation of Software Defect Detection Tools (2005)Google Scholar
  48. 48.
    Sagonas, K.: Using static analysis to detect type errors and concurrency defects in Erlang programs. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 13–18. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-12251-4_2CrossRefGoogle Scholar
  49. 49.
    Sen, K., Agha, G.: Automated systematic testing of open distributed programs. In: Baresi, L., Heckel, R. (eds.) FASE 2006. LNCS, vol. 3922, pp. 339–356. Springer, Heidelberg (2006).  https://doi.org/10.1007/11693017_25CrossRefGoogle Scholar
  50. 50.
    Shibanai, K., Watanabe, T.: Actoverse: a reversible debugger for actors (2017)Google Scholar
  51. 51.
    Stanley, T., Close, T., Miller, M.: Causeway: A message-oriented distributed debugger. Technical report, HP Labs, April 2009Google Scholar
  52. 52.
    Stiévenart, Q., Nicolay, J., De Meuter, W., De Roover, C.: Mailbox abstractions for static analysis of actor programs (artifact). DART 3(2), 11:1–11:2 (2017). http://dblp.uni-trier.de/db/journals/darts/darts3.html#StievenartNMR17Google Scholar
  53. 53.
    Tasharofi, S., Gligoric, M., Marinov, D., Johnson, R.: Setac: A Framework for Phased Deterministic Testing Scala Actor Programs (2011). https://days2011.scala-lang.org/sites/days2011/files/ws1-2-setac.pdf
  54. 54.
    Tasharofi, S., Karmani, R.K., Lauterburg, S., Legay, A., Marinov, D., Agha, G.: TransDPOR: a novel dynamic partial-order reduction technique for testing actor programs. In: Giese, H., Rosu, G. (eds.) FMOODS/FORTE - 2012. LNCS, vol. 7273, pp. 219–234. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-3-642-30793-5_14CrossRefGoogle Scholar
  55. 55.
    Tasharofi, S., Pradel, M., Lin, Y., Johnson, R.E.: Bita: coverage-guided, automatic testing of actor programs. In: 2013 28th IEEE/ACM International Conference on Automated Software Engineering, ASE 2013, pp. 114–124, November 2013Google Scholar
  56. 56.
    Tchamgoue, G.M., Kim, K.H., Jun, Y.K.: Testing and debugging concurrency bugs in event-driven programs. Int. J. Adv. Sci. Technol. 40, 55–68 (2012)Google Scholar
  57. 57.
    Van Cutsem, T., Mostinckx, S., Gonzalez Boix, E., Dedecker, J., De Meuter, W.: AmbientTalk: object-oriented event-driven programming in mobile ad hoc networks. In: International Conference of the Chilean Computer Science Society (SCCC), pp. 3–12. IEEE Computer Society (2007)Google Scholar
  58. 58.
    Yonezawa, A., Briot, J.P., Shibayama, E.: Object-oriented concurrent programming in ABCL/1. In: Conference Proceedings on Object-oriented Programming Systems, Languages and Applications, OOPSLA 1986, pp. 258–268. ACM, New York (1986)Google Scholar
  59. 59.
    Zhang, M., Wu, Y., Chen, K., Zheng, W.: What is wrong with the transmission? A comprehensive study on message passing related bugs. In: ICPP, pp. 410–419. IEEE Computer Society (2015). http://dblp.uni-trier.de/db/conf/icpp/icpp2015.html#ZhangWCZ15
  60. 60.
    Zheng, Y., Bao, T., Zhang, X.: Statically locating web application bugs caused by asynchronous calls. In: Proceedings of the 20th International Conference on World Wide Web, WWW 2011, pp. 805–814. ACM (2011)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Carmen Torres Lopez
    • 1
  • Stefan Marr
    • 3
  • Elisa Gonzalez Boix
    • 1
  • Hanspeter Mössenböck
    • 2
  1. 1.Vrije Universiteit BrusselBrusselBelgium
  2. 2.Johannes Kepler UniversityLinzAustria
  3. 3.University of KentCanterburyUK

Personalised recommendations