Time-travelling debugging for message passing on Truffle

Printer-friendly version
  • Interest on language implementation and the art of debugging.
  • Having followed Multicore Programming and Distributed and Mobile Programming Paradigms is a plus, but not required.

With the start of the multicore era, concurrent programming became more and more important. Unfortunately, it also complicates the software development significantly. Common concurrency problems include correctness issues such as data races and deadlocks as well as performance issues caused by resource contention and sequential bottlenecks. To avoid these problems, a wide variety of different concurrency models have been proposed including thread and locks, Fork/join frameworks, actors, Software Transactional Memory (STM), etc. While much work has indeed happened at the language design and implementation level, tools such as inspectors, debuggers, and profilers that expose the high-level concurrency concepts such as transactions or asynchronous messages to the developers remain largely unexplored. Yet software tools are an integral part of application development since they help developers to cope with the complexity of software.

The focus of this thesis is the development of high-level debuggers that adapt the debugging session and features to the concurrency model of the application at hand.  An important concern when developing such tools is also to overcome the fundamental performance overhead of collecting the runtime information on data access patterns, data races, conflicting updates in transactions, or actors that are sequential bottlenecks.

In previous work at the software language lab, we have already explored debugging support for message-passing concurrent applications.  In particular, a distributed online debugger called REME-D - for Reflective Epidemic MEssage-oriented Debugger - was implemented for debugging distributed applications running on mobile ad hoc networks written in AmbientTalk. REME-D is designed as a breakpoint-based debugger in which focus is placed on the exchange of asynchronous messages between different actors. It adapts the notions of sequential debugging, such as step-by-step execution, breakpoints and state introspection, to message passing debugging.

Goal & Research Activities: 

The goal of the thesis is to develop an efficient implementation of a time-travelling debugger for message passing concurrency.  Building on top of the existing results of REME-D, we would like to complement REME-D’s features with time-travelling debugging which enable forward and backward step-by-step execution and state inspection. The main goal of this technique is to support the process of finding the root cause of a bug in a message passing concurrent program by allowing developers to inspect and replay history of messages that lead to the execution of a particular message. Time-travelling debugging, however, typically incurs in a high performance overhead which in the case of concurrent debugging may even alter the target concurrent program being debugged. As such, one of the main challenges in this thesis is to obtain the necessary information to track message ordering and causal dependencies between messages while minimizing the interference with the program execution as much as possible. 

In order to explore an efficient implementation of the time-travelling debugger, we will start from a re-implementation of REME-D for a message passing concurrent language built on top of the Truffle framework and Graal compiler toolchain.  Truffle was invented at the SSW in collaboration with Oracle Labs to facilitate the implementation of dynamic languages and as a foundation for research in language implementation techniques and language designs. Graal is a just-in-time compiler for Java virtual machines (JVMs) built in Java itself. It reaches the same peak-performance as Oracle’s HotSpot JVM, which is a requirement to ensure the validity of our research results. They are ideal research platforms, because they enable more effective experimentation than classic technologies.  In particular, we can explore prior work on dynamic and optimistic approaches to compiler optimizations to provide a minimal instrumentation that enables inspection and interaction for message-passing concurrency.