skip to main content
research-article

Effective race detection for event-driven programs

Published:29 October 2013Publication History
Skip Abstract Section

Abstract

Like shared-memory multi-threaded programs, event-driven programs such as client-side web applications are susceptible to data races that are hard to reproduce and debug. Race detection for such programs is hampered by their pervasive use of ad hoc synchronization, which can lead to a prohibitive number of false positives. Race detection also faces a scalability challenge, as a large number of short-running event handlers can quickly overwhelm standard vector-clock-based techniques.

This paper presents several novel contributions that address both of these challenges. First, we introduce race coverage, a systematic method for exposing ad hoc synchronization and other (potentially harmful) races to the user, significantly reducing false positives. Second, we present an efficient connectivity algorithm for computing race coverage. The algorithm is based on chain decomposition and leverages the structure of event-driven programs to dramatically decrease the overhead of vector clocks.

We implemented our techniques in a tool called EventRacer and evaluated it on a number of public web sites. The results indicate substantial performance and precision improvements of our approach over the state-of-the-art. Using EventRacer, we found many harmful races, most of which are beyond the reach of current techniques.

References

  1. AGARWAL, A., AND GARG, V. K. Efficient dependency tracking for relevant events in shared-memory systems. In PODC (2005). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. ARTZI, S., DOLBY, J., JENSEN, S. H., MØLLER, A., AND TIP, F. A Framework for Automated Testing of JavaScript Web Applications. In ICSE (May 2011). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. CHRISTIAENS, M., AND BOSSCHERE, K. D. Accordion clocks: Logical clocks for data race detection. In Euro-Par (2001). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. FLANAGAN, C., AND FREUND, S. N. FastTrack: efficient and precise dynamic race detection. In PLDI (2009). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. HTML5 specification. http://www.w3.org/TR/html5/.Google ScholarGoogle Scholar
  6. IDE, J., BODIK, R., AND KIMELMAN, D. Concurrency concerns in rich Internet applications. In EC2 (2009).Google ScholarGoogle Scholar
  7. JAGADISH, H. V. A compression technique to materialize transitive closure. ACM Trans. Database Syst. 15, 4 (Dec. 1990), 558--598. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. KASIKCI, B., ZAMFIR, C., AND CANDEA, G. Data races vs. data race bugs: telling the difference with Portend. In ASPLOS (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. LAMPORT, L. Time, clocks, and the ordering of events in a distributed system. In ACM Operating Systems (1978).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. MATTERN, F. Virtual time and global states of distributed systems. In Proc. Workshop on Parallel and Distributed Algorithms (1989), C. M. et al., Ed.Google ScholarGoogle Scholar
  11. Bug 538892 - Replying to or forwarding emails on Hotmail no longer works properly: message content is often lost. https://bugzilla.mozilla.org/show_bug.cgi?id=538892.Google ScholarGoogle Scholar
  12. NARAYANASAMY, S., WANG, Z., TIGANI, J., EDWARDS, A., AND CALDER, B. Automatically classifying benign and harmful data races using replay analysis. In PLDI (2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. NETZER, R. H. B., AND MILLER, B. P. Improving the accuracy of data race detection. In PPOPP (1991). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. NETZER, R. N., AND MILLER, B. P. Detecting data races in parallel program executions. In LCPC (1989).Google ScholarGoogle Scholar
  15. PETROV, B., VECHEV, M., SRIDHARAN, M., AND DOLBY, J. Race detection for web applications. In PLDI (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. POZNIANSKY, E., AND SCHUSTER, A. Efficient on-the-fly data race detection in multithreaded c++ programs. In PPoPP (2003). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. RICHARDS, G., LEBRESNE, S., BURG, B., AND VITEK, J. An analysis of the dynamic behavior of JavaScript programs. In PLDI (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. SEN, K. Race directed random testing of concurrent programs. In PLDI (2008), pp. 11--21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. SHI, Y., PARK, S., YIN, Z., LU, S., ZHOU, Y., CHEN, W., AND ZHENG, W. Do i use the wrong definition?: Defuse: definition-use invariants for detecting concurrency and sequential bugs. In OOPSLA (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. WebKit. http://www.webkit.org/.Google ScholarGoogle Scholar
  21. ZHENG, Y., BAO, T., AND ZHANG, X. Statically locating web application bugs caused by asynchronous calls. In WWW'2011 (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Effective race detection for event-driven programs

                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 48, Issue 10
                  OOPSLA '13
                  October 2013
                  867 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/2544173
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
                    October 2013
                    904 pages
                    ISBN:9781450323741
                    DOI:10.1145/2509136

                  Copyright © 2013 ACM

                  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]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 29 October 2013

                  Check for updates

                  Qualifiers

                  • research-article

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader