~/talk

Can Applications Recover from fsync Failures?

Talkat USENIX ATC '20 · 2020-07-15..07-17· [databases]
links:none on file
links:none on file
links:none on file
links:none on file
slides:none on file

The study injects deterministic block failures on an unmodified kernel using dm-loki fault injector and a user-space tester cuttlefs user-space page cache and evaluates ext4, XFS, Btrfs and five apps (PostgreSQL, SQLite, Redis, LMDB, LevelDB). Key findings: all file systems mark dirty pages clean on fsync failure, ext4 data-mode reports errors late, Btrfs reverts page contents, and in-memory metadata can still point to non-overwritten blocks. Consequences include false failures, widespread data loss and corruption; simple retries fail, double-fsync helps, Btrfs is best for crash-restart but breaks rollback-based schemes.

AI-written summary · about

  1. 0:00Intro
  2. 0:25How does data reach the disk?
  3. 1:22fsync is really important
  4. 2:10It's hard to get durability correct Applications find it difficult
  5. 2:42fsync can fail Durability gets harder to get right
  6. 3:31Why care about fsync failures? "About a year ago the PostgreSQL community discovered that fsync (on Linux and some BSD systems) may not work the way we always thought it is [sic], with possibly disastrous consequences for data durability/consistency (which is something the PostgreSQL community really values)."
  7. 4:03Our work Systematically understand fsync failures
  8. 4:41File System Results
  9. 5:30Application Results
  10. 6:27Outline
  11. 6:41File System | Methodology: Fault Injection
  12. 7:04File System Methodology: Workloads Common write patterns in applications • Reduced to simplest form
  13. 7:36File System Result #1: Clean Pages Dirty page is marked clean after fsync failure on all three file systems
  14. 8:47File System Result #22: Page Content File systems do not handle fsync errors uniformly • Page content depends on file system
  15. 9:52File System Result #3: In-memory state In-memory data structures are not entirely reverted
  16. 11:42Applications Five widely used applications
  17. 13:15Applications Results: Overview Ext4 Ordered Mode
  18. 13:50Crash/Restart Simple strategies fail Crash/restart is incorrect recovers wrong data from page cache • Example: PostgreSQL
  19. 14:53Applications Results #1: False Failures False Failures: Indicate failure but actually succeed
  20. 15:22Late Error Reporting All applications susceptible to data loss on ext4 data mode
  21. 16:20Btrfs winning?
  22. 17:34Applications Results Summary Simple strategies fail • Applications have moved away from retries
  23. 18:20Challenges and Directions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.