proomt

Search

Search posts, papers, and topics

All posts

TailscaleAlex Chan14 min readpostmortemintermediate

How we tracked down a 16-year-old SQLite bug

Summary

Tailscale experienced 19 SQLite database corruptions over six months due to a 16‑year‑old bug in SQLite’s WAL checkpoint logic. The single‑writer, Go‑driven shard architecture forced them to add forensic telemetry, a transaction‑logging replay pipeline, and work directly with SQLite core developers to isolate and fix the issue, dramatically reducing downtime.

  • Even well‑tested, single‑writer SQLite can corrupt under rare edge cases; production telemetry is essential for catching them.
  • Streaming every mutating SQL statement to a separate log enables deterministic replay and can serve as a recovery path when backups are insufficient.
  • Collaboration with upstream maintainers (SQLite pro‑support) can accelerate root‑cause analysis for obscure bugs.
  • Automated integrity checks on backups and hard‑stop shutdown on detection cut mean‑time‑to‑recovery from >1 h to <1 h.

The post shows a realistic, large‑scale failure mode in a widely‑used embedded database and demonstrates practical forensics and mitigation strategies that other services with SQLite (or similar WAL‑based stores) can adopt.

7/10

Related reading

  1. SQLite Across Every Port: One Contract, One Encrypted File Format

    Codename One now ships a single, tested SQLite contract that works natively on Android, iOS, Windows, Linux, and in browsers via WebAssembly, with built‑in SQLCipher‑4 encryption supporting three key models. A conformance suite guarantees identical behavior across platforms, and migration helpers let legacy apps opt‑in. The update also adds a proper watch‑app model, DOM‑based text for JavaScript,…

    CodeName Onecodenameone.com11 min
  2. Constraint Decay: The Fragility of LLM Agents in Backend Code Generation

    A systematic evaluation of LLM agents generating multi‑file backend code shows a sharp drop in correctness when structural constraints (framework conventions, ORM usage, API contracts) are added. Across 100 tasks in 8 Python web frameworks, assertion pass rates fall ~27 points, with data‑layer bugs (bad queries, ORM violations) driving most failures. Mid‑size models cope with minimal frameworks (…

    arXiv cs.SE (Software Engineering)arxiv.org1 minpaperHN287197
  3. Aperture GA: Building a home(lab) for agentic AI

    Aperture, Tailscale’s AI gateway, is now generally available. It ships with starter tokens, in‑app token purchases, new Model Context Protocol (MCP) endpoints for adding Tailnet nodes and invoking Tailscale SSH, and an upgraded chat UI that supports Projects (shared context, tool access, node groups) and configurable default tool permissions. All agent actions respect Tailscale’s unidirectional A…

    Tailscaletailscale.com4 minreleaseHN41
  4. WAL + S3: Lakebase storage for the era of agents

    Neon's Lakebase Postgres redefines database storage by making the WAL the source of truth, stored on S3, rather than data files. This transaction-centric approach enables instant branching, time travel, and scalable, decoupled compute and storage for Postgres.

    Neonneon.com14 minHN4