S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, B. Calder UCSD and Microsoft PLDI 2007.

Slides:



Advertisements
Similar presentations
Implementation and Verification of a Cache Coherence protocol using Spin Steven Farago.
Advertisements

Triage: Diagnosing Production Run Failures at the Users Site Joseph Tucek, Shan Lu, Chengdu Huang, Spiros Xanthos, and Yuanyuan Zhou Department of Computer.
Test process essentials Riitta Viitamäki,
4 December 2001 SEESCOASEESCOA STWW - Programma Debugging of Real-Time Embedded Systems: Experiences from SEESCOA Michiel Ronsse RUG-ELIS.
Goldilocks: Efficiently Computing the Happens-Before Relation Using Locksets Tayfun Elmas 1, Shaz Qadeer 2, Serdar Tasiran 1 1 Koç University, İstanbul,
Race Directed Random Testing of Concurrent Programs KOUSHIK SEN - UNIVERSITY OF CALIFORNIA, BERKELEY PRESENTED BY – ARTHUR KIYANOVSKI – TECHNION, ISRAEL.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Koushik Sen CS 265.
Chapter 7: User-Defined Functions II
Background for “KISS: Keep It Simple and Sequential” cs264 Ras Bodik spring 2005.
Programming Types of Testing.
CSE , Autumn 2011 Michael Bond.  Name  Program & year  Where are you coming from?  Research interests  Or what’s something you find interesting?
Recording Inter-Thread Data Dependencies for Deterministic Replay Tarun GoyalKevin WaughArvind Gopalakrishnan.
CHESS: A Systematic Testing Tool for Concurrent Software CSCI6900 George.
An efficient data race detector for DIOTA Michiel Ronsse, Bastiaan Stougie, Jonas Maebe, Frank Cornelis, Koen De Bosschere Department of Electronics and.
An Case for an Interleaving Constrained Shared-Memory Multi- Processor CS6260 Biao xiong, Srikanth Bala.
Atomicity in Multi-Threaded Programs Prachi Tiwari University of California, Santa Cruz CMPS 203 Programming Languages, Fall 2004.
Concurrency.
Continuously Recording Program Execution for Deterministic Replay Debugging.
Multiprocessing Memory Management
Deterministic Logging/Replaying of Applications. Motivation Run-time framework goals –Collect a complete trace of a program’s user-mode execution –Keep.
Microsoft Research Faculty Summit Yuanyuan(YY) Zhou Associate Professor University of Illinois, Urbana-Champaign.
BugNet Continuously Recording Program Execution for Deterministic Replay Debugging Satish Narayanasamy Gilles Pokam Brad Calder.
1 RELAY: Static Race Detection on Millions of Lines of Code Jan Voung, Ranjit Jhala, and Sorin Lerner UC San Diego speaker.
PathExpander: Architectural Support for Increasing the Path Coverage of Dynamic Bug Detection S. Lu, P. Zhou, W. Liu, Y. Zhou, J. Torrellas University.
29-Jun-15 Java Concurrency. Definitions Parallel processes—two or more Threads are running simultaneously, on different cores (processors), in the same.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Cormac Flanagan UC Santa Cruz Velodrome: A Sound and Complete Dynamic Atomicity Checker for Multithreaded Programs Jaeheon Yi UC Santa Cruz Stephen Freund.
/ PSWLAB Eraser: A Dynamic Data Race Detector for Multithreaded Programs By Stefan Savage et al 5 th Mar 2008 presented by Hong,Shin Eraser:
Light64: Lightweight Hardware Support for Data Race Detection during Systematic Testing of Parallel Programs A. Nistor, D. Marinov and J. Torellas to appear.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Deterministic Replay of Java Multithreaded Applications Jong-Deok Choi and Harini Srinivasan slides made by Qing Zhang.
CSE 486/586 CSE 486/586 Distributed Systems PA Best Practices Steve Ko Computer Sciences and Engineering University at Buffalo.
Introduction to HP LoadRunner Getting Familiar with LoadRunner >>>>>>>>>>>>>>>>>>>>>>
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Bug Localization with Machine Learning Techniques Wujie Zheng
AADEBUG MUNCHEN Non-intrusive on-the-fly data race detection using execution replay Michiel Ronsse - Koen De Bosschere Ghent University - Belgium.
Eraser: A Dynamic Data Race Detector for Multithreaded Programs STEFAN SAVAGE, MICHAEL BURROWS, GREG NELSON, PATRICK SOBALVARRO, and THOMAS ANDERSON Ethan.
Compactly Representing Parallel Program Executions Ankit Goel Abhik Roychoudhury Tulika Mitra National University of Singapore.
Games Development 2 Concurrent Programming CO3301 Week 9.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
11/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
On-Demand Dynamic Software Analysis Joseph L. Greathouse Ph.D. Candidate Advanced Computer Architecture Laboratory University of Michigan December 12,
Detecting and Eliminating Potential Violation of Sequential Consistency for concurrent C/C++ program Duan Yuelu, Feng Xiaobing, Pen-chung Yew.
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Bugs (part 1) CPS210 Spring Papers  Bugs as Deviant Behavior: A General Approach to Inferring Errors in System Code  Dawson Engler  Eraser: A.
Detecting Atomicity Violations via Access Interleaving Invariants
HARD: Hardware-Assisted lockset- based Race Detection P.Zhou, R.Teodorescu, Y.Zhou. HPCA’07 Shimin Chen LBA Reading Group Presentation.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Eraser: A dynamic Data Race Detector for Multithreaded Programs Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson Presenter:
Soyeon Park, Shan Lu, Yuanyuan Zhou UIUC Reading Group by Theo.
CHESS Finding and Reproducing Heisenbugs in Concurrent Programs
Agenda  Quick Review  Finish Introduction  Java Threads.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
FastTrack: Efficient and Precise Dynamic Race Detection [FlFr09] Cormac Flanagan and Stephen N. Freund GNU OS Lab. 23-Jun-16 Ok-kyoon Ha.
Qin Zhao1, Joon Edward Sim2, WengFai Wong1,2 1SingaporeMIT Alliance 2Department of Computer Science National University of Singapore
1 Active Random Testing of Parallel Programs Koushik Sen University of California, Berkeley.
Detecting Data Races in Multi-Threaded Programs
Prescient Memory: Exposing Weak Memory Model Behavior by Looking into the Future MAN CAO JAKE ROEMER ARITRA SENGUPTA MICHAEL D. BOND 1.
Healing Data Races On-The-Fly
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Effective Data-Race Detection for the Kernel
Specifying Multithreaded Java semantics for Program Verification
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Java Concurrency 17-Jan-19.
Java Concurrency.
Java Concurrency.
Java Concurrency 29-May-19.
Presentation transcript:

