frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Tailscale Traces Database Corruption to 16y/o SQLite WAL-Reset Bug

https://tailscale.com/blog/sqlite-wal-reset-bug
165•ropbear•1h ago

Comments

simonw•1h ago
> We funded the open-source SQLite VFS shim that helped isolate the race condition almost immediately, and will help track down similar bugs in the future.

Interesting example of a company funding open source - in this case paying for the development of a new and very specific debugging tool.

binhex•55m ago
Yeah, tailscale seems to have leadership with their head on right, I agree with the way they handle a lot of things.
devmor•52m ago
Their CEO is a very nice and personable guy too. Has given me and others advice on random topics of his interest with no nonsense plenty of times.
saghm•50m ago
Yeah, this part also stuck out to me:

> Because this wouldn’t be a quick or easy fix, we reached out to the SQLite developers for a professional support contract. This was a great decision. It gave us direct access to their deep expertise and experience, and we had many detailed technical conversations about our architecture and our incidents.

They were willing to pay to get help solving the problem, and then pay again to make sure that the problem is easier to avoid in the future! That kind of long-term thinking seems pretty rare nowadays...

packetlost•11m ago
Avery is one of the few people I have enough respect for to look up to.
EastSmith•12m ago
Started using them like 2 weeks back, happy to see how they work.
dolmen•51m ago
Which SQLite driver for Go does Tailscale use?
sethops1•4m ago
https://github.com/tailscale/sqlite
bobtheborg•48m ago
Great read. So glad they took the time to tell this story. (And glad they, as a for profit corporation, took out a support contract with SQLite. I hope they continue to do so even though this problem is resolved.)
calmingsolitude•44m ago
Well written post, really enjoyed reading it.

> A single Go process exclusively accesses that database, and serves the control plane for those tailnets. This single-writer design is exactly how SQLite is meant to be used.

This line led me to believe that the writer and checkpointing logic lived on the same database connection, so I was curious to find out how the data race occurred. However, the bug details on the SQLite page[0] outline that it can only ever occur if there are multiple connections open, so the writer and the checkpointer must have been on different threads.

[0] https://sqlite.org/wal.html#the_wal_reset_bug

ec109685•38m ago
While technically true as written, it seems to downplay the significance:

> The bug is a data race with tight timing constraints. It is unlikely to occur in common use.

A large customer did experience this corruption, so it's important for people with tailscale's setup update immediately.

> The developers have never been able to reproduce the bug organically and had to add special testing logic to SQLite that deliberately triggers the circumstances of the the bug in order to verify that the issue has been fixed.

Ariarule•18m ago
Odd not to highlight the sentence where they answer the obvious question "Why Tailscale in particular?":

> They also explained why we were more likely to hit the bug than other SQLite users: we take manual control of the checkpointing process, and we checkpoint very aggressively. Even a bug triggered by a rare condition was bound to hit us eventually.

riknos314•28m ago
> Whenever corruption occurred, we had to stop the control plane process on the shard while we repaired or restored the database. This was painful for tailnets on that shard, because their entire control plane disappeared during that recovery window.

Gotta love single points of failure...

kccqzy•20m ago
What are some solutions to avoid database corruption being single points of failure? I can’t think of any off the top of my head. I don’t think people typically consider database corruption to be a kind of failure common enough to design for, unless you have unusual requirements.
noncoml•18m ago
How come mythos didn’t find this?
pstuart•8m ago
I imagine the SQLite eschews AI generated code, but using it for testing (vulnerability, performance, etc) would seem like an easy win.

I know their proprietary testing framework is their secret sauce so we may never know...

Tailscale Traces Database Corruption to 16y/o SQLite WAL-Reset Bug

https://tailscale.com/blog/sqlite-wal-reset-bug
170•ropbear•1h ago•16 comments

2026 Eclipse Webcams

https://jonty.github.io/2026_eclipse_webcams/
336•zoenolan•4h ago•78 comments

Tim King, AmigaDOS developer, has died

https://amiga-news.de/en/news/AN-2026-08-00070-EN.html
79•doener•1h ago•18 comments

Someone is running mass vulnerability scans, spoofing AI bots like ClaudeBot

https://knownagents.com/insights
74•gavinhking•2h ago•26 comments

Why Tiny JPEGs Look Different in Chrome

