Artemis: Practical Runtime Monitoring of Applications for Execution Anomalies Long Fei and Samuel P. Midkiff School of Electrical and Computer Engineering.

Slides:



Advertisements
Similar presentations
Runtime Techniques for Efficient and Reliable Program Execution Harry Xu CS 295 Winter 2012.
Advertisements

Ditto: Speeding Up Runtime Data Structure Invariant Checks AJ Shankar and Ras Bodik UC Berkeley.
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
ECE 454 Computer Systems Programming Compiler and Optimization (I) Ding Yuan ECE Dept., University of Toronto
Code optimization: –A transformation to a program to make it run faster and/or take up less space –Optimization should be safe, preserve the meaning of.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
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.
Discovery of Locality-Improving Refactorings by Reuse Path Analysis – Kristof Beyls – HPCC pag. 1 Discovery of Locality-Improving Refactorings.
Bug Isolation via Remote Program Sampling Ben Liblit, Alex Aiken, Alice X.Zheng, Michael I.Jordan Presented by: Xia Cheng.
NATW 2008 Using Implications for Online Error Detection Nuno Alves, Jennifer Dworak, R. Iris Bahar Division of Engineering Brown University Providence,
ATOM: A System for Building Customized Program Analysis Tools.
1 Low Overhead Program Monitoring and Profiling Department of Computer Science University of Pittsburgh Pittsburgh, Pennsylvania {naveen,
Yuanyuan ZhouUIUC-CS Architectural Support for Software Bug Detection Yuanyuan (YY) Zhou and Josep Torrellas University of Illinois at Urbana-Champaign.
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael Ernst, Jake Cockrell, William Griswold, David Notkin Presented by.
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Techniques for Efficient Processing in Runahead Execution Engines Onur Mutlu Hyesoon Kim Yale N. Patt.
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Code Coverage Testing Using Hardware Performance Monitoring Support Alex Shye, Matthew Iyer, Vijay Janapa Reddi and Daniel A. Connors University of Colorado.
Winter Retreat Connecting the Dots: Using Runtime Paths for Macro Analysis Mike Chen, Emre Kıcıman, Anthony Accardi, Armando Fox, Eric Brewer
Checking Memory Safety with BLAST Dirk Beyer, et al. FASE 2005 KAIST CS750b 2006 Fall Seonggun Kim.
University of Michigan Electrical Engineering and Computer Science 1 Practical Lock/Unlock Pairing for Concurrent Programs Hyoun Kyu Cho 1, Yin Wang 2,
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Background (Floating-Point Representation 101)  Floating-point represents real numbers as (± sig × 2 exp )  Sign bit  Significand (“mantissa” or “fraction”)
Michael Ernst, page 1 Collaborative Learning for Security and Repair in Application Communities Performers: MIT and Determina Michael Ernst MIT Computer.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
© Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew Ireland Computing & Electrical Engineering.
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Research, Development, Consulting, Training High Fidelity Modeling and Simulation Where we are going… …future plans.
Ether: Malware Analysis via Hardware Virtualization Extensions Author: Artem Dinaburg, Paul Royal, Monirul Sharif, Wenke Lee Presenter: Yi Yang Presenter:
School of Electrical Engineering and Computer Science University of Central Florida Anomaly-Based Bug Prediction, Isolation, and Validation: An Automated.
CS453 Lecture 3.  A sequential algorithm is evaluated by its runtime (in general, asymptotic runtime as a function of input size).  The asymptotic runtime.
Eraser: A Dynamic Data Race Detector for Multithreaded Programs STEFAN SAVAGE, MICHAEL BURROWS, GREG NELSON, PATRICK SOBALVARRO, and THOMAS ANDERSON Ethan.
Martin Schulz Center for Applied Scientific Computing Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory, P. O. Box 808, Livermore,
Using Likely Program Invariants to Detect Hardware Errors Swarup Kumar Sahoo, Man-Lap Li, Pradeep Ramachandran, Sarita Adve, Vikram Adve, Yuanyuan Zhou.
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.
University of Maryland Dynamic Floating-Point Error Detection Mike Lam, Jeff Hollingsworth and Pete Stewart.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler.
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
Determina, Inc. Persisting Information Across Application Executions Derek Bruening Determina, Inc.
Bug Isolation via Remote Sampling. Lemonade from Lemons Bugs manifest themselves every where in deployed systems. Each manifestation gives us the chance.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Compiler Optimizations ECE 454 Computer Systems Programming Topics: The Role of the Compiler Common Compiler (Automatic) Code Optimizations Cristiana Amza.
Detecting Inefficiently-Used Containers to Avoid Bloat Guoqing Xu and Atanas Rountev Department of Computer Science and Engineering Ohio State University.
Detecting Atomicity Violations via Access Interleaving Invariants
Fault Isolation in Multicast Trees Anoop Reddy, Ramesh Govindan, Deborah Estrin. USC/Information Sciences Institute Presented by: Srikrishna Gurugubelli.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Best detection scheme achieves 100% hit detection with
Automated Adaptive Bug Isolation using Dyninst Piramanayagam Arumuga Nainar, Prof. Ben Liblit University of Wisconsin-Madison.
1 ROGUE Dynamic Optimization Framework Using Pin Vijay Janapa Reddi PhD. Candidate - Electrical And Computer Engineering University of Colorado at Boulder.
Testing Concurrent Programs Sri Teja Basava Arpit Sud CSCI 5535: Fundamentals of Programming Languages University of Colorado at Boulder Spring 2010.
Michael J. Voss and Rudolf Eigenmann PPoPP, ‘01 (Presented by Kanad Sinha)
Slide 1/20 Automatic Problem Localization via Multi- dimensional Metric Profiling Ignacio Laguna 1, Subrata Mitra 2, Fahad A. Arshad 2, Nawanol Theera-Ampornpunt.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Optimistic Hybrid Analysis
Experience Report: System Log Analysis for Anomaly Detection
Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code
YAHMD - Yet Another Heap Memory Debugger
CSC 591/791 Reliable Software Systems
Olatunji Ruwase* Shimin Chen+ Phillip B. Gibbons+ Todd C. Mowry*
runtime verification Brief Overview Grigore Rosu
State your reasons or how to keep proofs while optimizing code
Indranil Roy High Performance Computing (HPC) group
CUTE: A Concolic Unit Testing Engine for C
Detecting Attacks Against Robotic Vehicles:
Presentation transcript:

Artemis: Practical Runtime Monitoring of Applications for Execution Anomalies Long Fei and Samuel P. Midkiff School of Electrical and Computer Engineering Purdue University, West Lafayette PLDI 2006 Subproject of PROBE

PLDI06 Motivation Bugs are expensive! Cost in 2002: 60 billion dollars, 0.6% GDP Debugging Approaches Manual debugging – inefficient, impossible Extensive testing – inefficient, path explosion Static analysis – conservative, false alarms Manual annotation – inefficient, not scalable Runtime debugging – high overhead

PLDI06 What is Artemis? Is not a bug detection tool Makes existing tools more efficient in bug detection program execution runtime analysis program execution Artemis runtime analysis Existing schemes: a few times slowdown is common, can be up to 2 orders of magnitude With Artemis, much less data is examined by runtime analysis, reducing overhead to <10% in long-running programs

PLDI06 Outline for the Rest of the Talk Birds eye view of related work Artemis framework Experimental results Conclusions

PLDI06 Birds Eye View of Compiler-Aided Debugging Techniques compiler techniques software debugging static dynamic runtime overhead faster parallel selective no program information use program information sampling random adaptive Artemis More efficient design Problem specific Usually involves assumptions about OS, compiler, or hardware Exploit parallelism Shadow checking process (Patil SPE97) Thread-level speculation (Oplinger ASPLOS02) Perform fewer checks Liblit PLDI03 Chilimbi ASPLOS04

PLDI06 Artemis Design Goals General Work with multiple pre-existing debugging schemes Pure software approach that works with general hardware, OS and compiler Effective Improve overhead in general Have low asymptotic overhead in long-running programs Adaptive Adjust coverage of monitoring to system load

PLDI06 Key Idea Because runtime monitoring is expensive … want to monitor only when a bug occurs Our goal is to approximate this avoid re-monitoring executions whose outcome has been previously observed

PLDI06 How to Determine Where Bugs are Likely to be Seen Code region behavior (and bug behavior) is determined by regions context Monitor the 1 st time a region executes under a context If buggy, the bug is monitored if not buggy, only monitor this region with this context once Over time, almost all executions of a region have a previously seen context – yields low asymptotic monitoring overhead Hard part – efficiently representing, storing and comparing contexts for a region The context could be the whole program state! Region Context Outcome

PLDI06 Decision to Monitor first entrance ? context seen before ? initialize context update context record, add current context use monitored version use unmonitored version NY YN code segment entrance

PLDI06 Target Programs Our prototype targets sequential code regions Determined by how contexts are defined Can be used with race-free programs without loss of precision Target the sequential regions of these programs Use with programs with races is ongoing research

PLDI06 Implementation Issues Define code regions Represent and compare contexts Interface with existing runtime debugging schemes Adhere to overhead constraints Adapt to system load

PLDI06 Defining Code Regions Spatial granularity Temporal granularity: Context check frequency Context check efficiency Ideal case: a small context dominates the behavior of a large piece of code Our choice: Procedure: natural logic boundary

PLDI06 Approximating Context for Efficiency Exact Context Too large to store and check (might be entire program state) Represent approximately – tradeoff between precision and efficiency Approximated Context In-scope global variables, method parameters, in-scope pointers Values of non-pointer variables are mapped into a compact form (value invariant – as in DIDUCE ICSE 02) Requires 2 integer fields; 2 bitwise operations for each check; 3 bitwise operations for each update Pointers tracked by declared (not actual) types argv approximated by vector length Correlations between context elements are lost If {a=4,b=3} and {a=5,b=8} are two contexts of a region, we track {a=(4,5), b=(3,8)}

PLDI06 Simulating Monitoring Schemes We need to measure performance on a wide range of runtime monitoring schemes A generic monitoring scheme Inserts instrumentation into application at probability p Calls a dummy monitoring function, which simulates the overhead of some real monitoring scheme Can adjust overhead from zero to arbitrarily large Disable dummy monitoring to reveal the asymptotic overhead of Artemis Only performs the context checks associated with the cost of monitoring, but not the monitoring Allows measuring context checking overhead only

PLDI06 Experiment – Asymptotic Overhead Measured by Simulation

PLDI06 Two Findings Performance floor As monitoring scheme overhead approaches zero, Artemis overhead is 5.57% of unmonitored program execution time When can we use Artemis to improve overhead ? Break even baseline monitoring overhead Monitoring overhead > 5.6%, Artemis helps By solving x=0.0045x , x = 5.60% This covers most of the monitoring techniques

PLDI06 An Optimization: Reuse Context Sets Across Runs Eliminates the initial building of sets of observed contexts Converges faster to the asymptotic overhead Invariant profile: Dump the context invariants into a file at program exit Load dumped invariants at the next run Invariant profile size is 0.4 ~ 4.7% of program binary size (average 1.7%, std 0.95%)

PLDI06 Using Artemis (with invariant profile) sourceinstrumentationbuild training Artemis production runbug report baselineArtemis invariant profile

PLDI06 Convergence to Asymptotic Overhead – e.g. bzip2 from SPECint Asymptotic overhead reduced to < 7.5% (from ~280%) ~7.3%

PLDI06 Experiments with Real Monitoring Schemes Measuring how well does (monitoring scheme guided by Artemis) approximates the capabilities of original monitoring scheme Artemis with hardware-based monitoring (AccMon) – detected 3/3 bugs, 2.67 times improvement, in very short-running programs Artemis with value invariant detection and checking (C-DIDUCE) – Source-level instrumentation – covered 75% of violations, 4.6 times improvement, in short-running programs Full results and details are in the paper

PLDI06 Conclusions General framework Eliminate redundant runtime monitoring with context checking Improve overhead, low asymptotic overhead in long-running programs Small precision loss Have enabled practical runtime monitoring of long-running programs