GoJournal: a verified, concurrent, crash-safe journaling system
Talkat 15th USENIX Symposium on Operating Systems Design and Implementation (OSDI '21) · 2021-07-14..07-16
summary
GoJournal implements a verified, concurrent, crash-safe journaling API in Go and proves it in Coq with Perennial 2.0, using the Goose translator to model Go code. The proof is about 26,000-line proof (≈20× code:proof ratio) and uncovers one serious concurrency bug. A practical unverified NFS server, GoNFS, uses GoJournal and achieves roughly 90–95% throughput of Linux NFS on an NVMe-backed AWS i3 machine while scaling better under many clients.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:15Suppose we want to write a correct file system
- 0:36Gojournal gives a storage system efficient, atomic writes
- 1:29Current approaches cannot handle a system of this complexity
- 1:59Contributions
- 2:29Gojournal writes operations atomically to disk
- 2:57Operations can concurrently manipulate objects within a block
- 3:17Specification challenge: what do concurrently committed operations do?
- 3:47Sequential journaling only maintains old and next state
- 4:42An operation's specification only refers to its disk footprint
- 5:32Introduce assertion for operation's view of disk
- 6:07Key idea: operations manipulate an in-memory view of each object
- 7:17Gojournal has a modular implementation and proof
- 7:40Write-ahead log implements the core atomicity of the journal
- 8:11Writes are buffered before being logged
- 8:49Challenge 1: Reads can observe unstable writes
- 9:22Object layer implements sub-block object access
- 9:34Challenge 2: Reads and writes can proceed concurrently
- 10:10Concurrent writes are unsafe due to read- modify-write sequence
- 11:06Implementation overview
- 12:08Experimental setup
- 12:45GONFS gets comparable performance even with a single client
- 13:11Gojournal allows GONFS to scale with number of clients
- 13:53Summary
