Urgent.News

What's breaking now, across thousands of outlets.

Tech

Deeply buried 16-year-old SQLite bug caused last year's Tailscale outages

Think your bugs are a pain to track? WAL-Reset took six months of hunting and development of a new logging tool to identify

Deeply buried 16-year-old SQLite bug caused last year's Tailscale outages

A deeply buried 16-year-old bug in SQLite, the database used by Tailscale, caused unexpected outages in the peer-to-peer networking service earlier this year. The Tailscale team investigated the issue for six months before identifying the cause, which was a rare data race known as the WAL-Reset bug. The bug arises during the SQLite checkpointing process, which is responsible for moving new database entries into the master database file.

When writing the Write-Ahead Log (WAL) to the database, the WAL-Reset bug causes checkpoints and writes to collide, resulting in the loss of permanently lost data. Tailscale's manual checkpointing process, which they use for faster and consistent backups, triggered the bug due to multiple database connections and reading/writing occurring simultaneously.

The SQLite maintainers have fixed the issue, but the bug has been present since version 3.7.0 released in July 2010. SQLite recommends users update to a fixed version, as the bug is extremely unlikely to occur in ordinary use.

Written by urgent.news from The Register's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at theregister.com →

More in Tech

More from Wednesday 12 August →