# ThreadSanitizer misses data races when you cross 255 threads

Original title: Data races and the limits of ThreadSanitizer in C and Go

> Hacker News story 49679949 · language: en · submitted 2026-09-13
> Web version: https://zeli.app/story/49679949
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 39 · by [matt_d](<https://news.ycombinator.com/user?id=matt_d>) · 💬 3
[original](<https://theconsensus.dev/p/2026/09/06/data-races-and-the-limits-of-threadsanitizer-in-c-and-go.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49679949>)

## Summary

ThreadSanitizer is the race detector behind Clang, GCC, Go, Swift, and OCaml, but it has blind spots. The author builds a Python interpreter for a C subset and a FastTrack-style race detector to show how TSan works, then demonstrates that it can fail to report races when more than 255 threads are involved—a common situation in Go web services with one goroutine per request. The article also covers a sync.Pool design that hides races between goroutines whose pooled objects hash to the same slot.

## Key quote

> ThreadSanitizer cannot reliably report data races while crossing a 255 total thread boundary.

---

## Cite

- Page: https://zeli.app/story/49679949
- Date: 2026-09-13
- Source: theconsensus.dev (https://theconsensus.dev/p/2026/09/06/data-races-and-the-limits-of-threadsanitizer-in-c-and-go.html)
- Hacker News: https://news.ycombinator.com/item?id=49679949

## Other languages

- zh: https://zeli.app/zh/story/49679949 · markdown: https://zeli.app/zh/story/49679949.md
- ja: https://zeli.app/ja/story/49679949 · markdown: https://zeli.app/ja/story/49679949.md
- ko: https://zeli.app/ko/story/49679949 · markdown: https://zeli.app/ko/story/49679949.md
- de: https://zeli.app/de/story/49679949 · markdown: https://zeli.app/de/story/49679949.md
- es: https://zeli.app/es/story/49679949 · markdown: https://zeli.app/es/story/49679949.md
- ru: https://zeli.app/ru/story/49679949 · markdown: https://zeli.app/ru/story/49679949.md
