Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2950290.2950332acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Public Access

ECHO: instantaneous in situ race detection in the IDE

Published: 01 November 2016 Publication History

Abstract

We present ECHO, a new technique that detects data races instantaneously in the IDE while developers code. ECHO is the first technique of its kind for incremental race detection supporting both code addition and deletion in the IDE. Unlike conventional static race detectors, ECHO warns developers of potential data races immediately as they are introduced into the program. The core underpinning ECHO is a set of new change-aware static analyses based on a novel static happens-before graph that, given a program change, efficiently compute the change-relevant information without re-analyzing the whole program. Our evaluation within a Java environment on both popular benchmarks and real- world applications shows promising results: for each code addition, or deletion, ECHO can instantly pinpoint all the races in a few milliseconds on average, three to four orders of magnitude faster than a conventional whole-program race detector with the same precision.

References

[1]
Mayur Naik, Alex Aiken, and John Whaley. Effective static race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308–319, 2006.
[2]
Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. Relay: static race detection on millions of lines of code. ESEC-Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, 2007.
[3]
Cormac Flanagan and Stephen N. Freund. FastTrack: efficient and precise dynamic race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 121–133, 2009.
[4]
Jeff Huang, Patrick O’Neil Meredith, and Grigore Rosu. Maximal sound predictive race detection with control flow abstraction. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 337–348, 2014.
[5]
Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. Valor: Efficient, software-only region conflict exceptions. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2015.
[6]
Veselin Raychev, Martin Vechev, and Manu Sridharan. Effective race detection for event-driven programs. In ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, pages 151–166, 2013.
[7]
ThreadSanitizer Documentation. http://clang.llvm.org/docs/ThreadSanitizer.html.
[8]
Intel inspector. https://software.intel.com/en-us/intel-inspector-xe/.
[9]
Go data race detector. https://golang.org/doc/articles/race\ detector.html.
[10]
The True Cost of a Software Bug. http: //blog.celerity.com/the-true-cost-of-a-software-bug/.
[11]
The Eclipse IDE. https://eclipse.org/downloads/.
[12]
Dawson Engler and Ken Ashcraft. Racerx: effective, static detection of race conditions and deadlocks. In ACM Symposium on Operating Systems Principles, 2003.
[13]
The ECHO webpage. http://parasol.tamu.edu/˜jeff/echo/.
[14]
Yannis Smaragdakis and George Balatsouras. Pointer analysis. Found. Trends Program. Lang., 2(1):1–69, 2015.
[15]
William Landi and Barbara G. Ryder. Pointer-induced aliasing: A problem classification. In Proceedings of the 18th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 93–103, 1991.
[16]
John Whaley and Monica S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pages 131–144, 2004.
[17]
Yi Lu, Lei Shang, Xinwei Xie, and Jingling Xue. An incremental points-to analysis with cfl-reachability. In Compiler Construction, pages 61–81, 2013.
[18]
Jyh-shiarn Yur, Barbara G Ryder, and William A Landi. An incremental flow-and context-sensitive pointer aliasing analysis. In Proceedings of the 21st international conference on Software engineering, pages 442–451, 1999.
[19]
Robert O’Callahan and Jong-Deok Choi. Hybrid dynamic data race detection. In ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2003.
[20]
WALA pointer analysis. http://wala.sourceforge.net/ wiki/\\index.php/UserGuide:PointerAnalysis.
[21]
Ben Hardekopf and Calvin Lin. The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 290–299, 2007.
[22]
Cormac Flanagan and Shaz Qadeer. A type and effect system for atomicity. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2003.
[23]
T. J. Watson Libraries for Analysis (WALA). http://wala.sourceforge.net/.
[24]
Jeff Huang. Stateless model checking concurrent programs with maximal causality reduction. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 165–174, 2015.
[25]
H2 Database Engine. http://www.h2database.com.
[26]
[27]
ECHO technical report. http://parasol.tamu.edu/˜jeff/academic/echo-tr.pdf.
[28]
George Kastrinis and Yannis Smaragdakis. Hybrid context-sensitivity for points-to analysis. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, pages 423–434, 2013.
[29]
Manu Sridharan and Rastislav Bod´ık. Refinement-based context-sensitive points-to analysis for java. In Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’06, pages 387–400, 2006.
[30]
Patrick Cousot, Radhia Cousot, and Francesco Logozzo. A parametric segmentation functor for fully automatic and scalable array content analysis. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2011.
[31]
Denis Gopan, Thomas Reps, and Mooly Sagiv. A framework for numeric analysis of array operations. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2005.
[32]
Nicolas Halbwachs and Mathias Péron. Discovering properties about arrays in simple programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2008.
[33]
Weiwei Xiong, Soyeon Park, Jiaqi Zhang, Yuanyuan Zhou, and Zhiqiang Ma. Ad hoc synchronization considered harmful. In USENIX Symposium on Operating Systems Design and Implementation, 2010.
[34]
Jeff Huang and Lawrence Rauchwerger. Finding schedule-sensitive branches. In Joint European Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, 2015.
[35]
Le Yin. Effectively recognize ad hoc synchronizations with static analysis. In LCPC, 2013.
[36]
Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. Ownership types for safe programming: preventing data races and deadlocks. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2002.
[37]
Nicholas D. Matsakis and Thomas R. Gross. A time-aware type system for data-race protection and guaranteed initialization. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2010.
[38]
Chandrasekhar Boyapati and Martin Rinard. A parameterized type system for race-free Java programs. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, 2001.
[39]
Cormac Flanagan and Stephen N. Freund. Type-based race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2000.
[40]
Martin Abadi, Cormac Flanagan, and Stephen N. Freund. Types for safe locking: Static race detection for Java. ACM Trans. Program. Lang. Syst., 28(2):207–255, 2006.
[41]
Bart Jacobs, Frank Piessens, Jan Smans, K. Rustan M. Leino, and Wolfram Schulte. A programming model for concurrent object-oriented programs. ACM Trans. Program. Lang. Syst., 31(1):1:1–1:48, 2008.
[42]
Cormac Flanagan, K. Rustan M. Leino, Mark Lillibridge, Greg Nelson, James B. Saxe, and Raymie Stata. Extended static checking for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2002.
[43]
Mayur Naik and Alex Aiken. Conditional must not aliasing for static race detection. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2007.
[44]
Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. Locksmith: context-sensitive correlation analysis for race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2006.
[45]
Thomas A. Henzinger, Ranjit Jhala, and Rupak Majumdar. Race checking by context inference. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2004.
[46]
Vineet Kahlon, Yu Yang, Sriram Sankaranarayanan, and Aarti Gupta. Fast and accurate static data-race detection for concurrent programs. In International Conference on Computer Aided Verification, 2007.
[47]
Cosmin Radoi and Danny Dig. Practical static race detection for Java parallel loops. In Proceedings of the 2013 International Symposium on Software Testing and Analysis, pages 178–190, 2013.
[48]
Vineet Kahlon, Nishant Sinha, Erik Kruus, and Yun Zhang. Static data race detection for concurrent programs with asynchronous calls. In Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, 2009.
[49]
Christoph von Praun and Thomas R. Gross. Static conflict analysis for multi-threaded object-oriented programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2003.
[50]
Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bod´ık. Demand-driven points-to analysis for java. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, pages 59–76, 2005.
[51]
Diptikalyan Saha and C. R. Ramakrishnan. Incremental and demand-driven points-to analysis using logic programming. In Proceedings of the 7th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pages 117–128, 2005.
[52]
Steven Arzt and Eric Bodden. Reviser: Efficiently updating ide-/ifds-based data-flow analyses in response to incremental program changes. In Proceedings of the 36th International Conference on Software Engineering, pages 288–298, 2014.

