Bun Windows Recursive fs.rmSync and fs.promises.rm Spins on Delete-Pending Files
Is it fixed? Not yet.
Ongoing since Nov 11, 00:05 UTC. First reported Nov 11, 00:05 UTC.
What happened
Recursive file deletion using fs.rmSync or fs.promises.rm in Bun on Windows enters an infinite spin when a directory holds a delete-pending file. Additionally, non-recursive rm on Windows can report EPERM as EFAULT during file removal races.
What caused it?
Under active investigation. No report has identified a root cause yet.
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Official fixTimeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
Windows: recursive fs.rmSync / fs.promises.rm spin while the directory holds a delete-pending file
Source
Evidence
2 reports · 2 GitHubShow
- [1]GitHub First reportWindows: recursive fs.rmSync / fs.promises.rm spin while the directory holds a delete-pending file(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4+38afee6c8 What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? Save as repro.ts, run bun repro.ts (also bun repro.ts async and bun repro.ts retries). It marks a file delete-pending through an open handle, then runs a recursive rm on its directory in a child killed after 10 s. import { spawnSync } from 'node:child_process'; import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; import { rm } from…
by zachthedev 0upvotes 1comments
- [2]GitHubnode:fs: non-recursive `rm` on Windows reports `EPERM` as `EFAULT` when deleters race(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4 What platform is your computer? GitHub Actions windows-latest runner (NTFS) What steps can reproduce the bug? Several processes remove the same file at the same moment with a non-recursive fs.promises.rm(path, { force: true }). I have no Windows machine, so this script is written from the source reading below and has not been run by me. Start it in four processes at once in one directory: // race.mjs import { rm, writeFile } from "node:fs/promises"; const…
by chenxin-yan 0upvotes 1comments92% match
FAQ
What happened in the Bun issue?
Recursive file deletion using fs.rmSync or fs.promises.rm in Bun on Windows enters an infinite spin when a directory holds a delete-pending file. Additionally, non-recursive rm on Windows can report EPERM as EFAULT during file removal races.
What is affected by the Bun issue?
Bun (versions: 1.4.4). Also affected at the same time: Windows.
When did the Bun issue start and end?
It started Nov 11, 00:05 UTC and is still ongoing (8 d 4 h 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 2 reports from 1 independent source.