GoJournal: a verified, concurrent, crash-safe journaling system
Tej Chajed, Joseph Tassarotti, Mark Theng, Ralf Jung, M. Frans Kaashoek, Nickolai Zeldovich
Abstract
The main contribution of this paper is GoJournal, a verified, concurrent journaling system that provides atomicity for storage applications, together with Perennial 2.0, a framework for formally specifying and verifying concurrent crash-safe systems. GoJournal's goal is to bring the advantages of journaling for code to specs and proofs. Perennial 2.0 makes this possible by introducing several techniques to formalize GoJournal's specification and to manage the complexity in the proof of GoJournal's implementation. Lifting predicates and crash framing make the specification easy to use for developers, and logically atomic crash specifications allow for modular reasoning in GoJournal, making the proof tractable despite complex concurrency and crash interleavings.
GoJournal is implemented in Go, and Perennial is implemented in the Coq proof assistant. While verifying GoJournal, we found one serious concurrency bug, even though GoJournal has many unit tests. We built a functional NFSv3 server, called GoNFS, to use GoJournal. Performance experiments show that GoNFS provides similar performance (e.g., at least 90% throughput across several benchmarks on an NVMe disk) to Linux's NFS server exporting an ext4 file system, suggesting that GoJournal is a competitive journaling system. We also verified a simple NFS server using GoJournal's specs, which confirms that they are helpful for application verification: a significant part of the proof doesn't have to consider concurrency and crashes. Method Description Spec func Begin() *Op Start operation §5.2 func (*Op) ReadBuf(addr Addr, sz uint64) *Buf Read a buffer §5.3 func (*Buf) SetDirty() Mark a buffer as modified §5.3 func (*Op) OverWrite(a Addr, sz uint64, data []byte) Write without reading §5.3 func (*Op) Commit(wait bool) bool Commit by appending to in-memory log. §5.6 If wait=true, also wait until changes are on disk. func Flush() bool Flush in-memory log func (*Lockmap) Acquire(i uint64) Acquire ith lock §5.4 func (*Lockmap) Release(i uint64) Release ith lock §5.4
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers18
- Using Lightweight Formal Methods to Validate a Key-Value Storage Node in Amazon S3James Bornholt, Rajeev Joshi, Vytautas Astrauskas, Brendan Cully et al.SOSP 2021 · 63 citations
- Anvil: Verifying Liveness of Cluster Management ControllersXudong Sun, Wenjie Ma, Jiawei Tyler Gu, Zicheng Ma et al.OSDI 2024 · 50 citations
- Verifying the DaisyNFS concurrent and crash-safe file system with sequential reasoningTej Chajed, Joseph Tassarotti, Mark Theng, M. Frans Kaashoek et al.OSDI 2022 · 25 citations
- Grove: a Separation-Logic Library for Verifying Distributed SystemsUpamanyu Sharma, Ralf Jung, Joseph Tassarotti, M. Frans Kaashoek et al.SOSP 2023 · 18 citations
- Sharding the State Machine: Automated Modular Reasoning for Complex Concurrent SystemsTravis Hance, Yi Zhou, Andrea Lattuada, Reto Achermann et al.OSDI 2023 · 18 citations
Builds on2
- Storage Systems are Distributed Systems (So Verify Them That Way!)Travis Hance, Andrea Lattuada, Chris Hawblitzel, Jon Howell et al.OSDI 2020 · 52 citations
- Persistent Owicki-Gries reasoning: a program logic for reasoning about persistent programs on Intel-x86Azalea Raad, Ori Lahav, Viktor VafeiadisOOPSLA 2020 · 20 citations
Related papers
- CJFS: Concurrent Journaling for Better ScalabilityJoontaek Oh, Seung Won Yoo, Hojin Nam, Changwoo Min et al.FAST 2023
- Z-Journal: Scalable Per-Core JournalingJongseok Kim, Cassiano Campes, Joo Young Hwang, Jinkyu Jeong et al.USENIX ATC 2021 · 22 citations
- go-pmem: Native Support for Programming Persistent Memory in GoJerrin Shaji George, Mohit Verma, Rajesh Venkatasubramanian, Pratap SubrahmanyamUSENIX ATC 2020 · 25 citations
- CrossFS: A Cross-layered Direct-Access File SystemYujie Ren, Changwoo Min, Sudarsun KannanOSDI 2020 · 35 citations
- Using Dynamically Layered Definite Releases for Verifying the RefFS File SystemMo Zou, Dong Du, Mingkai Dong, Haibo ChenOSDI 2024 · 4 citations
