A distributed debugger based on deterministic replay