Automated Adaptive Bug Isolation using Dyninst Piramanayagam Arumuga Nainar, Prof. Ben Liblit University of Wisconsin-Madison.

Slides:



Advertisements
Similar presentations
Delta Debugging and Model Checkers for fault localization
Advertisements

A Program Transformation For Faster Goal-Directed Search Akash Lal, Shaz Qadeer Microsoft Research.
Resource Management §A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions.
Stanford University CS243 Winter 2006 Wei Li 1 Register Allocation.
Building a Better Backtrace: Techniques for Postmortem Program Analysis Ben Liblit & Alex Aiken.
Building a Better Backtrace: Techniques for Postmortem Program Analysis Ben Liblit & Alex Aiken.
1 Bug Isolation via Remote Program Sampling Ben LiblitAlex Aiken Alice X. ZhengMichael Jordan Presented By : Arpita Gandhi.
Guoliang Jin, Linhai Song, Wei Zhang, Shan Lu, and Ben Liblit University of Wisconsin–Madison Automated Atomicity- Violation Fixing.
Program Representations. Representing programs Goals.
Statistical Debugging Ben Liblit, University of Wisconsin–Madison.
ABCD: Eliminating Array-Bounds Checks on Demand Rastislav Bodík Rajiv Gupta Vivek Sarkar U of Wisconsin U of Arizona IBM TJ Watson recent experiments.
Bug Isolation via Remote Program Sampling Ben Liblit, Alex Aiken, Alice X.Zheng, Michael I.Jordan Presented by: Xia Cheng.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
Bug Isolation in the Presence of Multiple Errors Ben Liblit, Mayur Naik, Alice X. Zheng, Alex Aiken, and Michael I. Jordan UC Berkeley and Stanford University.
the fourth iteration of this loop is shown here
Approximation Algorithm for Multicut
Using Structure Indices for Efficient Approximation of Network Properties Matthew J. Rattigan, Marc Maier, and David Jensen University of Massachusetts.
4/25/08Prof. Hilfinger CS164 Lecture 371 Global Optimization Lecture 37 (From notes by R. Bodik & G. Necula)
CS590Z Statistical Debugging Xiangyu Zhang (part of the slides are from Chao Liu)
Statistical Debugging: A Tutorial Steven C.H. Hoi Acknowledgement: Some slides in this tutorial were borrowed from Chao Liu at UIUC.
Tirgul 8 Universal Hashing Remarks on Programming Exercise 1 Solution to question 2 in theoretical homework 2.
Incremental Path Profiling Kevin Bierhoff and Laura Hiatt Path ProfilingIncremental ApproachExperimental Results Path profiling counts how often each path.
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Recap from last time: live variables x := 5 y := x + 2 x := x + 1 y := x y...
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Bug Isolation via Remote Program Sampling Ben LiblitAlex Aiken Alice ZhengMike Jordan.
Software Bug Localization with Markov Logic Sai Zhang, Congle Zhang University of Washington Presented by Todd Schiller.
University of Michigan Electrical Engineering and Computer Science 1 Practical Lock/Unlock Pairing for Concurrent Programs Hyoun Kyu Cho 1, Yin Wang 2,
A Randomized Approach to Robot Path Planning Based on Lazy Evaluation Robert Bohlin, Lydia E. Kavraki (2001) Presented by: Robbie Paolini.
Software Systems Verification and Validation Laboratory Assignment 3
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Scalable Statistical Bug Isolation Ben Liblit, Mayur Naik, Alice Zheng, Alex Aiken, and Michael Jordan, 2005 University of Wisconsin, Stanford University,
Scalable Statistical Bug Isolation Ben Liblit, Mayur Naik, Alice Zheng, Alex Aiken, and Michael Jordan University of Wisconsin, Stanford University, and.
Bug Localization with Machine Learning Techniques Wujie Zheng
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
Scalable Statistical Bug Isolation Authors: B. Liblit, M. Naik, A.X. Zheng, A. Aiken, M. I. Jordan Presented by S. Li.
Which Configuration Option Should I Change? Sai Zhang, Michael D. Ernst University of Washington Presented by: Kıvanç Muşlu.
Cooperative Concurrency Bug Isolation Guoliang Jin, Aditya Thakur, Ben Liblit, Shan Lu University of Wisconsin–Madison Instrumentation and Sampling Strategies.
Chapter 8 Evaluating Search Engine. Evaluation n Evaluation is key to building effective and efficient search engines  Measurement usually carried out.
Chapter 18: Searching and Sorting Algorithms. Objectives In this chapter, you will: Learn the various search algorithms Implement sequential and binary.
Introduction to Code Generation Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice.
“Isolating Failure Causes through Test Case Generation “ Jeremias Rößler Gordon Fraser Andreas Zeller Alessandro Orso Presented by John-Paul Ore.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
Bug Localization with Association Rule Mining Wujie Zheng
Bug Isolation via Remote Sampling. Lemonade from Lemons Bugs manifest themselves every where in deployed systems. Each manifestation gives us the chance.
Aditya Thakur Rathijit Sen Ben Liblit Shan Lu University of Wisconsin–Madison Workshop on Dynamic Analysis 2009 Cooperative Crug Isolation.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Statistical Debugging CS Motivation Bugs will escape in-house testing and analysis tools –Dynamic analysis (i.e. testing) is unsound –Static analysis.
2/22/2016© Hal Perkins & UW CSEP-1 CSE P 501 – Compilers Register Allocation Hal Perkins Winter 2008.
White Box Testing by : Andika Bayu H.
Cooperative Bug Isolation CS Outline Something different today... Look at monitoring deployed code –Collecting information from actual user runs.
Testing (final thoughts). equals() and hashCode() Important when using Hash-based containers class Duration { public final int min; public final int sec;
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
Bug Isolation via Remote Program Sampling Ben LiblitAlex Aiken Alice X. ZhengMichael I. Jordan UC Berkeley.
Optimistic Hybrid Analysis
Efficient Instrumentation for Code Coverage Testing
Software Testing.
Online Subpath Profiling
Types of Testing Visit to more Learning Resources.
White-Box Testing.
Testing, conclusion Based on material by Michael Ernst, University of Washington.
Public Deployment of Cooperative Bug Isolation
Software Testing (Lecture 11-a)
White-Box Testing.
Register Allocation Hal Perkins Summer 2004
Register Allocation Hal Perkins Autumn 2005
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Disjoint Sets DS.S.1 Chapter 8 Overview Dynamic Equivalence Classes
CUTE: A Concolic Unit Testing Engine for C
Presentation transcript:

Automated Adaptive Bug Isolation using Dyninst Piramanayagam Arumuga Nainar, Prof. Ben Liblit University of Wisconsin-Madison

Cooperative Bug Isolation (CBI) Program Source Compiler Sampler Predicates Shipping Application Counts & /       ‚  Statistical Debugging Top bugs with likely causes ++branch_17[p != 0]; if (p) … else …

Problem with static instrumentation –Predicates are fixed for entire lifetime –Three problems 1.Worst case assumption 2.Cannot stop counting predicates –After collecting enough data 3.Cannot add predicates we missed Current infrastructure supports only C programs Issues

user CBI for Binaries Program Source Compiler Shipping Application Counts & /  Statistical Debugging Top bugs with likely causes Executable Predicates New Executable Binary editor developer Compiler

Adaptive Bug Isolation Strategy: –Adaptively add/remove predicates Based on feedback reports Retain existing statistical analysis –Goal is to guide CBI to its best bug predictor Reduce the number of predicates instrumented

Adaptive Bug Isolation (contd.) Program Source Compiler Shipping Application Counts & /  Statistical Debugging (with adaptivity) Top bugs with likely causes Executable New Executable Binary editor Predicates Compiler

Dyninst Instrumentor - Features Counters in shared segment Removes snippets –After they execute once Call graph, CFG, dominator graphs Snippets are feather weight –Don’t save/restore FPRs More… –Better overheads –Expose data dependencies

Technique Control Dependence Graph (CDG) Algorithm: –For each suspect branch edge: Enable all predicates in –basic blocks control dependent on that edge How to identify suspect edges? –Pessimistic - all edges are suspect A B

Simple strategy: BFS All branch predicates are suspicious if

Can we do better? Assign scores to each predicate Edges with high scores are suspect –Many options Top 10 Top 10% Score > threshold –For our experiments, only the topmost predicate –Other predicates: may be revisited in future Key property: If no bug is found, no predicate is left unexplored

Many possibilities. We evaluate five For a branch predicate p, –F (p) = no. of failed runs in which p was true –S (p) = no. of successful runs in which p was true 1.Failure count: F (p) 2.Failure probability: F (p) / (F (p) + S (p)) 3.T-Test Pr (p being true affects program outcome in a statistically significant manner) Scores – heuristics 1,2,3 SuccFail. p true30%70% p false50%

Scores - heuristic 4 4.Importance (p) –CBI’s ranking heuristic [PLDI ’05] –Harmonic mean of two values –For a branch predicate ‘p’: Sensitivity –log (F (p)) / log (total failures observed) Increase –Pr (Failure) at P 2 – Pr (Failure) at P 1 P2P2 P1P1

Scores - heuristic 5 5.Maximum possible Importance score Problem: sometimes, Importance (p) mirrors p’s properties and says nothing about the branch’s targets score (p) = Maximum possible Importance score in p’s targets 0/0 s/f 0/f s/f s/0 Edge label a/b means Predicate was true in ‘ a ’ successful runs Predicate was true in ‘ b ’ failed runs

Oracle –points in the direction of the target (the top bug predictor) –Used for evaluation of the results –Shortest path in CDG Optimal heuristic

Evaluation Binary Instrumentor: using DynInst Heuristics: –5 global ranking heuristics –simplest approach: BFS –optimal approach: Oracle Bug benchmarks –siemens test suite Goal: identify the best predicate efficiently –Best predicate: as per the PLDI ’05 algo. –efficiency: no. of predicates examined

Evaluation (cont.)

Conclusion Use binary instrumentation to –Skip bug free regions  more data from interesting sites Fairly general –Can be applied to any CBI-like tool Backward search – in progress

Questions?

Using DynInst Large slowdowns Reduce no. of branch predicates Gathering true/false values instead of counts 1. No increment. Just store 1 (true) 2. Self-removing instrumentation – Removes itself after executing – Applies only to dynamic instrumentation Better performance: 2-3 times slowdown for go – But not enough Binary Instrumentor 25 times for go (SPEC) If program crashes between p 1 and p 2 c 1 = c 2 + c else c 1 = c 2 + c 3 if c1c1 c2c2 c3c3

Branch predicate inference c 1 can inferred if –P 1 dominates P 2 –P 2 or P 5 have an instrumentation site (in general, any block equivalent to P 2 ) P1P1 P2P2 P3P3 P4P4 P5P5 c1c1 P2P2 P5P5

Choose one branch over the other –Strategy: if Pr (statistically significant difference) > 95%: –Only then path is interesting else both then and else paths are interesting Can we do better? SuccFail. then path 30%70% else path 50% Program fails more often in the then path Pr (there is a significant difference in the two directions) use T-Test (paired)

Simple strategy: BFS All branch predicates are suspicious if