Conference PaperPDF Available

Simulation-based debugging of soft real-time applications

Authors:

Abstract

We present a temporal debugger, capable of examining time flow of soft real time applications in Unix systems. The debugger is based on a simulator modelling an entire workstation in sufficient detail to run unmodified operating systems and applications. It provides a deterministic and non-intrusive debugging environment, allowing reproducible presentation of program time flow. The primary contribution of the paper is virtual machine translation, a technique necessary to debug applications in a simulated Unix system. We show how a virtual machine translator maps low-level data, provided by the simulator to data useful to a symbolic debugger. The translator operates by parsing data structures in the target operating system and has been implemented for the GNU debugger and simulated Linux systems
command line interface
symbols
program
debugger
machine
front-end
back-end
program
process control interface
debugger
operating system
Linux
Simics
debugger
broker
gdb
virtual
machine
translator
gdb
gdb
applications
Linux kernel
Simics
kernel probe
kernel symbols
probe
generator
Linux kernel
data parser
Virtual machine translator
0
1
2
3
4
5
6
7
8
9
332 334 336 338 340 342
Iteration time (million cycles)
OrderedDitherImage time (thousand cycles)
deadline
0
1
2
3
4
5
6
7
8
9
I P B
Iteration time (million cycles)
Frame type
deadline
0
1
2
3
4
5
6
7
8
9
0 1 2 3 4 5 6 7
Iteration time (million cycles)
Time spent in other processes (million cycles)
deadline
Frame type
I
P
B
... • An oracle repository stores test oracle files in the form of property requirements. 1 For example, the oracle can specify in which condition data races or deadlocks occur. Each log file is compared against an oracle file to detect a particular type of anomalous execution behavior. ...
... Virtual platforms have been used to support tracing, replay, and debugging [1,6,12,31,37]; however, they have rarely been used to support testing. One notable example is work by Goh et al. [21]. ...
Article
In software for embedded systems, the frequent use of interrupts for timing, sensing, and I/O processing can cause concurrency faults to occur due to interactions between applications, device drivers, and interrupt handlers. This type of fault is considered by many practitioners to be among the most difficult to detect, isolate, and correct, in part because it can be sensitive to execution interleavings and often occurs without leaving any observable incorrect output. As such, commonly used testing techniques that inspect program outputs to detect failures are often ineffective at detecting them. To test for these concurrency faults, test engineers need to be able to control interleavings so that they are deterministic. Furthermore, they also need to be able to observe faults as they occur instead of relying on observable incorrect outputs. In this paper, we introduce SimTester, a framework that allows engineers to effectively test for subtle and non-deterministic concurrency faults by providing them with greater controllability and observability. We implemented our framework on a commercial virtual platform that is widely used to support hardware/software co-designs to promote ease of adoption. We then evaluated its effectiveness by using it to test for data races and deadlocks. The result shows that our framework can be effective and efficient at detecting these faults.
... An advantages of these methods is that they are really nonintrusive. [8] propose a solution using a virtual machine that expose the data structures of the Operating System (OS) running into the virtual machine to an external debugger. In [9], a Instruction Set Simulator (ISS) API is proposed for the simulation of processors in MPSoCs. ...
Conference Paper
Multiprocessor Systems-on-Chip (MPSoC) are seal- ing in complexity. Most part of the MPSoCs are concerned with this evolution: number of processors, memory hierarchy, interconnect systems, . . . Due to this increase in complexity and the debugging and monitoring difficulties it implies, developing software targeting these platforms is very challenging. The need for methods and tools to assist the development process of the MPSoC software is mandatory. Classical debugging and profiling tools are not suited for use in the MPSoC context, because they lack adaptability and awareness of the parallelism. As virtual prototyping is today widely used in the development of MPSoC software, we advocate the use of simulation platforms for software analysis. We present a trace system that consists in tracing hardware events that are produced by models of multiprocessor platform components. The component models are modified in a non-intrusive way so that their behavior in simulation is not modified. Using this trace results allows to run precise analysis like data races detection targeting the software executed on the platform.
Conference Paper
Trace debugging is a software diagnostic technique for embedded real-time systems. It is developed to give embedded software developers the ability to trace the activity of the processor even when it is operating out of cache. This ability is lost on many high performance processors and in real-time systems. Tools for debugging real-time systems are scarce (Lee, E., 2000; Zhang, L. and Yuan, P., 1999). This paper describes work that was performed on a new method of trace debugging that can be used to aid in real-time debugging of embedded software. The technique described uses non-intrusive measurements that are supplemented with deductive algorithms. The technique developed in the study differs from traditional debuggers by utilizing the a-priori information that is available. The study utilized a Motorola 68020 as a model of a high performance processor, but the processes are applicable to many "high performance" processors.