https://guillaumetech.github.io/posts/jpg-scaling-chrome/
99•gutechh•2h ago•19 comments

License plate reader searches should require a warrant

https://andrewpwheeler.com/2026/08/12/license-plate-reader-searches-should-require-a-warrant/
209•apwheele•1h ago•120 comments

Grok 4.6

https://x.ai/news/grok-4-6
58•iLuddite•31m ago•38 comments

GiveCampus (YC S15) Is Hiring Engineering Managers

https://job-boards.greenhouse.io/givecampus/jobs/4112793009
1•mkong1•1h ago

AI is removing the middle class of software engineering

https://blog.florianherrengt.com/ai-removing-middle-class-software-engineering.html
246•florianherrengt•2h ago•216 comments

My Agent Setup

https://chad.cm/posts/2026-8-11-my-agent-setup
50•carimura•2h ago•29 comments

What sort of maths are LLMs good at?

https://gowers.wordpress.com/2026/08/12/what-sort-of-maths-are-llms-good-at/
182•ColinWright•6h ago•81 comments

Show HN: Woxi - Open-source Mathematica / Wolfram Language reimplementation

https://woxi.ad-si.com
176•adius•5h ago•23 comments

Qwen/Qwen3.8-2.4T-A95B

https://huggingface.co/Qwen/Qwen3.8-2.4T-A95B
82•Philpax•1h ago•21 comments

Automatic1111 for Apple metal, 40% speed up sd1.5

https://therad.ninja/from-8-10-seconds-to-3-7-teaching-automatic1111-to-speak-metal-on-an-m3-pro/
30•dmikey831•2h ago•12 comments

Solving the Shortest Vector Problem in $2^{0.6039n}$ Time via Mid-Point Hessian

https://arxiv.org/abs/2608.02478
11•sbulaev•1w ago•0 comments

uBlock Origin Is Giving Up the Fight to Keep Ads Off Facebook

https://digitalescapetools.com/2026/08/ublock-origin-stops-chasing-facebook-ads.html
73•Markoff•4h ago•42 comments

Shade Map

https://shademap.app
37•fredley•3h ago•7 comments

Delphi 13 Community Edition Is Now Available

https://blogs.embarcadero.com/delphi-13-community-edition-is-now-available/
97•layer8•4h ago•73 comments

High-Res Photo Shows Sand-Capped Butte Rising from Mars Plain of Polygons

https://petapixel.com/2026/08/04/amazing-high-res-photo-shows-a-butte-rising-from-mars/
113•bookofjoe•6d ago•8 comments

Bigos (Polish Hunter's Stew) Recipe Builder

https://chefsbinge.com/bigos-recipe-builder/
48•doublepg23•5d ago•16 comments

The Ultimate Horse

https://worksinprogress.co/issue/the-ultimate-horse/
27•Petiver•20h ago•5 comments

Launch HN: Discovered Materials (YC P26) – AI agents to discover new materials

https://discoveredmaterials.com/research/
48•advaith08•8h ago•13 comments

Commodore 8-Bit 5¼" Disk Images

https://www.masswerk.at/nowgobang/2026/commodore-disk-images
14•masswerk•2h ago•0 comments

German advocacy group lodges criminal complaint over Meta AI glasses

https://www.reuters.com/legal/government/german-advocacy-group-lodges-criminal-complaint-over-met...
53•tartoran•1h ago•18 comments

The hardest working font in Manhattan (2025)

https://aresluna.org/the-hardest-working-font-in-manhattan/
320•dcminter•5d ago•49 comments

Worms: The Future of Yesterday's Worms Today

https://worm.net/
135•doener•5d ago•45 comments

Controversial creators are benefiting from monetization programs run by Meta

https://www.abc.net.au/news/2026-08-06/ragebait-how-facebook-is-paying-controversial-creators/106...
426•robtherobber•6h ago•277 comments

Hax – a minimalist, terminal-native coding agent written in C

https://usehax.dev/
9•OleksandrC•1h ago•3 comments

ArenaAllocators don't play nicely with ArrayLists

https://www.openmymind.net/Arena-Allocators-and-ArrayLists/
9•ibobev•5d ago•1 comments

Show HN: KidScreen, a finite YouTube shelf chosen by parents

https://kidscreen.app
20•Tintly•4h ago•17 comments