Declarative tracepoints: a programmable and application independent debugging system for wireless sensor networks

Effective debugging usually involves watching program state to diagnose bugs. When debugging sensor network applications, this approach is often time-consuming and errorprone, not only because of the lack of visibility into system state, but also because of the difficulty to watch the right variables at the right time. In this paper, we present declarative tracepoints, a debugging system that allows the user to insert a group of action-associated checkpoints, or tracepoints, to applications being debugged at runtime. Tracepoints do not require modifying application source code. Instead, they are written in a declarative, SQL-like language called TraceSQL independently. By triggering the associated actions when these checkpoints are reached, this system automates the debugging process by removing the human from the loop. We show that declarative tracepoints are able to express the core functionality of a range of previously isolated debugging techniques, such as EnviroLog, NodeMD, Sympathy, and StackGuard. We describe the design and implementation of the declarative tracepoints system, evaluate its overhead in terms of CPU slowdown, illustrate its expressiveness through the aforementioned debugging techniques, and finally demonstrate that it can be used to detect real bugs using case studies of three bugs based on the development of the LiteOS operating system.

[1]  Crispan Cowan,et al.  StackGuard: Automatic Adaptive Detection and Prevention of Buffer-Overflow Attacks , 1998, USENIX Security Symposium.

[2]  Robert Szewczyk,et al.  System architecture directions for networked sensors , 2000, ASPLOS IX.

[3]  David E. Culler,et al.  The dynamic behavior of a data dissemination protocol for network programming at scale , 2004, SenSys '04.

[4]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[5]  Richard Han,et al.  NodeMD: diagnosing node-level faults in remote wireless sensor systems , 2007, MobiSys '07.

[6]  Jeff Rose,et al.  MANTIS OS: An Embedded Multithreaded Operating System for Wireless Micro Sensor Platforms , 2005, Mob. Networks Appl..

[7]  Kamin Whitehouse,et al.  Clairvoyant: a comprehensive source-level debugger for wireless sensor networks , 2007, SenSys '07.

[8]  Eric Eide,et al.  Efficient memory safety for TinyOS , 2007, SenSys '07.

[9]  Nigamanth Sridhar,et al.  Abstractions for safe concurrent programming in networked embedded systems , 2006, SenSys '06.

[10]  Peter Desnoyers,et al.  Capsule: an energy-optimized object storage system for memory-constrained sensor devices , 2006, SenSys '06.

[11]  Adam Dunkels,et al.  Contiki - a lightweight and flexible operating system for tiny networked sensors , 2004, 29th Annual IEEE International Conference on Local Computer Networks.

[12]  David E. Culler,et al.  Design of an application-cooperative management system for wireless sensor networks , 2005, Proceeedings of the Second European Workshop on Wireless Sensor Networks, 2005..

[13]  Tarek F. Abdelzaher,et al.  The LiteOS Operating System: Towards Unix-Like Abstractions for Wireless Sensor Networks , 2008, 2008 International Conference on Information Processing in Sensor Networks (ipsn 2008).

[14]  Deborah Estrin,et al.  Sympathy for the sensor network debugger , 2005, SenSys '05.

[15]  David E. Culler,et al.  TOSSIM: accurate and scalable simulation of entire TinyOS applications , 2003, SenSys '03.

[16]  Gang Zhou,et al.  Achieving Repeatability of Asynchronous Events in Wireless Sensor Networks with EnviroLog , 2006, Proceedings IEEE INFOCOM 2006. 25TH IEEE International Conference on Computer Communications.

[17]  Deborah Estrin,et al.  EmStar: A Software Environment for Developing and Deploying Wireless Sensor Networks , 2004, USENIX ATC, General Track.

[18]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[19]  Philip Levis,et al.  Maté: a tiny virtual machine for sensor networks , 2002, ASPLOS X.

[20]  Tarek F. Abdelzaher,et al.  A scalable logical coordinates framework for routing in wireless sensor networks , 2004, 25th IEEE International Real-Time Systems Symposium.

[21]  Zhe Chen,et al.  Visibility: a new metric for protocol design , 2007, SenSys '07.

[22]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..