Record Replay and Multi-version Execution for High Level Language Virtual Machines
Year: 2026
Type: dissertation
Abstract: Record Replay (RR) is a technique to reproduce program executions. RR’s primary use case is bug duplication. After a program crashes, a user sends a recording of the buggy execution to a developer who can deterministically replay the execution. Recordings reduce the dependence on user written bug reports because they contain details on the computing environment (e.g., data read/written to files/sockets) and user interaction. In addition, recordings contain detailed information that would be unavailable to the user such as thread scheduling decisions and shared memory usage. As a result, recordings also make it easier to duplicate heisenbugs, i.e., bugs which do not occur in every program execution. A heisenbug only needs to be recorded once to be replayed deterministically. RR can be either offline or online. The prior example described offline RR, which creates recordings that capture bugs in production for later diagnosis. Online RR periodically runs replays to check that invariants are satisfied. For instance, an online replay of synchronization events (e.g., lock acquisitions/releases) reveals the presence of race conditions when replay diverges—i.e., the replay exhibits different behavior from the recording. Online RR is similar to Multi-Version eXecution (MVX). MVX runs separate variants of the same software to improve program security and/or reliability. Variants in the Leader-Follower architecture interact similarly to recorders/replayers respectively. MVX and RR systems fail to be deployed in production environments despite their long research history due to a variety of reasons. First, existing MVX systems fail to support High Level Language Virtual Machines (HLLVMs), e.g., the Java Virtual Machine, due to divergent behavior introduced by garbage collection, just-in-time compilation, and class loading. RR systems have been able to support Java for years, but the techniques to do so have not permeated their way to MVX systems. Second, both techniques introduce high overheads for multi-threaded programs. For RR, the problem can be alleviated by recording a partial order (PO) of synchronization events. However, most PO recordings require additional processing before being replayable. For MVX, deriving a PO of events leads to unacceptable performance degradation. Third, RR inherently suffers from high overheads on file input/output (IO). To record data read from a file, the data must be duplicated and rewritten to the recording log; therefore, twice as much IO is performed. Fourth, recording sizes of non-terminating programs are unbounded. A recording captures a program execution from startup to shutdown, but programs like databases and key-value stores never shutdown. In this thesis I advance the state-of-the-art for both RR and MVX by exploring solutions to each of these issues. First, I describe the creation of, to the best of my knowledge, the first MVX system for Java, Jmvx; Jmvx also supports RR. The first version of Jmvx introduced runtime overheads of 25% for recording, 73% for replaying, 47% for leading, and 80% for following. Second, I present Relaxed Total Order (RTO) as an alternative approach to ordering synchronization events. RTO’s strictness is between total order and PO, but requires no additional processing after recording. As a result, RTO is applicable for MVX. RTO drops runtime overheads to 14% for recording, 13% for replaying, 22% for leading, and 38% for following. Third, I present a novel combination of RR and MVX to mitigate the pathological overhead of recording IO bound programs. My approach treats recording as an MVX problem. The Leader forwards all events except IO which can be duplicated (e.g., reading from local files). The Follower creates the recording log and re-executes omitted IO to backfill the data. As a result, the runtime overhead is shifted away from the process a user interacts with and the observable overhead to record a purely IO bound program drops from 196% to 25%. At the same time, hybrid MVX/RR does not increase the runtime overhead to record CPU bound processes. Fourth, I present Program Assisted Record Replay (PARR), a technique that allows the program being recorded (i.e., the recordee) to control the recorder. PARR leverages state already persisted by a program, e.g., a database snapshot of a key-value store, to bounded recording size. I augment the state persistence logic of a key-value store to truncate and restart recordings. In addition, I demonstrate the replays can be restarted upon loading the most recent persisted key value database, and that replay will complete successfully from then on. All of these advancements help close the gap between RR and MVX systems and the performance constraints required for production deployment.
Source: University of Illinois Chicago
Author: David Schwartz
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7225307491
