Dynamic Bug Detection & Tolerance Kathryn S McKinley The University of Texas at Austin.

Slides:



Advertisements
Similar presentations
Department of Computer Sciences Dynamic Shape Analysis via Degree Metrics Maria Jump & Kathryn S. McKinley Department of Computer Sciences The University.
Advertisements

Chapter 4 Memory Management Basic memory management Swapping
Paging: Design Issues. Readings r Silbershatz et al: ,
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
Advanced Pipelining Optimally Scheduling Code Optimally Programming Code Scheduling for Superscalars (6.9) Exceptions (5.6, 6.8)
Michael Bond Kathryn McKinley The University of Texas at Austin Presented by Na Meng Most of the slides are from Mike’s original talk. Many thanks go to.
CSC 213 – Large Scale Programming. Today’s Goals  Consider what new does & how Java works  What are traditional means of managing memory?  Why did.
Department of Computer Sciences Cork: Dynamic Memory Leak Detection with Garbage Collection Maria Jump Kathryn S. McKinley
Guoquing Xu, Atanas Rountev Ohio State University Oct 9 th, 2008 Presented by Eun Jung Park.
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
CORK: DYNAMIC MEMORY LEAK DETECTION FOR GARBAGE- COLLECTED LANGUAGES A TRADEOFF BETWEEN EFFICIENCY AND ACCURATE, USEFUL RESULTS.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Continuously Recording Program Execution for Deterministic Replay Debugging.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
Turning Eclipse Against Itself: Finding Errors in Eclipse Sources Benjamin Livshits Stanford University.
Lecture 36: Programming Languages & Memory Management Announcements & Review Read Ch GU1 & GU2 Cohoon & Davidson Ch 14 Reges & Stepp Lab 10 set game due.
OS Spring’03 Introduction Operating Systems Spring 2003.
CS590 Z Software Defect Analysis Xiangyu Zhang. CS590F Software Reliability What is Software Defect Analysis  Given a software program, with or without.
PathExpander: Architectural Support for Increasing the Path Coverage of Dynamic Bug Detection S. Lu, P. Zhou, W. Liu, Y. Zhou, J. Torrellas University.
Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Data Structures and Programming.  John Edgar2.
Tolerating Memory Leaks Michael D. Bond Kathryn S. McKinley.
Michael Bond Kathryn McKinley The University of Texas at Austin.
CSCI 5801: Software Engineering
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
Computer Security and Penetration Testing
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
1 Fast and Efficient Partial Code Reordering Xianglong Huang (UT Austin, Adverplex) Stephen M. Blackburn (Intel) David Grove (IBM) Kathryn McKinley (UT.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
Frontiers in Massive Data Analysis Chapter 3.  Difficult to include data from multiple sources  Each organization develops a unique way of representing.
CSC 213 – Large Scale Programming. Today’s Goals  Consider what new does & how Java works  What are traditional means of managing memory?  Why did.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
Chameleon Automatic Selection of Collections Ohad Shacham Martin VechevEran Yahav Tel Aviv University IBM T.J. Watson Research Center Presented by: Yingyi.
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
1 Lecture: Large Caches, Virtual Memory Topics: cache innovations (Sections 2.4, B.4, B.5)
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
CSC 213 – Large Scale Programming. Explicit Memory Management  Traditional form of memory management  Used a lot, but fallen out of favor  malloc /
Dynamic Control of Coding for Progressive Packet Arrivals in DTNs.
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
Fuzzing And Oracles By: Thomas Sidoti. Overview Introduction Motivation Fuzzable Exploits Oracles Implementation Fuzzing Results.
Tracking Bad Apples: Reporting the Origin of Null & Undefined Value Errors Michael D. Bond UT Austin Nicholas Nethercote National ICT Australia Stephen.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Static Analysis Introduction Emerson Murphy-Hill.
W4118 Operating Systems Instructor: Junfeng Yang.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Memory Management 5/11/2018 9:49 PM
Interpreted languages Jakub Yaghob
YAHMD - Yet Another Heap Memory Debugger
Lecture: Large Caches, Virtual Memory
Cork: Dynamic Memory Leak Detection with Garbage Collection
Memory Management 6/20/ :27 PM
Seminar in automatic tools for analyzing programs with dynamic memory
Object-Orientated Programming
COTS testing Tor Stålhane.
COTS testing Tor Stålhane.
Arrays and Linked Lists
Human Complexity of Software
Jipeng Huang, Michael D. Bond Ohio State University
(A Research Proposal for Optimizing DBMS on CMP)
Created By: Asst. Prof. Ashish Shah, J.M.Patel College, Goregoan West
Lecture 4: Instruction Set Design/Pipelining
Presentation transcript:

Dynamic Bug Detection & Tolerance Kathryn S McKinley The University of Texas at Austin

Software Developer Dreams

Easy to implement specifications Easy to get correct Robust to errors of all sorts Easy to maintain Runs fast

Reality thanks to David Callahan

Software Developer Dreams people-who-want-computers-to-do-things Easy to implement specifications Easy to get correct Robust to errors of all sorts Easy to maintain Runs fast

Software Developer Dreams people-who-want-computers-to-do-things Easy to implement specifications Easy to get correct learn & get results Robust to errors of all sorts Easy to maintain Runs fast

Software Developer Dreams people-who-want-computers-to-do-things Easy to implement specifications Easy to get correct learn & get results Robust to errors of all sorts Easy to maintain Runs fast Operating Environment Survives No unrecoverable data loss No observable implementation artifacts No violations of security or privacy policies

Software Developer Dreams people-who-want-computers-to-do-things Easy to implement specifications Easy to get correct learn & get results Robust to errors of all sorts Easy to maintain share Runs fast enough and consistently Operating Environment Survives No unrecoverable data loss No observable implementation artifacts No violations of security or privacy policies

Impediments to Reality & the Dream Applications are more complicated –In 10 years, Windows grew from 10M to 50M lines –Application knowledge spread thin –Testing is not enough Architectures are more complicated –Transistors on a chip [Moore’s law]: 180,000 transistors - First CMOS Vax ,000,000 transistors - Core2 Duo 2007 –Many core The glue is more complicated –Dynamic optimization & runtime systems –Coordination of multiple languages and runtime systems –Impossible to test all scenarios Difficult to understand programs or runtime behavior

Multi-pronged Approach to Correct High Performance Software Better languages –Java and C# are not the last programming languages Validation when possible –We probably will not be able to validate substantial parallel applications any time soon –Is application growth outpacing validation advances? Analysis and development tools –Static bug finding tools –Dynamic bug finding tools Self healing & dynamically updatable systems –Don’t crash Run Fast –New optimization opportunities move code & data around use JIT to specialize to input data Evaluation

Detect, Report, & Tolerate Bugs Memory errors –find leaks [Bond ASPLOS 2006, Jump POPL 2007] –tolerate leaks [Bond in progress] Null pointer exceptions –store a PC canary instead of zero for null [Bond et al. OOPSLA 2007] –keep running [Kent/Bond, in progress] Untested control paths & security holes –low cost probabilistic calling context [Bond OOPSLA 2007] Random semantic errors –data structure repair [ Elkarablieh et al. OOPLSA 2007] –heap analysis [Jump in progress] –keep running [Kent/Bond in progress] Dynamic software updating –update software while it is running [Subramanian in progress]

Best case: increases GC workload Worst case: systematic heap growth causes crash after days of execution A memory leak in a garbage-collected language occurs when a program inadvertently maintains references to objects that it no longer needs, preventing the collector from reclaiming space. Cork accurately pinpoints systematic heap growth during production runs Memory Leaks Maria Jump [POPL 2007]

Cork’s Solution: Find growing data structures 1.Summarize heap objects by class & reference relationships Calculate class points-from graph Piggyback on full-heap object scan 2. Difference the graphs 3.Generate debugging reports Candidate Report Data Structure Slice Report Allocation Site Report

3 Class Points-From Graph Heap CPFG =instance =class =HashTable =Queue =Company =People

Difference CPFGs CPFG i 1 1 1

1 Difference CPFGs CPFG i CPFG i

1 Difference TPFGs CPFG i CPFG i

Difference TPFGs CPFG i CPFG i CPFG i

Eclipse Heap Occupancy (MB) Time (MB of allocation)

Eclipse : CPFG 3365 classes loaded (1773 in Eclipse) 667 nodes 4090 edges

Eclipse : Candidates Identify as candidates if r t < r thres 7 candidates String[] Object[] ArrayList Folder ResourceCompareInput$ FilteredBufferedResourceNode File Path

Eclipse : Slice Calculate slice from each candidate: Set of all paths ( n 0 … n n ) s.t. r n(k+1)  n(k) <0 String[] Object[] ArrayList Folder ResourceCompareInput$ FilteredBufferedResourceNode File Path

Slice Diagram Path Folder File ResourceCompareInput$ FilteredBufferedResourceNode ArrayList Object[] PropertyListenerList RuleBasedCollator ResourceCompareInput$ MyDiffNode HashMap$ HashEntry HashMap$ HashEntry[] HashMap ResourceCompareInput ElementTree$ ChildIDsCache ElementTree Candidate Non-candidate String[] JarFile CompareConfiguration IPath[]

Eclipse Heap Occupancy (MB) Time (MB of allocation)

Tolerating Memory Leaks [Mike Bond: work in progress] Problem: –Identified leaks take time to fix –In the mean time, they degrade application and GC performance, or crash the program Solution: –Managed languages provide an opportunity to reorganize memory

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B D A C Roots G

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B D A C Roots G (1) Identify stale memory

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B A C Roots G B stub B scion D (2) Move stale memory out of application & collector working set

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B A C Roots G B stub B scion D (3) OS pages stale space to disk & compresses it

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B A C Roots G B stub B scion (4) Activate object if touched D

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B A C Roots G B stub B scion D (4) Activate object if touched

Tolerating Memory Leaks Stale SpaceIn-Use Space E F B A C Roots G B stub B scion Illusion of fixed leak! D

Throughput of Eclipse Leak

Multi-pronged Approach to Correct High Performance Software Better languages –Java and C# are not the last programming languages Validation when possible –We probably will not be able to validate substantial parallel applications any time soon –Is application growth outpacing validation advances? Analysis and development tools –Static bug finding tools –Dynamic bug finding tools Self healing & dynamically updatable systems –Don’t crash Run Fast –New optimization opportunities move code & data around use JIT to specialize to input data Evaluation

Thank you!