You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug Report - Segmentation fault on MacOS with workerd and wrangler and vitest #6583
bunx vitest run --max-workers=1 --no-isolate src/control.test.ts
Crashing repro:
bun run test:sqlite
Equivalent direct command:
bunx vitest run --max-workers=1 --no-isolate src/node-sqlite.test.ts
Expected
The node:sqlite test should pass and report one successful test.
Actual
The Cloudflare pool worker exits before any test executes:
*** Received signal #11: Segmentation fault: 11
Error: [vitest-pool]: Worker cloudflare-pool emitted error.
Caused by: Error: Worker exited unexpectedly
Test Files (1)
Tests no tests
Errors 1 error
Minimal crashing test
import{describe,expect,it}from'vitest'import{DatabaseSync}from'node:sqlite'describe('node:sqlite under cloudflare vitest pool',()=>{it('opens an in-memory database',()=>{constdb=newDatabaseSync(':memory:')db.exec('CREATE TABLE t (id INTEGER PRIMARY KEY, name TEXT NOT NULL)')db.exec("INSERT INTO t (name) VALUES ('ok')")constrow=db.prepare('SELECT name FROM t').get()as{name: string}expect(row.name).toBe('ok')})})
Additional checks
This is not Bun-specific. The broader crash also reproduces when invoking
Vitest via node ./node_modules/vitest/vitest.mjs ....
Pointing Miniflare at a locally built workerd binary did not change the
behavior.
Example:
MINIFLARE_WORKERD_PATH=/absolute/path/to/workerd \
bun run test:sqlite
still crashes with the same worker-pool error and segfault.
Native trace from source-built workerd
I attached LLDB to the spawned workerd process and reproduced the crash using
a local source build. The process stopped with:
The resolve(...) frame repeats deeply, which makes this look like a module
resolution/path evaluation problem inside workerd, triggered by the node:sqlite import path under the Vitest pool.
I downgraded vitest@3.x and @cloudflare/vitest-pool-workers: ~0.12.0. now It works. But if I upgraded vitest version to ^4.1.0 and @cloudflare/vitest-pool-workers above ^0.13.x It starts failing.
Activity
paralin commentedon Apr 15, 2026
Repro repo: https://github.com/paralin/workerd-issue-6583
Commands
Passing control test:
Crashing repro:
Equivalent direct command:
Expected
The
node:sqlitetest should pass and report one successful test.Actual
The Cloudflare pool worker exits before any test executes:
Minimal crashing test
Additional checks
Vitest via
node ./node_modules/vitest/vitest.mjs ....workerdbinary did not change thebehavior.
Example:
still crashes with the same worker-pool error and segfault.
Native trace from source-built
workerdI attached LLDB to the spawned
workerdprocess and reproduced the crash usinga local source build. The process stopped with:
Top of stack:
The
resolve(...)frame repeats deeply, which makes this look like a moduleresolution/path evaluation problem inside
workerd, triggered by thenode:sqliteimport path under the Vitest pool.cenkce commentedon May 14, 2026
Hi is there a quick workaround? I am stuck with this error.
cenkce commentedon May 14, 2026
I downgraded vitest@3.x and @cloudflare/vitest-pool-workers: ~0.12.0. now It works. But if I upgraded vitest version to ^4.1.0 and @cloudflare/vitest-pool-workers above ^0.13.x It starts failing.