Live data from Hacker News

Deterministic Linux for controlled testing and software bug-finding

developers.facebook.com

1–10 of 71 posts

Re: Deterministic Linux for controlled testing and software bug-finding

#3
TL;DR: This is a Rust project that forces deterministic execution of arbitrary programs and acts like a reproducible container. That is, it hermetically isolates the program from sources of non-determinism such as time, thread interleavings, random number generation, etc. Guaranteed determinism is a powerful tool and it serves as a basis for a number of applications, including concurrency stress testing, record/replay, reproducible builds, automatic diagnosis of concurrency bugs, and more.

I've been on the team working on this project over the past ~2 years. AMA!

Here is the GitHub repository: https://github.com/facebookexperimental/hermit

Re: Deterministic Linux for controlled testing and software bug-finding

#4

TL;DR: This is a Rust project that forces deterministic execution of arbitrary programs and acts like a reproducible container. That is, it hermetically isolates the program from sources of non-determinism such as time, thread interleavings, random number generation, etc. Guaranteed determinism is a powerful tool and it serves as a basis for a number of applications, including concurrency stress testing, record/repla…

Note that this is a follow-on project from the earlier Dettrace system, which was applied mainly to reproducible builds (as in the academic paper, https://dl.acm.org/doi/10.1145/3373376.3378519, and presented to the Debian Reproducible Builds summit):

- https://github.com/dettrace/dettrace

And one cool part of it is this Rust program instrumentation layer:

- https://github.com/facebookexperimental/reverie

It's good for building OS-emulator style projects or tracing tools.

Re: Deterministic Linux for controlled testing and software bug-finding

#6

TL;DR: This is a Rust project that forces deterministic execution of arbitrary programs and acts like a reproducible container. That is, it hermetically isolates the program from sources of non-determinism such as time, thread interleavings, random number generation, etc. Guaranteed determinism is a powerful tool and it serves as a basis for a number of applications, including concurrency stress testing, record/repla…

> thread interleavings

I was going to ask if it could do the flip side - instead of stabilizing the scheduler, make it less predictable.

AFAICT, it can! Awesome, looking forward to giving it a try.

   hermit run --chaos --seed-from=SystemRandom ./target/debug/hello_race;

Re: Deterministic Linux for controlled testing and software bug-finding

#7

Is it just me or are we experiencing an uptick in high-quality, sophisticated software projects being open-sourced by FAANG companies?

It’s great how much open source infrastructure software has come out of FAANG in the past decade. Between Kubernetes, react, Kafka, etc it’s wild how much of my tech stack is open source software developed by people at large tech companies. It’s also great PR for the companies.

Re: Deterministic Linux for controlled testing and software bug-finding

#9
post #6

TL;DR: This is a Rust project that forces deterministic execution of arbitrary programs and acts like a reproducible container. That is, it hermetically isolates the program from sources of non-determinism such as time, thread interleavings, random number generation, etc. Guaranteed determinism is a powerful tool and it serves as a basis for a number of applications, including concurrency stress testing, record/repla…

> thread interleavings I was going to ask if it could do the flip side - instead of stabilizing the scheduler, make it less predictable. AFAICT, it can! Awesome, looking forward to giving it a try. hermit run --chaos --seed-from=SystemRandom ./target/debug/hello_race;

Yes indeed.

That concurrency testing capability is a pretty well-studied area and we implement a couple existing algorithms. The first is our adaptation of the PCT algorithm (ASPLOS'10 https://www.microsoft.com/en-us/research/wp-content/uploads/...). That's what you get by default with `--chaos`.

But we also have variations on straight up randomized scheduler (random thread selection at each time step).

rr chaos mode has its own take on this: https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mo...

This study compares a few approaches - http://www.doc.ic.ac.uk/~afd/homepages/papers/pdfs/2016/TOPC....

Post reply on HN