cloudflare / cloudflare/workerd

Regression in `abortAllDurableObjects()` on Windows @ 1.20250618.0

Open
#4,465 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

When trying to bump workerd in workers-sdk we noticed failires in the Vitest integration on Windows: https://github.com/cloudflare/workers-sdk/pull/9757.

Vitest tries to clean up the persistent storage files for emulated resources such as KV, R2, etc. This storage is implemented via sqlite DOs. Before cleaning up Vitest runs a Worker that calls `abortAllDurableObjects()`.

```ts
import workerdUnsafe from "workerd:unsafe";
export default {
async fetch(request) {
if (request.method !== "DELETE") return new Response(null, { status: 405 });
await workerdUnsafe.abortAllDurableObjects();
return new Response(null, { status: 204 });
}
};
```

It then tries to delete the underlying sqlite db files.

After this version of workerd, the files that used by the DO storage are not released as expected on Windows resulting in `EBUSY` errors.

We have worked around this by adding a catch block for now. But it would be good to know if there was a problem with how worked releases file handles on Windows.

I'll try to create a workerd only reproduction.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.