LeakChaser: Helping Programmers Narrow Down Causes of Memory Leaks Guoqing Xu, Michael D. Bond, Feng Qin, Atanas Rountev Ohio State University.

Slides:



Advertisements
Similar presentations
Author: Carlos Pacheco, Shuvendu K. Lahiri, Michael D. Ernst, Thomas Ball MIT CSAIL.
Advertisements

Copyright W. Howden1 Programming by Contract CSE 111 6/4/2014.
Uncovering Performance Problems in Java Applications with Reference Propagation Profiling PRESTO: Program Analyses and Software Tools Research Group, Ohio.
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
Resurrector: A Tunable Object Lifetime Profiling Technique Guoqing Xu University of California, Irvine OOPSLA’13 Conference Talk 1.
1 Perracotta: Mining Temporal API Rules from Imperfect Traces Jinlin Yang David Evans Deepali Bhardwaj Thirumalesh Bhat Manuvir Das.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Precise Memory Leak Detection for Java Software Using Container Profiling.
Guoquing Xu, Atanas Rountev Ohio State University Oct 9 th, 2008 Presented by Eun Jung Park.
LOW-OVERHEAD MEMORY LEAK DETECTION USING ADAPTIVE STATISTICAL PROFILING WHAT’S THE PROBLEM? CONTRIBUTIONS EVALUATION WEAKNESS AND FUTURE WORKS.
CORK: DYNAMIC MEMORY LEAK DETECTION FOR GARBAGE- COLLECTED LANGUAGES A TRADEOFF BETWEEN EFFICIENCY AND ACCURATE, USEFUL RESULTS.
ISBN Chapter 3 Describing Syntax and Semantics.
CS 355 – Programming Languages
SOS: Saving Time in Dynamic Race Detection with Stationary Analysis Du Li, Witawas Srisa-an, Matthew B. Dwyer.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Overview of Databases and Transaction Processing Chapter 1.
Finding Low-Utility Data Structures Guoqing Xu 1, Nick Mitchell 2, Matthew Arnold 2, Atanas Rountev 1, Edith Schonberg 2, Gary Sevitsky 2 1 Ohio State.
Lecture #4 Agenda Cell phones off & name signs out Review Questions? Objects The birds-and-the-bees talk.
1 Refinement-Based Context-Sensitive Points-To Analysis for Java Manu Sridharan, Rastislav Bodík UC Berkeley PLDI 2006.
An Adaptive, Region-based Allocator for Java Feng Qian & Laurie Hendren 2002.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
Describing Syntax and Semantics
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Quarantine: A Framework to Mitigate Memory Errors in JNI Applications Du Li , Witawas Srisa-an University of Nebraska-Lincoln.
Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Precise Memory Leak Detection for Java Software Using Container Profiling Guoqing Xu, Atanas Rountev Program analysis and software tools group Ohio State.
Tolerating Memory Leaks Michael D. Bond Kathryn S. McKinley.
Michael Bond Kathryn McKinley The University of Texas at Austin.
Language Evaluation Criteria
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
An Adaptive, Region-based Allocator for Java Feng Qian, Laurie Hendren {fqian, Sable Research Group School of Computer Science McGill.
Interpreted Declarative Representations of Task Knowledge June 21, 2012 Randolph M. Jones, PhD.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Semantics-Aware Performance Optimization Harry Xu CS Departmental Seminar 01/13/2012.
 What software components are required?  How do I install the Oracle JDBC driver?  How do I connect to the database?  What form is the data in and.
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
1 Causal-Consistent Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna,
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Rethinking Soot for Summary-Based Whole- Program Analysis PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Dacong Yan.
Replication and Consistency (3). Reference r Automated Hoarding for Mobile Computers by G. Kuenning and G. Popek.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Automatic Heap Sizing: Taking Real Memory into Account Ting Yang, Emery Berger,
Writing Systems Software in a Functional Language An Experience Report Iavor Diatchki, Thomas Hallgren, Mark Jones, Rebekah Leslie, Andrew Tolmach.
September 11, 2003 Beltway: Getting Around GC Gridlock Steve Blackburn, Kathryn McKinley Richard Jones, Eliot Moss Modified by: Weiming Zhao Oct
Static Detection of Loop-Invariant Data Structures Harry Xu, Tony Yan, and Nasko Rountev University of California, Irvine Ohio State University 1.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
Chapter 7 The Practices: dX. 2 Outline Iterative Development Iterative Development Planning Planning Organizing the Iterations into Management Phases.
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Storage Systems CSE 598d, Spring 2007 Rethink the Sync April 3, 2007 Mark Johnson.
Chapter 1 Overview of Databases and Transactions.
GARBAGE COLLECTION IN AN UNCOOPERATIVE ENVIRONMENT Hans-Juergen Boehm Computer Science Dept. Rice University, Houston Mark Wieser Xerox Corporation, Palo.
ICFEM 2002, Shanghai Reasoning about Hardware and Software Memory Models Abhik Roychoudhury School of Computing National University of Singapore.
CoCo: Sound and Adaptive Replacement of Java Collections Guoqing (Harry) Xu Department of Computer Science University of California, Irvine.
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Vertical Profiling : Understanding the Behavior of Object-Oriented Applications Sookmyung Women’s Univ. PsLab Sewon,Moon.
Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin Nicholas Nethercote National ICT Australia Stephen.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Nguyen Thi Thanh Nha HMCL by Roelof Kemp, Nicholas Palmer, Thilo Kielmann, and Henri Bal MOBICASE 2010, LNICST 2012 Cuckoo: A Computation Offloading Framework.
Optimistic Hybrid Analysis
Cork: Dynamic Memory Leak Detection with Garbage Collection
Engineering and Debugging an App Chapter 15
Building a Whole-Program Type Analysis in Eclipse
High Coverage Detection of Input-Related Security Faults
CSC 143 Error Handling Kinds of errors: invalid input vs programming bugs How to handle: Bugs: use assert to trap during testing Bad data: should never.
Demand-Driven Context-Sensitive Alias Analysis for Java
JIT Compiler Design Maxine Virtual Machine Dhwani Pandya
Presentation transcript:

LeakChaser: Helping Programmers Narrow Down Causes of Memory Leaks Guoqing Xu, Michael D. Bond, Feng Qin, Atanas Rountev Ohio State University

Java Memory Leaks Objects are reachable, but not used – Kept by unnecessary references Existing memory leak detection techniques – Unaware of program semantics: track arbitrary objects – No focus: profiling the whole execution--- real causes buried in a sea of likely problems Developer insight is necessary in leak detection—a three-tier approach to exploit such insight Tier L Tier M Tier H 2 Manual LeakChaser Manual LeakChaser Manual LeakChaser

Exploiting Developer Insight 3 Heap assertions – GC Assertions: A reachability-based assertion framework [Aftandilian-PLDI’09] – E.g., assertOwns(a, b) – Works only for objects that have low-level structural reachability relationships Lifetime invariants exist in large-scale apps – Lifetimes for certain objects are strongly correlated Screen s = new Screen(…); Configuration c = new Configuration(); /*s and c should always be created together and eventually die together */

Tier L: Low-Level Liveness Assertions An assertion framework to specify lifetime relationships – assertDiesBefore(c, s) // s: Screen, c: Configuration – assertDiesBeforeAlloc(s, s) Our framework vs GC Assertions – Can be used to assert objects that have high-level semantic relationships (instead of low-level structural relationships) 4

High-Level Events: Transactions Frequently-executed code regions – Likely to contain memory leaks – Inspired by EJB transactions Allow programmers to specify transactions 5 ResultSet runQuery(String query){ Connection c = getConnection(…); Statement s = c.createStmt(); ResultSet r = s.executeQuery(query); return r; } … … … Heap

Transaction Specification Transaction – A user-specified spatial boundary – A transaction identifier object that is correlated with the livenss of this region: temporal boundary 6 ResultSet runQuery(String query){ transaction { Connection c = getConnection(…); Statement s = c.createStmt(); ResultSet r = s.executeQuery(query); } return r; } (query)

Tier M: Checking Transaction Properties Semantics for each object o created in this transaction do assertDiesBefore (o, query) Share region for each object o created in this transaction if o is not created in share do assertDiesBefore (o, query) 7 ResultSet runQuery(String query){ transaction (query) { Connection c = getConnection(…); share{ Statement s = c.createStmt(); globalMap.cache(s); } ResultSet r = s.executeQuery(query); } return r; } Programmers do not need to understand implementation details to use low-level assertions

Tier H: Inferring Transaction Properties Minimum requirement for user involvement – Specify a transaction – Tell LeakChaser it runs in the inference mode Semantics for each o created in this transaction if assertDiesBefore (o, query) = false startTrackStaleness(o) if(o.staleness >= S) reportLeak(); 8 ResultSet runQuery(String query){ transaction (query ) { Connection c = getConnection(…); Statement s = c.createStmt(); globalMap.cache(s); ResultSet r = s.executeQuery(query); } return r; }, INFER Programmers let LeakChaser do most of the work

Three-Tier Approach Tier H, Tier M, and Tier L – Decreasing levels of abstraction – More knowledge required for diagnosis – Increased precision LeakChaser: an iterative diagnosis process – Start Tier H with little knowledge – Gradually explore leaky behaviors to locate the root cause 9

Case Studies Six case studies on real-world applications – Eclipse diff (bug #115789) – SPECJbb 2000: LeakChaser found a memory problem never reported before – Eclipse editor (bug #139465): quickly concluded that this was not a bug – Eclipse WTP (bug #155898): found the cause for this bug that was reported three years ago and is still open – MySQL leak – Mckoi leak: first time found that a leaking thread is the root cause The ability of diagnosing problems for a large system at its client 10

Implementation Jikes RVM – Works for both baseline and optimizing compilers – Works for all non-generational tracing GCs Overhead on FastAdaptiveImmix (average) – Infrastructure: 10% on time, less than 10% on space – Transactions: 2.3X slowdown for transactions 11

Conclusions A three-tier approach for semantics-aware leak detection An implementation in Jikes RVM The transaction constructs can be easily incorporated into the Java language to help memory problem diagnosis LeakChaser is available for download – 12

Thank you 13