Skip to content

Bug Report - Segmentation fault on MacOS with workerd and wrangler and vitest #6583

@paralin

Description

@paralin

I am seeing a segfault crash in the Cloudflare Vitest worker pool on macOS arm64.

  • macOS 15.7.3 (24G419)
  • Apple Silicon
  • bun 1.3.12
  • node v25.9.0
  • vitest 4.1.4
  • @cloudflare/vitest-pool-workers 0.14.6
  • wrangler 4.82.2

Some tests run, but tests that import certain Worker/Durable Object modules crash before any test body executes.

*** Received signal #11: Segmentation fault: 11

Error: [vitest-pool]: Worker cloudflare-pool emitted error.
Caused by: Error: Worker exited unexpectedly

What works

A simple non-DO test file passes under the same runner config.

What fails

Files that import more substantial Worker/Durable Object code paths consistently crash the Cloudflare pool before tests run.

Reproduction commands

These both fail the same way:

bunx vitest run --max-workers=1 --no-isolate path/to/crashing.test.ts
node ./node_modules/vitest/vitest.mjs run --max-workers=1 --no-isolate path/to/crashing.test.ts

The repo script also fails:

bun run test

Important notes

  • This is not Bun-specific. Reproduces with direct node invocation too.
  • --max-workers=1 --no-isolate does not avoid the crash.
  • The crash happens before test execution for the affected files.

Tried

I also tried forcing Miniflare to use a newer external workerd binary from the latest GitHub release:

MINIFLARE_WORKERD_PATH=/absolute/path/to/workerd \
  bunx vitest run --max-workers=1 --no-isolate path/to/crashing.test.ts

The result was unchanged: same cloudflare-pool worker crash and segfault.

I tested with:

  • external workerd binary version: workerd 2026-04-14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions