Top Banner
Declarative Tracepoints (DT) - A programmable and Application independent Debugging System for WSN Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)
19

Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

Dec 27, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

Declarative Tracepoints (DT)- A programmable and Application independent

Debugging System for WSN

Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse

(UVA),Liqian Luo (MSR)

Page 2: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

2

OutlineRequirements for debugging WSNExisting techniquesDeclarative Tracepoints Debugging SystemEvaluationConclusions

Page 3: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

3

Requirements for Debugging WSNWatch program state to diagnose abnormal

behaviorWatch the right variables at the right timeVisibility into program stateResource constraints

Page 4: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

4

Existing TechniquesEnviroLog

Event recording and replay Compiler modify source code to record function called time and

parameter START_RECORD, START_REPLAY

NodeMD To diagnose node-level faults Stack overflow, livelock, deadlock, application-specific faults

Sympathy Trace the source of failure: node, communication, sink Collect metrics and analyze at the sink

StackGuard Stack corruption, buffer overrun Canary Word

Page 5: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

5

Design of DT

Application-independentNo need of source level modificationIsolate debugging code from app codeDebugging without re-compilation or re-deployment

ProgrammableTraceSQL debugging laguage, declarative similar to

SQLLocation of tracepoints and associated actionsTrace yield() FROM syscall.c Execution { RECORD yield();} Where { READ msend->lock FROM radio.c == 1; }

Page 6: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

6

Architecture of DT

Page 7: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

7

TraceSQL Keywords

Page 8: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

8

TraceSQL Example Of StackGuard

Page 9: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

9

Code Examples

Page 10: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

10

Implementation

Page 11: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

11

LiteOSSeparate compilation of kernel and user appsApplications as individual threadsEach thread has non-overlapping flash and

RAMMemory addresses of app provide by a .lss

file generated from app trace retrieval from nodes by LiteOS shell

file copy command Atmega128 processor support modifying

binary code at runtime

Page 12: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

12

Dynamic Tracepoint Instrumentation

Page 13: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

13

tradeoffsTracepoint actions focus on global variable

operationsLocal variable needs compiler dependent

analysisDoes not address compiler specific

optimization

Page 14: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

14

Evaluation--overheadCPU slowdownMemory Overhead

RAM: blank tracepoint(42bytes), file logging racepoint(332bytes)

Flash: increase with number of tracepoints, but < 4K with less than 15 tracepoints

Flash lifetimeFile system:15 tps, hold

280 secsFlash memory lifetime 10k

write/erase cycles on MicaZ

Page 15: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

15

TraceSQL expressiveness-EnviroLog

Page 16: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

16

TraceSQL expressiveness-NodeMD

Page 17: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

17

TraceSQL expressiveness-Sympathy

Page 18: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

18

Case StudiesBug 1: Node reboot after changing the

compiler optimization levelBug 2: User apps put into memory_corrupted

state once executedBug 3: Unexpected corruption of

communication protocol neighbor table

Page 19: Qing Cao, Tarek Abdelzaher(UIUC), John Stankovic, Kamin Whitehouse (UVA), Liqian Luo (MSR)

19

ConclusionsDeclarative tracepoint debugging systemApplication independent and programmable

tracepoints at runtimeTraceSQL is expressiveReal case verification