Bun issue (Dec 2): Bun fs.watch Loses Filenames on Windows Due to 4 KB Buffer Limit
Is it fixed? Not yet.
Ongoing since Dec 2, 16:37 UTC. First reported Dec 2, 16:37 UTC.
What happened
Bun 1.4.6-canary.1 on Windows suffers from a bug in recursive fs.watch where bursts of multiple new file creations only capture one name and return null for the rest due to a 4 KB read buffer limit.
What caused it?
A recursive watch on Windows reads changes into a 4 KB buffer, causing a burst of new files to lose individual names and return null.
Source: github.com
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Official fixOutage timeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
fs.watch: on Windows, a recursive watch reads changes into 4 KB, so a burst of 20 new files loses 19 names to one change with filename null
Source
Reports of this outage
1 report · 1 GitHubShow
- [1]GitHub First reportfs.watch: on Windows, a recursive watch reads changes into 4 KB, so a burst of 20 new files loses 19 names to one change with filename null(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.6-canary.1+c24943ad0 What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? I found this while checking whether a file watcher that keeps one recursive fs.watch per project root on Windows can count on a name for every file written under the root. Reproducer: https://gist.github.com/YevheniiKotyrlo/7ad75f68a57b134e2e420dadff0440fe Clone the gist and run bun repro.mjs on Windows. For each N of 10, 20, 100 and…
by YevheniiKotyrlo 0upvotes 0comments
Bun issue FAQ
What happened in the Bun issue, and why?
Ongoing since Dec 2, 16:37 UTC. The cause: A recursive watch on Windows reads changes into a 4 KB buffer, causing a burst of new files to lose individual names and return null.
What is affected by the Bun issue?
Bun (versions: 1.4.6-canary.1).
When did the Bun issue start and end?
It started Dec 2, 16:37 UTC and is still ongoing (3 h 57 min so far). This page updates as it develops.
How do I get alerts for Bun?
Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.