Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Scribe: the record-replay mechanism
C Assembly Objective-C C++ Perl Shell
Pull request Compare This branch is 45879 commits ahead, 17 commits behind jonsmirl:master.
Failed to load latest commit information.
Documentation Code: Renamed scribe_emergency_stop() -> scribe_kill()
arch Syscalls: strace was confused
block block: Don't count_vm_events for discard bio in submit_bio.
crypto crypto: skcipher - avoid NULL dereference
drivers TTY: All the getters are non deterministic
firmware IB/qib: Use request_firmware() to load SD7220 firmware
fs Pipe fix for restricted replay
include Events: scribe_result_flags should not turn on features
init Merge branch 'sched-fixes-for-linus' of git://…
kernel Futex: Added warning when hashes are most likely to be invalid
lib lmb: rename to memblock
mm Memory: mmap() starts allocating new pages in the low address region
net Socket: accept() returning -EAGAIN bugfix
samples tracing: Let tracepoints have data passed to tracepoint callbacks
scribe Syscalls: we must ignore the put_user() in the scribe syscalls
scripts Code: Using a script to generate the uppercase/lowercase #defines
security KEYS: Propagate error code instead of returning -EINVAL
sound Merge branch 'fix/hda' of git://…
tools Merge branch 'perf-fixes-for-linus' of git://…
usr initramfs: add support for in-kernel initramfs compressed with LZO
virt/kvm KVM: read apic->irr with ioapic lock held
.gitignore Code: Using a script to generate the uppercase/lowercase #defines
.mailmap Add Sascha Hauer to .mailmap
COPYING [PATCH] update FSF address in COPYING
CREDITS Nicolas Pitre has a new email address
Kbuild kbuild: move asm-offsets.h to include/generated
MAINTAINERS watchdog: update MAINTAINERS entry
Makefile Support for Ubuntu 12.04
README README: fix misleading pointer to the defconf directory

Scribe: The record-replay mechanism


Scribe is a low-overhead multi-threaded application record-replay mechanism.

Scribe introduces new lightweight operating system mechanisms, rendezvous and sync points, to efficiently record nondeterministic interactions such as related system calls, signals, and shared memory accesses. Rendezvous points make a partial ordering of execution based on system call dependencies sufficient for replay, avoiding the recording overhead of maintaining an exact execution ordering. Sync points convert asynchronous interactions that can occur at arbitrary times into synchronous events that are much easier to record and replay.

For more details read this blog post. It has a screencast showing some of Scribe features.

Project Organisation

The Scribe project is divided in four different ones:

Installing Scribe


  • GCC and its friends
  • CMake
  • Python (version 2.6)
  • Cython


  1. Install the kernel

    git clone git://
    cd linux-2.6-scribe
    make menuconfig
    make install
  2. Install the C library

    git clone git://
    cd libscribe
    cd build
    cmake ..
    make install
  3. Install the python library and userspace tools

    git clone git://
    cd py-scribe
    ./setup install
  4. (Optional) Install the test suite

    git clone git://

Using Scribe

py-scribe provides three scripts: record, replay, profiler.

1. Record an application

The record command line tool allows the user to record an execution.

The verbosity level of the recorded log file can be provided. It allows the user to record only the bare minimum to guarantee a deterministic replay (highest performance), or to record the execution with debugging information so the log file can be easily interpreted by getting a execution trace similar to strace.

By sending a SIGUSR1 signal to the recording tool, Scribe detaches itself from the application while it continues running. A SIGUSR2 signal bookmarks an execution point in time. The user can then replay the application up to that point and the application state will be guaranteed to be exactly the same as during the recording.


    # record date
    Mon Aug  8 04:18:33 EDT 2011
    # ls -lh date.log
    -rw-r--r-- 1 root root 4.2K Aug  8 04:18 date.log

2. Replay an execution from a log file

The replay tool allows the user to replay a previously recorded execution.

The user can provide the backtrace size in case the replay fails and diverge (for instance, the system got out of memory and the replay cannot continue).

A SIGUSR1 signal can be sent to detach Scribe at any point in time and let the application continue a normal execution.

A bookmark id can be given as well to let the application go live at a specific point in time.


    # replay date.log
    Mon Aug  8 04:18:33 EDT 2011

3. Look at the recorded log file in a human readable format

The profiler tool allows the user to display the recorded log file in a human readable format.


    # profiler date.log | grep Mon -B3
    [02] write() = 29
    [02]   resource lock, type = files_struct, serial = 31
    [02]     resource lock, type = file, serial = 1, desc = /dev/pts/0
    [02]       data: size = 29, "Mon Aug  8 04:18:33 EDT 2011\n"

The provided command line tools use the Scribe Python library internally. The user can use the libraries to achieve a lot more by building its own logic around the Scribe API.

Detailed documentation

Something went wrong with that request. Please try again.