skip to main content
research-article
Public Access

AsyncClock: Scalable Inference of Asynchronous Event Causality

Published:04 April 2017Publication History
Skip Abstract Section

Abstract

Asynchronous programming model is commonly used in mobile systems and Web 2.0 environments. Asynchronous race detectors use algorithms that are an order of magnitude performance and space inefficient compared to conventional data race detectors. We solve this problem by identifying and addressing two important problems in reasoning about causality between asynchronous events.

Unlike conventional signal-wait operations, establishing causal order between two asynchronous events is fundamentally more challenging as there is no common handle they operate on. We propose a new primitive named AsyncClock that addresses this problem by explicitly tracking causally preceding events, and show that AsyncClock can handle a wide variety of asynchronous causality models. We also address the important scalability problem of efficiently identifying heirless events whose metadata can be reclaimed.

We built the first single-pass, non-graph-based Android race detector using our algorithm and applied it to find errors in 20 popular applications. Our tool incurs about 6x performance overhead, which is several times more efficient than the state-of-the-art solution. It also scales well with the execution length. We used our tool to find 147 previously unknown harmful races.

References

  1. Message | android developers. https://developer.android.com/reference/android/os/Message.html#setAsynchronous(boolean). [Online; accessed 2016-08-15].Google ScholarGoogle Scholar
  2. tool:androidmonkeyUi/application exerciser monkey | android studio. https://developer.android.com/studio/test/monkey.html,natexlaba. [Online; accessed 2016-08--15].Google ScholarGoogle Scholar
  3. tool:droidracerdroidracer - software engineering and analysis lab (seal), iisc bangalore. http://www.iisc-seal.net/droidracer,natexlabb. [Online; accessed 2016-08-15].Google ScholarGoogle Scholar
  4. tool:eventracerandroid Event racer for android. http://eventracer.org/android/,natexlabc. [Online; accessed 2016-08--15].Google ScholarGoogle Scholar
  5. S. V. Adve, M. D. Hill, B. P. Miller, and R. H. B. Netzer. Detecting data races on weak memory systems. SIGARCH Comput. Archit. News, 19 (3): 234--243, Apr. 1991. ISSN 0163--5964. 10.1145/115953.115976. URL http://doi.acm.org/10.1145/115953.115976.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Bielik, V. Raychev, and M. Vechev. Scalable race detection for android applications. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, pages 332--348, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-3689-5. 10.1145/2814270.2814303. URL http://doi.acm.org/10.1145/2814270.2814303.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Christiaens and K. Bosschere. Euro-Par 2001 Parallel Processing: 7th International Euro-Par Conference Manchester, UK, August 28--31, 2001 Proceedings, chapter Accordion Clocks: Logical Clocks for Data Race Detection, pages 494--503. Springer Berlin Heidelberg, Berlin, Heidelberg, 2001. ISBN 978-3-540-44681-1. 10.1007/3-540-44681-8_73. URL http://dx.doi.org/10.1007/3-540-44681-8_73. Google ScholarGoogle ScholarCross RefCross Ref
  8. D. Dimitrov, V. Raychev, M. Vechev, and E. Koskinen. Commutativity race detection. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, pages 305--315, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. 10.1145/2594291.2594322. URL http://doi.acm.org/10.1145/2594291.2594322.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. R. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP, pages 237--252, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI, pages 121--133, 2009.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C.-H. Hsiao, J. Yu, S. Narayanasamy, Z. Kong, C. L. Pereira, G. A. Pokam, P. M. Chen, and J. Flinn. Race detection for event-driven mobile applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, pages 326--336, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. 10.1145/2594291.2594330. URL http://doi.acm.org/10.1145/2594291.2594330.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. V. Jagadish. A compression technique to materialize transitive closure. ACM Trans. Database Syst., 15 (4): 558--598, Dec. 1990. ISSN 0362-5915. 10.1145/99935.99944. URL http://doi.acm.org/10.1145/99935.99944.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. Maiya, A. Kanade, and R. Majumdar. Race detection for android applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, pages 316--325, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2784-8. 10.1145/2594291.2594311. URL http://doi.acm.org/10.1145/2594291.2594311.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. F. Mattern. Virtual time and global states of distributed systems. In Parallel and Distributed Algorithms, pages 215--226. North-Holland, 1989.Google ScholarGoogle Scholar
  15. R. H. B. Netzer. Optimal Tracing and Replay for Debugging Shared-Memory Parallel Programs. In Workshop on Parallel and Distributed Debugging, pages 1--11, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Petrov, M. T. Vechev, M. Sridharan, and J. Dolby. Race detection for web applications. In PLDI, pages 251--262, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. V. Raychev, M. T. Vechev, and M. Sridharan. Effective race detection for event-driven programs. In OOPSLA, pages 151--166, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC/SIGSOFT FSE, pages 205--214, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. AsyncClock: Scalable Inference of Asynchronous Event Causality

      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 52, Issue 4
        ASPLOS '17
        April 2017
        811 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3093336
        Issue’s Table of Contents
        • cover image ACM Conferences
          ASPLOS '17: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems
          April 2017
          856 pages
          ISBN:9781450344654
          DOI:10.1145/3037697

        Copyright © 2017 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 April 2017

        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!