Skip to content

Regression in abortAllDurableObjects() on Windows @ 1.20250618.0 #4465

@petebacondarwin

Description

@petebacondarwin

When trying to bump workerd in workers-sdk we noticed failires in the Vitest integration on Windows: cloudflare/workers-sdk#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().

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions