Skip to content

Commit a1a0ba2

Browse files
ci(bun): drop the worker idle memory limit that segfaults Bun
Restarting a jest worker thread because it tripped --workerIdleMemoryLimit segfaults Bun 1.3.14 in thread teardown, a different wild address each time and workers_terminated short of workers_spawned. The runner's heaps sit at the 512MB the other runtimes use, so it fired constantly and the job died ~150s in. Reproduced locally: 30MB and 100MB crash, 4096MB and no limit pass.
1 parent fcf3f8a commit a1a0ba2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/test.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ jobs:
336336
# threads work once jest-worker loads the Bun preload per thread. Apply that
337337
# patch here (Bun only) rather than via a repo-wide postinstall. The
338338
# jest-runner patch tolerates Bun's transient memoryUsage failures.
339+
# test:base:bun also drops --workerIdleMemoryLimit: restarting a worker
340+
# thread on it segfaults Bun, and the runner's heaps sit at the 512MB the
341+
# other runtimes use, so it fired constantly.
339342
- if: matrix.runtime == 'bun'
340343
run: |
341344
git apply test/patches/jest-worker+30.4.1.patch

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"test:deno": "yarn test:base:deno --reporters default --reporters \"<rootDir>/test/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test,unittest}.js\" --testPathIgnorePatterns \"/node_modules/\" \"(ProfilingPlugin[.]unittest|SyntaxBrowserEquivalence|WebpackDevServer)\"",
7171
"test:base:deno": "deno --allow-read --allow-env --allow-sys --allow-ffi --allow-write --allow-run --allow-net --import-map=test/deno-import-map.json --v8-flags='--max-old-space-size=4096' ./node_modules/jest-cli/bin/jest.js --workerIdleMemoryLimit=512MB --logHeapUsage",
7272
"test:bun": "yarn test:base:bun --reporters default --reporters \"<rootDir>/test/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test,unittest}.js\" --testPathIgnorePatterns \"/node_modules/\" \"(ProfilingPlugin[.]unittest|SyntaxBrowserEquivalence|WebpackDevServer)\"",
73-
"test:base:bun": "bun --bun --smol --preload ./test/bun-preload.js ./node_modules/jest-cli/bin/jest.js --workerThreads --workerIdleMemoryLimit=512MB --logHeapUsage",
73+
"test:base:bun": "bun --bun --smol --preload ./test/bun-preload.js ./node_modules/jest-cli/bin/jest.js --workerThreads --logHeapUsage",
7474
"test:update-snapshots": "yarn test:base -u",
7575
"test:size": "node --max-old-space-size=4096 ./test/CodeSizeTestCases.size.js",
7676
"report:cover": "nyc report --reporter=lcov --reporter=text -t coverage",

0 commit comments

Comments
 (0)