TIE : An Interactive Visualization of Thread Interleavings
- ISBN: 9781450300285
Abstract
Multi-core processors have become increasingly prevalent, driving a software shift toward concurrent programs which best utilize these processors. Testing and debugging con- current programs is difficult due to the many different ways threads can interleave. One solution to testing concurrent software is to use tools, such as NASAs Java PathFinder (JPF), to explore the thread interleaving space. Although tools such as JPF provide comprehensive data about pro- gram errors, the data is generally in the form of bulk text logs, which provide little support for common analysis tasks, such as finding common and rare error states. In this pa- per, we present an interactive visualization tool, TIE, that integrates with JPF to enhance concurrency testing and de- bugging.
TIE : An Interactive Visualization of Thread Interleavings
Gowritharan Maheswara, Jeremy S. Bradbury, Christopher Collins
Faculty of Science (Computer Science)
University of Ontario Institute of Technology
Oshawa, Ontario, Canada
gowritharan.maheswara@mycampus.uoit.ca, {jeremy.bradbury, christopher.collins}@uoit.ca
ABSTRACT
Multi-core processors have become increasingly prevalent,
driving a software shift toward concurrent programs which
best utilize these processors. Testing and debugging con-
current programs is dicult due to the many dierent ways
threads can interleave. One solution to testing concurrent
software is to use tools, such as NASA's Java PathFinder
(JPF), to explore the thread interleaving space. Although
tools such as JPF provide comprehensive data about pro-
gram errors, the data is generally in the form of bulk text
logs, which provide little support for common analysis tasks,
such as nding common and rare error states. In this pa-
per, we present an interactive visualization tool, TIE, that
integrates with JPF to enhance concurrency testing and de-
bugging.
Categories and Subject Descriptors
D.2.5 [Software Engineering]: Testing and Debugging;
D.2.4 [Software Engineering]: Software/Program Veri-
cation|model checking ; H.5.2 [Information Interfaces
and Presentation]: User Interfaces|graphical user inter-
faces
General Terms
Verication.
Keywords
concurrency, debugging, model checking, testing, visualiza-
tion.
1. INTRODUCTION
Concurrent programming is becoming increasingly popu-
lar in software development since it allows developers to take
full advantage of multi-core processors. Due to the many
dierent interleavings (i.e., nondeterministic behaviour) of
concurrent programs, testing has become one of the major
challenges with this style of programming.
Concurrency testing and debugging tools often involve
techniques like path or state space exploration in order to
ensure that a given concurrent program works under many
dierent interleaving scenarios. Two examples of concur-
rency testing tools that explore thread interleavings are:
Copyright is held by the author/owner(s).
SOFTVIS’10, October 25–26, 2010, Salt Lake City, Utah, USA.
ACM 978-1-4503-0028-5/10/10.
1. Microsoft CHESS [3]: a concurrency testing tool that
can nd and reproduce rare error states in concur-
rent .NET programs. CHESS works with two other
tools, Chessboard and Concurrency Explorer, to cre-
ate an interactive visualization of error data. One of
the limitations of this visualization is that only one er-
ror path (i.e., thread interleaving) can be visualized at
any given time.
2. NASA's Java PathFinder (JPF) [1]: an explicit state
model checker for Java byte code programs that fo-
cuses on nding concurrency related defects such as
deadlocks and data race conditions. JPF determines
if a program has a concurrency bug by searching all
possible thread interleavings of a concurrent program.
One of the limitations of JPF is the lack of a graphical
interface for presenting the error output.
This paper introduces the Thread Interleaving Explorer
(TIE), an interactive visualization tool to help software de-
velopers debug their concurrent programs that can be run
with either the command-line or Eclipse version of JPF. We
next describe the visual and interaction design of TIE, and
conclude with a discussion of future research plans.
2. DESIGN OF TIE
We propose a solution to the analytic limitations of cur-
rent thread interleaving outputs by introducing the TIE, a
system to support interactive visual analysis of JPF's out-
put. TIE is similar to Microsoft's Concurrency Explorer
visualization, however it can scale to a larger number of in-
terleavings and provides additional functionality. TIE is im-
plemented as a JPF extension and thus directly integrates
with JPF and retrieves information on threads, interleav-
ings, and error paths dynamically while a concurrent pro-
gram is tested. As this information is being retrieved, TIE
populates the top panel of the user interface (see Figure 1).
This panel provides a high-level overview of all interleaving
sequences which caused a bug to occur. The bottom por-
tion of the interface can be used to focus on one specic
interleaving in order to more deeply understand a specic
execution sequence.
In the top panel, each column represents a specic sched-
ule that leads to a concurrency error. Each block within a
column represents a transition in the specic schedule. Each
thread in a concurrent program being tested is assigned a
unique hue from a brightness-normalized, qualitative colour
sequence. Unique hues allow an analyst to distinguish which
threads execute at any given transition. The last block in a
column represents the error resulting from the interleaving.
In the lower portion of the interface, an analyst can focus
on one particular thread interleaving and can view both the
source code and the raw JPF error data that corresponds
with each transition. Both the source code and error data
include syntax highlighting to improve readability.
3. INTERACTION DETAILS
Top Panel. If any specic transition on the top panel is
selected, the whole schedule (column) that the transition be-
longs to is presented in greater detail in the lower-left panel.
In order to focus the analyst's attention while maintaining
a consistent hue for each thread, the selected schedule is
rendered with brighter variants of the thread hues while all
other schedules are rendered with darker shades. Within
the selected schedule, the specic transition that is selected
is distinguished by a red oval. If the \Highlight" function
is selected from the Edit menu, all other transitions in any
schedule that have the same executed code will be overlaid
with a semi-transparent gold square, allowing patterns of
code replication to be revealed while maintaining thread-
specic colouring. The \Sort" function sorts the schedules
in ascending order based on the total number of transitions.
Center Panels. Once the lower-left panel is populated
with a set of transitions, the analyst can select any transition
within that schedule to bring up source code in the center
panel, and raw JPF transition information in the far right
panel. The analyst can click the transitions to explore the
selected sequence of interleavings. Each time a transition is
selected, the corresponding source code and JPF output will
be highlighted.
Bottom Panel. This panel supports sequential stepping
through the selected interleaving sequence. Using the step
through feature results in the same highlighting of source
code and JPF output as direct selection of transition states.
Details of the current JPF execution are also provided here.
4. CONCLUSIONS
We have described the design of TIE | an interactive
visualization tool that extends JPF to support analysis of
error states produced during testing of concurrent programs.
Our work builds upon previous visualizations of concurrent
programs [2, 4, 5]. However, while most previous work has
focused on visualizing a single execution of a concurrent pro-
gram, our design focuses on exploring multiple thread inter-
leaving sequences. Furthermore, our design helps with re-
vealing patterns of common errors and supporting drill down
to discover specic problems in the source code. While we
instantiate TIE with JPF, the general technique can be ap-
plied to other concurrency testing suites. In the future we
plan to investigate additional sorting functions, such as sort-
ing by sequence similarity. We will also study and rene the
technique through deployment to the JPF community.
5. REFERENCES
[1] K. Havelund and T. Pressburger. Model checking Java
programs using Java PathFinder. Int. J. on Software
Tools for Technology Transfer (STTT), 2(4), 2000.
[2] E. Kraemer and J. T. Stasko. Creating an accurate
portrayal of concurrent executions. IEEE Concurrency,
6(1):36{46, 1998.
[3] M. Musuvathi. Systematic concurrency testing using
CHESS. In Proc. of PADTAD, 2008.
[4] S. P. Reiss and S. Karumuri. Visualizing threads,
transactions and tasks. In Proc. of PASTE, pages 9{16,
2010.
[5] S. P. Reiss and M. Renieris. Demonstration of JIVE
and JOVE: Java as it happens. In Proc. of ICSE, pages
662{663, 2005.
Sign up today - FREE
Mendeley saves you time finding and organizing research. Learn more
- All your research in one place
- Add and import papers easily
- Access it anywhere, anytime


