Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by letFunny on Friday July 03, 2026 @03:26PM
(#48778940)
Author of the article here. I am surprised to see the post was submitted and made it to the front page! Happy to answer any questions
[ Parent
| on HN ]
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by stevekemp on Friday July 03, 2026 @04:16PM
(#48779460)
"to prevent multiple from" seems to be missing a word.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by buggymcbugfix on Friday July 03, 2026 @06:18PM
(#48780679)
Thanks for the nice article. The SQLite docs that explain this bug are emphatic about how utterly rare, even irreproducible it is. How, then, was it found, one wonders?
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by letFunny on Friday July 03, 2026 @06:41PM
(#48780882)
My guess is that they noticed something was not quite right when inspecting the code and then tested their hypothesis manually to see if it was actually a real bug.
Something similar happened to me when I was working on some code that should clear the state and, by inspection, I noticed some field was not properly cleared under specific circumstances. Then I tested the hypothesis and indeed found a bug. Sometimes intuition and guessing is what it takes.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by bradfitz on Friday July 03, 2026 @10:46PM
(#48782221)
We found it at Tailscale and bought an enterprise support contract from SQLite to debug it for us. Worth every penny.
We should probably blog about it.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by doctorpangloss on Friday July 03, 2026 @11:23PM
(#48782385)
What mission critical purpose does sqlite provide at Tailscale exactly? Why use it at all?
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by akoboldfrying on Saturday July 04, 2026 @02:53AM
(#48783211)
It's in Chrome, Firefox, Safari, Windows 10, macOS because it efficiently solves a huge number of use cases while giving plenty of headroom for flexible querying.
If you have data more complicated than a single CSV or tab-separated text file that you will only ever process in sequential order, and you don't need inter-process interaction, you should be asking why not use SQLite.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by inigyou on Saturday July 04, 2026 @05:23AM
(#48784040)
sqlite is useful everywhere CSV files are useful but you'd like them to have more data integrity and faster updates. sqlite can replace some uses of MySQL, but more commonly it replaces fopen. https://sqlite.org/whentouse.html
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by jen20 on Saturday July 04, 2026 @08:48AM
(#48785040)
Quite a bit, it seems: https://tailscale.com/blog/database-for-2022
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by sennalen on Friday July 03, 2026 @08:26PM
(#48781556)
You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, it’s crawling toward you. You reach down, you flip the tortoise over on its back. The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over, but it can’t, not without your help. But you’re not helping. Why is that?
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by Groxx on Friday July 03, 2026 @10:34PM
(#48782180)
Because that would reverse flipping it over the first time, and our universe's physics are not reversible. Thermodynamics demands the turtle stay flipped.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by _doctor_love on Friday July 03, 2026 @11:21PM
(#48782378)
What’s a tortoise?
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by wowczarek on Saturday July 04, 2026 @01:16AM
(#48782821)
You know what a turtle is? Same thing, Leon.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by globnomulous on Wednesday July 08, 2026 @12:45AM
(#48827633)
My mother?
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by erikerikson on Saturday July 04, 2026 @01:49AM
(#48782948)
A turtle-like animal that only lives on land.
Re:Hunting a 16-year-old SQLite WAL bug with TLA+
by CoastalCoder on Saturday July 04, 2026 @08:10AM
(#48784820)
I feel like I'm ignorant of some classical fable here.
Is this an allusion?