S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, B. Calder UCSD and Microsoft PLDI 2007

 Data Races hard to debug ◦ Difficult to detect ◦ Even more difficult to reproduce  Data Race Detectors help in detection ◦ LockSet, Happens-Before and Atomicity Violation  But they tend to overdo it ◦ Up to 90% false alarms  Especially with LockSet We need a tool that detects and reliably classifies all harmful Data Races 2

 Offline Dynamic Happens-Before Data Race Detection ◦ Step 1: Trace Capturing ◦ Step 2: Offline Happens-Before Analysis ◦ Step 3: Replay Critical Segments ◦ Step 4: Auto Classify harmful vs. benign races 3

 iDNA captures the execution of an application  Simply records initial state, ◦ Registers and PC  load values, ◦ Only those needed absolutely ◦ 1 st load after a store, DMA etc…  and a global clock (sequensers) ◦ Inserted in the thread’s replay log for  Synchronization events  System calls 4

5  Good old Happens- Before ◦ Two conflicting accesses  At least one write  Not ordered  Detects only the data races that happened

 When a data race is detected replay the affected segments twice ◦ 1 st with the actual order  Given by the load values ◦ 2 nd reverse the racing accesses  Store the replay result ◦ No-State-Change: If all live-outs are the same ◦ State-Change: If at least 1 live-out changed ◦ Replay Failure: If disaster encountered  Load null or unencountered address  Branch someplace else 6

7 Replay Failure Potentially Harmful Data Race

 Repeat step 3 for each instance of a data race  Potentially Benign Data Race ◦ every replay results to No-State-Change  Potentially Harmful Data Race ◦ ≥1 replay results in State-Change or Replay Failure  State-Change shows that something would be different if things took the other path  Replay Failure indicates that a program changed that much, so we cannot simulate the other state ◦ Concrete proof that something definitely changed  Easier for the programmers to accept it 8

 18 different executions of various services in Windows Vista and Internet Explorer  Happens-Before returns 16,642 data races ◦ 68 unique  Trace capture ◦ 0.8 bits per instruction  96 MB per 1,000,000,000 instructions  Only 1 st loads and synchronizers captured ◦ 0.3 if compressed with zip 9

 Results for Internet Explorer ◦ P4 Xeon 2.2 GHz, 1 GB of RAM  Start adding… ◦ 6x for capturing ◦ 10x for replaying (unnecessary) ◦ 45x offline Happens-Before Data Race Detection ◦ 280x replay analysis  2,196 dynamic data races 10

Potentially BenignPotentially Harmful To- tal Real BenignReal HarmfulReal BenignReal Harmful No-State- Change 320 State Change Replay Failure Total Impossible State Automatically Classified Manually Classified All harmful races identified correctly 0 false negatives All harmful races identified correctly 0 false negatives Half benign races identified correctly. Half still persist

 32 Real Benign races classified as such ◦ Every instance must return No-State-Changed ◦ The more instances, the more confidence in the classification 12

 7 Real bugs, correctly identified  At least 1 State- Change or Replay Failure required 13 Dangerous Zone

 29 Benign races incorrectly classified as harmful ◦ Approximate Computation (23/29)  Statistics etc ◦ Replayer Limitation (6/29)  At least 1 instance caused replay failure  The final outcome is the same 14

 User Constructed ◦ Garbage collector does not use locks  Double Checks ◦ If (a) {lock(…); if(a) {…}}  Both Values Valid ◦ Use cache? High Perf?  Redundant Writes ◦ Rewrite the same value  Disjoint bit manipulation ◦ Modify different bits in same variable # Races User Constructed Synchronization 8 Double Checks3 Both Values Valid5 Redundant Writes13 Disjoint bit manipulation 9 Approx. Computation false positives that were not caused by replay failure

 Interesting approach to identify benign races  It would be interesting to apply it to LockSet ◦ LockSet has far more false positives ◦ But it can detect bugs that did not happen in production runs  A grand total overhead is missing 16

17 Thank You!!!