Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/781498.781529acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
Article

Efficient on-the-fly data race detection in multithreaded C++ programs

Published: 11 June 2003 Publication History
  • Get Citation Alerts
  • Abstract

    Data race detection is highly essential for debugging multithreaded programs and assuring their correctness. Nevertheless, there is no single universal technique capable of handling the task efficiently, since the data race detection problem is computationally hard in the general case. Thus, to approximate the possible races in a program, all currently available tools take different ``short-cuts'', such as using strong assumptions on the program structure or applying various heuristics. When applied to some general case program, however, they usually result in excessive false alarms or in a large number of undetected races.Another major drawback of many currently available tools is that they are restricted, for performance reasons, to detection units of fixed size. Thus, they all suffer from the same problem---choosing a small unit might result in missing some of the data races, while choosing a large one might lead to false detection.In this paper we present a novel testing tool, called MultiRace, which combines improved versions of Djit and Lockset---two very powerful on-the-fly algorithms for dynamic detection of apparent data races. Both extended algorithms detect races in multithreaded programs that may execute on weak consistency systems, and may use two-way as well as global synchronization primitives.By employing novel technologies, MultiRace adjusts its detection to the native granularity of objects and variables in the program under examination. In order to monitor all accesses to each of the shared locations, MultiRace instruments the C++ source code of the program. It lets the user fine-tune the detection process, but otherwise is completely automatic and transparent.This paper describes the algorithms employed in MultiRace, discusses some of its implementation issues, and proposes several optimizations to it. The paper shows that the overheads imposed by MultiRace are often much smaller (orders of magnitude) than those obtained by other existing dynamic techniques.

    References

    [1]
    S. V. Adve and M. D. Hill. A unified formalization of four shared-memory models. Technical report, University of Wisconsin, Sept. 1992.
    [2]
    S. V. Adve, M. D. Hill, B. P. Miller, and R. H. B. Netzer. Detecting data races on weak memory systems. In Proceedings of the 18th Annual International Symposium on Computer Architecture (ISCA'91), pages 234--243, May 1991.
    [3]
    V. Balasundaram and K. Kennedy. Compile-time detection of race conditions in a parallel program. In Proceedings of the 3rd International Conference on Supercomputing, pages 175--185, June 1989.
    [4]
    T. Brecht and H. Sandhu. The Region Trap Library: Handling traps on application-defined regions of memory. In USENIX Annual Technical Conference, Monterey, CA, June 1999.
    [5]
    A. Dinning and E. Schonberg. An empirical comparison of monitoring algorithms for access anomaly detection. In Proceedings of the Second ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 1--10, Mar. 1990.
    [6]
    P. Emrath and D. Padua. Automatic detection of nondeterminacy in parallel programs. In Proceedings of the ACM SIGPLAN/SIGOPS Workshop on Parallel and Distributed Debugging, pages 89--99, May 1988.
    [7]
    C. Flanagan and S. Freund. Detecting race conditions in large programs. In Workshop on Program Analysis for Software Tools and Engineering (PASTE 2001), pages 90--96, June 2001.
    [8]
    R. Hood, K. Kennedy, and J. Mellor-Crummey. Parallel program debugging with on-the-fly anomaly detection. In Proceedings of the 1990 Conference on Supercomputing, Nov. 1990.
    [9]
    A. Itzkovitz and A. Schuster. Multiview and Millipage---fine-grain sharing in page-based DSMs. In Proceedings of the Third Symposium on Operating Systems Design and Implementation (OSDI), pages 215--228, Feb. 1999.
    [10]
    A. Itzkovitz, A. Schuster, and O. Zeev-Ben-Mordechai. Towards integration of data race detection in DSM systems. Journal of Parallel and Distributed Computing (JPDC), 59(2), pages 180--203, Nov. 1999.
    [11]
    L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7), pages 558--565, July 1978.
    [12]
    F. Mattern. Virtual time and global states of distributed systems. Parallel and Distributed Algorithms, Elsevier Science Publishers, Amsterdam, pages 215--226, 1989.
    [13]
    R. H. B. Netzer and B. P. Miller. On the complexity of event ordering for shared-memory parallel program executions. In 1990 International Conference on Parallel Processing, 2, pages 93--97, Jan. 1990.
    [14]
    R. H. B. Netzer and B. P. Miller. Improving the accuracy of data race detection. In Proceedings of the 1991 Conference on the Principles and Practice of Parallel Programming, pages 133--144, Apr. 1991.
    [15]
    R. H. B. Netzer and B. P. Miller. What are race conditions? Some issues and formalizations. ACM Letters on Programming Languages and Systems, 1, pages 74--88, Mar. 1992.
    [16]
    M. Ronsse and K. D. Bosschere. RecPlay: A fully integrated practical record/replay system. ACM Transactions on Computer Systems, 17(2), pages 133--152, 1999.
    [17]
    S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems, 15(4), pages 391--411, Oct. 1997.

    Cited By

    View all
    • (2024)Inductive Diagrams for Causal ReasoningProceedings of the ACM on Programming Languages10.1145/36498308:OOPSLA1(529-554)Online publication date: 29-Apr-2024
    • (2024)Optimistic Prediction of Synchronization-Reversal Data RacesProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639099(1-13)Online publication date: 20-May-2024
    • (2023)DAG Scheduling in Mobile Edge ComputingACM Transactions on Sensor Networks10.1145/361637420:1(1-25)Online publication date: 20-Oct-2023
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PPoPP '03: Proceedings of the ninth ACM SIGPLAN symposium on Principles and practice of parallel programming
    June 2003
    250 pages
    ISBN:1581135882
    DOI:10.1145/781498
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 38, Issue 10
      Proceedings of the ACM SIGPLAN symposium on principles and practice of parallel programming (PPoPP 2003) and workshop on partial evaluation and semantics-based program manipulation (PEPM 2003)
      October 2003
      331 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/966049
      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: 11 June 2003

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. concurrency
    2. data race
    3. instrumentation
    4. multithreading
    5. synchronization

    Qualifiers

    • Article

    Conference

    PPoPP03
    Sponsor:

    Acceptance Rates

    PPoPP '03 Paper Acceptance Rate 20 of 45 submissions, 44%;
    Overall Acceptance Rate 230 of 1,014 submissions, 23%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)56
    • Downloads (Last 6 weeks)12
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Inductive Diagrams for Causal ReasoningProceedings of the ACM on Programming Languages10.1145/36498308:OOPSLA1(529-554)Online publication date: 29-Apr-2024
    • (2024)Optimistic Prediction of Synchronization-Reversal Data RacesProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639099(1-13)Online publication date: 20-May-2024
    • (2023)DAG Scheduling in Mobile Edge ComputingACM Transactions on Sensor Networks10.1145/361637420:1(1-25)Online publication date: 20-Oct-2023
    • (2023)Localised Trust in a Globalised Knot: Designing Information Privacy for Digital-IDACM Journal on Computing and Sustainable Societies10.1145/3616024Online publication date: 16-Aug-2023
    • (2023)A Systematic Collection of Medical Image Datasets for Deep LearningACM Computing Surveys10.1145/3615862Online publication date: 16-Aug-2023
    • (2023)Efficient Malware Analysis Using Metric EmbeddingsDigital Threats: Research and Practice10.1145/3615669Online publication date: 16-Aug-2023
    • (2023)“Why are there so many steps?”: Improving Access to Blind and Low Vision Music Learning through Personal Adaptations and Future Design IdeasACM Transactions on Accessible Computing10.1145/361566316:3(1-20)Online publication date: 21-Sep-2023
    • (2023)Generative Adversarial Networks: A Survey on Attack and Defense PerspectiveACM Computing Surveys10.1145/361533656:4(1-35)Online publication date: 10-Nov-2023
    • (2023)Approximating Nash Social Welfare under Submodular Valuations through (Un)MatchingsACM Transactions on Algorithms10.1145/361345219:4(1-25)Online publication date: 26-Sep-2023
    • (2023)The Power of Robot-mediated Play: Forming Friendships and Expressing IdentityACM Transactions on Human-Robot Interaction10.1145/361165612:4(1-21)Online publication date: 28-Sep-2023
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media