Cited By

View all
  • (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)Place your locks wellProceedings of the 32nd USENIX Conference on Security Symposium10.5555/3620237.3620446(3727-3744)Online publication date: 9-Aug-2023
  • (2023)WAFFLE: Exposing Memory Ordering Bugs Efficiently with Active Delay InjectionProceedings of the Eighteenth European Conference on Computer Systems10.1145/3552326.3567507(111-126)Online publication date: 8-May-2023
  • Show More Cited By

Index Terms

  1. ECHO: instantaneous in situ race detection in the IDE

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    FSE 2016: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering
    November 2016
    1156 pages
    ISBN:9781450342186
    DOI:10.1145/2950290
    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: 01 November 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Change-aware
    2. Data Races
    3. IDE
    4. Instantaneous Detection

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    FSE'16
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 17 of 128 submissions, 13%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)107
    • Downloads (Last 6 weeks)10
    Reflects downloads up to 24 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (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)Place your locks wellProceedings of the 32nd USENIX Conference on Security Symposium10.5555/3620237.3620446(3727-3744)Online publication date: 9-Aug-2023
    • (2023)WAFFLE: Exposing Memory Ordering Bugs Efficiently with Active Delay InjectionProceedings of the Eighteenth European Conference on Computer Systems10.1145/3552326.3567507(111-126)Online publication date: 8-May-2023
    • (2023)Change Pattern Detection for Optimising Incremental Static Analysis2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM59687.2023.00016(49-60)Online publication date: 2-Oct-2023
    • (2023)Tolerate Control-Flow Changes for Sound Data Race PredictionProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00118(1342-1354)Online publication date: 14-May-2023
    • (2023)Sound Predictive Fuzzing for Multi-threaded Programs2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC)10.1109/COMPSAC57700.2023.00110(810-819)Online publication date: Jun-2023
    • (2023)Result Invalidation for Incremental Modular AnalysesVerification, Model Checking, and Abstract Interpretation10.1007/978-3-031-24950-1_14(296-319)Online publication date: 16-Jan-2023
    • (2022)SHARP: fast incremental context-sensitive pointer analysis for JavaProceedings of the ACM on Programming Languages10.1145/35273326:OOPSLA1(1-28)Online publication date: 29-Apr-2022
    • (2022)Fast Analysis of Evolving Software Systems2022 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)10.1109/ISSREW55968.2022.00038(49-54)Online publication date: Oct-2022
    • (2021)Sound and efficient concurrency bug predictionProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468549(255-267)Online publication date: 20-Aug-2021
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media