Efficient Diagnostic Tracing For Wireless Sensor Networks Vinaitheerthan Sundaram Patrick Eugster Xiangyu Zhang ACM SenSys 2010.

Slides:



Advertisements
Similar presentations
Nucleus Network Management System Gilman Tolle UC Berkeley.
Advertisements

Reliable and Efficient Programming Abstractions for Sensor Networks Nupur Kothari, Ramki Gummadi (USC), Todd Millstein (UCLA) and Ramesh Govindan (USC)
MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Koushik Sen CS 265.
Decentralized Reactive Clustering in Sensor Networks Yingyue Xu April 26, 2015.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Program Slicing Mark Weiser and Precise Dynamic Slicing Algorithms Xiangyu Zhang, Rajiv Gupta & Youtao Zhang Presented by Harini Ramaprasad.
Run-Time Dynamic Linking for Reprogramming Wireless Sensor Networks
 Control structures  Algorithm & flowchart  If statements  While statements.
1 © NOKIA Nokia Research Center / Performance Data Collection: Hybrid Approach Edu Metz, Raimondas Lencevicius Software Performance Architecture.
TOSSIM A simulator for TinyOS Presented at SenSys 2003 Presented by : Bhavana Presented by : Bhavana 16 th March, 2005.
FIND: Faulty Node Detection for Wireless Sensor Networks Shuo Guo, Ziguo Zhong and Tian He University of Minnesota, Twin Cities.
Murat Demirbas Youngwhan Song University at Buffalo, SUNY
Recap from last time We were trying to do Common Subexpression Elimination Compute expressions that are available at each program point.
Systems Wireless EmBedded nesC Update Eric Brewer with help from David Culler, David Gay, Phil Levis, Rob von Behren, and Matt Welsh.
1 Efficient Memory Safety for TinyOS Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing † Intel Research.
Incremental Network Programming for Wireless Sensors NEST Retreat June 3 rd, 2004 Jaein Jeong UC Berkeley, EECS Introduction Background – Mechanisms of.
1 TinyOS 2.1: Deploying Memory Safety Nathan Cooprider Yang Chen Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing †
The Use of Program Profiling for Software Maintenance with Applications to the Year 2000 Problem Thomas Reps, Thomas Ball, Manuvir Das, and James Larus.
Incremental Network Programming for Wireless Sensors IEEE SECON 2004 Jaein Jeong and David Culler UC Berkeley, EECS.
Previous finals up on the web page use them as practice problems look at them early.
1 Distributed Online Simultaneous Fault Detection for Multiple Sensors Ram Rajagopal, Xuanlong Nguyen, Sinem Ergen, Pravin Varaiya EECS, University of.
1 Efficient Memory Safety for TinyOS 2.1 Yang Chen Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing.
1 PATH: Page Access Tracking Hardware to Improve Memory Management Reza Azimi, Livio Soares, Michael Stumm, Tom Walsh, and Angela Demke Brown University.
Data Compression Algorithms for Energy-Constrained Devices in Delay Tolerant Networks Christopher Sadler Margaret Martonosi Princeton University.
Maté: A Tiny Virtual Machine for Sensor Networks Philip Levis and David Culler Presented by: Michele Romano.
An Object-Oriented Approach to Programming Logic and Design Chapter 6 Looping.
Schedule Midterm out tomorrow, due by next Monday Final during finals week Project updates next week.
Versatile low power media access for wireless sensor networks Joseph PolastreJason HillDavid Culler Computer Science Department University of California,Berkeley.
Distributed Structural Health Monitoring A Cyber-Physical System Approach Chenyang Lu Department of Computer Science and Engineering.
FBRT: A Feedback-Based Reliable Transport Protocol for Wireless Sensor Networks Yangfan Zhou November, 2004 Supervisors: Dr. Michael Lyu and Dr. Jiangchuan.
Data Compression Algorithms for Energy-Constrained Devices in Delay Tolerant Networks Christopher M. Sadler and Margaret Martonosi In: Proc. of the 4th.
Presenter: Chi-Hung Lu 1. Problems Distributed applications are hard to validate Distribution of application state across many distinct execution environments.
Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
Efficient Evaluation of XQuery over Streaming Data Xiaogang Li Gagan Agrawal The Ohio State University.
RushNet: Practical Traffic Prioritization for Saturated Wireless Sensor Networks Chieh-Jan Mike Liang †, Kaifei Chen ‡, Nissanka Bodhi Priyantha †, Jie.
Bug Localization with Machine Learning Techniques Wujie Zheng
P ath & E dge P rofiling Michael Bond, UT Austin Kathryn McKinley, UT Austin Continuous Presented by: Yingyi Bu.
1 Martin Schulz, Lawrence Livermore National Laboratory Brian White, Sally A. McKee, Cornell University Hsien-Hsin Lee, Georgia Institute of Technology.
RushNet: Practical Traffic Prioritization for Saturated Wireless Sensor Networks Chieh-Jan Mike Liang †, Kaifei Chen ‡, Nissanka Bodhi Priyantha †, Jie.
Sentomist: Unveiling transient WSN bugs via symptom mining 1 Sentomist: Unveiling Transient Sensor Network Bugs via Symptom Mining Yangfan Zhou, Xinyu.
Computer Science 1 TinySeRSync: Secure and Resilient Time Synchronization in Wireless Sensor Networks Speaker: Sangwon Hyun Acknowledgement: Slides were.
Robust Systems. Faults at James Reserve Faults on a volcano in Ecuador [WLJ + 06]
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presenter: James.
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Whole Program Paths James R. Larus. Outline 1. Find acyclic path fragments 2. Convert into whole-program path 3. Determine hot subpaths.
Practical Path Profiling for Dynamic Optimizers Michael Bond, UT Austin Kathryn McKinley, UT Austin.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Slide 1/14 Midsens ’09 – December 1, 2009 Lightweight Tracing For Wireless Sensor Networks Debugging Vinaitheerthan Sundaram*, Patrick Eugster, Xiangyu.
Ben Miller.  A distributed algorithm is a type of parallel algorithm  They are designed to run on multiple interconnected processors  Separate parts.
By: Gang Zhou Computer Science Department University of Virginia 1 Medians and Beyond: New Aggregation Techniques for Sensor Networks CS851 Seminar Presentation.
A Binary Agent Technology for COTS Software Integrity Anant Agarwal Richard Schooler InCert Software.
1 Marionette: Using RPC for Development and Debugging of WSNs Kamin Whitehouse Joint with: Gilman Tolle, Jay Taneja, Cory Sharp, Sukun Kim, Jaein Jeong,
Bin Xin, Patrick Eugster, Xiangyu Zhang Dept. of Computer Science Purdue University {xinb, peugster, Lightweight Task Graph Inference.
1 Software Reliability in Wireless Sensor Networks (WSN) -Xiong Junjie
Observability by Design Principles of Observable Sensor Networks J. Beutel F. Mattern K. Römer L. Thiele.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
University of Michigan Electrical Engineering and Computer Science 1 Low Cost Control Flow Protection Using Abstract Control Signatures Daya S Khudia and.
In the name of God.
Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code
Embedded Systems Design
Online Subpath Profiling
Wireless Sensor Networks
White-Box Testing.
Supporting Fault-Tolerance in Streaming Grid Applications
White-Box Testing.
Unit III – Chapter 3 Path Testing.
Presentation transcript:

Efficient Diagnostic Tracing For Wireless Sensor Networks Vinaitheerthan Sundaram Patrick Eugster Xiangyu Zhang ACM SenSys 2010

Motivation  Wireless Sensor Network (WSN) deployments  Great Duck Island, MacroScope, Volcano, SensorScope, LOFAR, VigilNet, ExScal, PermaSense  Deployment lessons  Murphy loves WSN deployments!  Low data yield reported (2% to 70%) [Beutel et al.]*  Several deployment failures went unexplained  Post-deployment diagnosis is important but challenging 2 * “Deployment Techniques for Sensor Networks", J Beutel, K Römer, M Ringwald, M woehrle

Our Approach: Efficient Diagnostic Tracing  We record control-flow path  Advantages  Many faults manifest as abnormal control-flow  split-phase faults, initialization faults, finite-state machine faults  Basic block level accuracy of preemption information  data races  Effective compression of repetitive computation 3

Roadmap  Motivation  Efficient diagnostic tracing  Trace concurrency  Trace control-flow  Run-time compression  Implementation  Evaluation  Related work  Conclusions 4

Tracing Concurrency in TinyOS 5  Events (“async”) are interrupts that drive the execution  Tasks run when there are no events  Tasks cannot preempt other tasks or events Time E1E1 E2E2 E1E1 T1T1 T1T1 E1E1 Interrupt level E 1 E 2 E 1 T 1 E 1 T 1 Trace EUnit* EUnit ID Event* $ | ε ID Tid | Eid Event Eid Event* $ | ε Nested! E 1 E 2 $ $ T 1 E 1 $ $

Roadmap  Motivation  Efficient diagnostic tracing  Trace concurrency  Trace control-flow  intra-procedural  inter-procedural  Run-time compression  Implementation  Evaluation  Related work  Conclusions 6

Tracing Control-Flow: Intra-Procedural 7  Encode n acyclic control-flow paths with an integer in [0, n-1] Entry A: if (p1) B: s1 D: if(p2) Exit C: s2 E: s3 id += 1 id = 0 Output(id) id += 2 Foo() { A. if (p1) B. s1; else C. s2; D. if(p2) E. s3; } Path ABDE ABD ACDE ACD id Foo()

Code Instrumentation 8  Ball-Larus (BL) algorithm [Micro ’96]  Optimal encoding and uses minimal instrumentation Entry A: if (p1) B: s1 D: if(p2) Exit C: s2 E: s3 [0,3] [2,3] [0,1] [1] Each node, v, is annotated with the number of paths to the exit Num(v) = ∑ child(i) Num(i) [0,0] Divide encoding space at each node Foo()

+1 +2 Code Instrumentation 9  BL algorithm [2] At forks, annotate each edge with the sum of paths contributed by preceding edges Entry A: if (p1) B: s1 D: if(p2) Exit C: s2 E: s3 [0,3] [2,3] [0,1] [0,0] v w x y [0,7] [0,1] [2,5] [6,7] [1] Each node, v, is annotated with the number of paths to the exit Num(v) = ∑ child(i) Num(i) Entry A: if (p1) B: s1 D: if(p2) Exit C: s2 E: s3 Foo()

E 1 E 2 2 $ 1 $ T 1 E 1 0 $ 0 $ Tracing Control-Flow: Intra-Procedural 10 Intra-procedural trace Trace EUnit* EUnit ID (Event|Path)* $ | ε ID Tid | Eid Path Pid Event Eid Event* $ | ε Time E1E1 E2E2 E1E1 T1T1 T1T1 E1E1 Interrupt level Entry A: if (p1) B: s1 D: if(p2) Exit C: s2 E: s3 id += 1 Output(label) id = 0 Output(id) Output(‘$’) id += 2 Trace Foo 2 $ Foo()

Roadmap  Motivation  Efficient diagnostic tracing  Trace concurrency  Trace control-flow  intra-procedural  inter-procedural  Run-time compression  Implementation  Evaluation  Related work  Conclusions 11

Tracing Control-Flow: Inter-Procedural 12  Allow function calls inside events and tasks D E 1 () A B: F() C E G F() I J K L M  Functions are nested  Treat functions as events or tasks E 1 F 0 $ 1 $ E1FInter- Procedural Path

Tracing Control-Flow: Inter-Procedural 13 D C E G 1 E 1 () A B: F() F() I J K L M  Encode callee’s control-flow within the caller’s control-flow path +1  Inline F() inside E 1 () E 1 2 $  Inlining is expensive E 1 F 0 $ 1 $

Inter-Procedural Path: Context-Sensitivity 14 F() I J K L M +1 D E 1 () A B: F() C E G  Edge increment inside function F depends on the call site T 1 () A B: F() C Call Edge

Inter-Procedural Summary Analysis 15 n - number of paths in F() x - number of paths to exit after the call site of F() p - path taken in F() at run-time. Note, p ε [0,n-1] …… x Exit S1 …… n Exit Entry F() n*xn*x +p*x+p*x Entry n*xn*x [1] Compute BL individually [2] Adjust at call site  Annotate node with n*x (each of the n paths in the callee can be trailed by one of the x paths in the caller)  Annotate edge with +p*x (skip (p*x -1)inter-procedural paths preceding p) [3] Recompute BL from call site to entry E 1 () [0, n*x-1] x x

Inter-Procedural Summary Analysis 16 F() I J K L M 1 n = E 1 () A B: F() n*x= D C E G 1 x= (p*2) n - number of paths in F() x - number of paths to exit after the call site of F() p - path taken in F() at run-time inter-procedural path AB 0 CDG AB 0 CEG AB 1 CDG AB 1 CEG id F() path IJKM IJLM id 0 1

Tracing Control-Flow: Inter-Procedural 17 Inter-procedural trace Time E1E1 E2E2 E1E1 T1T1 T1T1 E1E1 Interrupt level E 1 E 2 4 $ 3 $ T 1 E 1 4 $ 3 $

Roadmap  Motivation  Efficient diagnostic tracing  Trace concurrency  Trace control-flow  Run-time compression  Implementation  Evaluation  Related work  Conclusions 18

Run-time Trace Compression 19  WSNs repeat the sequence of tasks or events at run-time  Pattern replacement  Find two most frequent patterns by profiling offline  During online, replace patterns with symbols recursively  Run-length encoding  Loop compression  Run of symbols

Roadmap  Motivation  Efficient diagnostic tracing  Implementation  Evaluation  Related work  Conclusions 20

Implementation 21  TinyTracer - Automatically instruments the program and generates traces at run-time into flash (radio)  Multiple granularity  Component – SurgeM  Function – SurgeM__Timer__Fired  Tools  CIL, TinyOS 1.x, nesC1.3

Roadmap  Motivation  Efficient diagnostic tracing  Implementation  Evaluation  Effectiveness  case studies of common faults  Efficiency  overhead measurements  Related work  Conclusions 22

Case Studies of Common Faults 23  Initialization faults  EEPROM component in TinyOS 1.x (previously unknown)  Split-phase faults  High-level data race in LEACH implementation  Failure handling in DeferredPowerManagerM  Task queue overrun  PermaSense [Keller et al., SenSys’09]  CC1000 radio deadlock  State machine implementation faults  VoltageM, EEPROM

 Notation  true path = 1, false path = 0  Normal input (N)  E 1 0 $ E 2 0 $ T 1 1 $  Abnormal input (A)  E 1 0 $ E 2 1 $ T 1 0 $  Trace  NNNNNNNNNNANNN  From trace, localize failure to the path taken inside T 1 Hypothetical Bug Case Study 24 State = 0; /*{0, 1} */ Event E 1 () { state = 0; post T1; } Event E 2 (input) { if(input > threshold) state = 1; … } Task T 1 (){ if(state == 0) sendToBase(); else /* bug */ } Failure  Comparison with function call tracing  Normal operation – E 1 E 2 T 1  Abnormal operation – E 1 E 2 T 1

Overhead Measurements 25  Metrics  Overheads - energy, RAM, and code size  Trace size  Benchmarks  Standard TinyOS programs  Blink – blinks red LED every second  Oscilloscope – samples light every 1/8 th second  Surge – samples light every 2 seconds  CountToLedsAndRfm – displays and broadcasts counter every 1/4 th second  LRX (Golden Gate bridge monitoring)  A component to send large packets reliably  Test program sends large messages every 2 seconds  About 1000 lines of nesC code  Ran benchmarks for 30 minutes

Energy Overhead for Surge 26 Overhead mainly caused by flash Inter-procedural tracing overhead is about 1.3 % for 4 components Inter-procedural tracing consumes less energy than function-call tracing None JoulesJoules 46% 72% 6.4% 2.4% 1.3% 0.9%

Memory Overheads 27 Data StructureRAM (in bytes) Flash Pages (16)256 Circular Buffer (2)384 Miscellaneous300 Program memory overhead RAM overhead

Trace Size 28  Ran benchmarks for 30 minutes  Shows trace can be compressed well BenchmarksCompressed trace size (bytes/second) Compression ratio (uncompressed/ compressed) Blink Oscilloscope Surge CountToLedsRfm LRX

Roadmap  Motivation  Efficient diagnostic tracing  Implementation  Evaluation  Related work  Conclusions 29

Related Work 30  Network faults  Sympathy [Ramanathan et al., SenSys’05], PAD [Liu et al., SenSys ‘08], SNMS [Tolle and Culler, EWSN’05]  Logging  NodeMD [Krunic et al., MobiSys ‘07], LIS [Shea et al., DATE’10], Dustminer [Khan et al., SenSys’08]  Visibility  Marionette [Whitehouse et al., SenSys’06], Clairvoyant [ Yang et al., SenSys’07], Hermes [Kothari et al., IPSN’08]

Conclusions 31  We showed the feasibility of program tracing in WSNs  Our contributions  Novel context-free grammar execution encoding  Efficient inter-procedural control-flow path recording  Effective trace compression scheme  Looking ahead  Better compression techniques  Distributed tracing schemes  Variable value tracing

Thank you 32 Q & A