From 66394681d99b8afa7c56274388eb7085afb41916 Mon Sep 17 00:00:00 2001 From: huw Date: Thu, 14 Dec 2023 22:33:37 +1100 Subject: [PATCH] Add `took recursive isolate lock` warning to workerd output exceptions (#4511) * Add `took recursive isolate lock` warning to workerd output exceptions * Add changeset * Prettify changed file --- .changeset/hot-mirrors-shake.md | 5 +++++ packages/wrangler/src/dev/miniflare.ts | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/hot-mirrors-shake.md diff --git a/.changeset/hot-mirrors-shake.md b/.changeset/hot-mirrors-shake.md new file mode 100644 index 000000000000..636fe4290ff5 --- /dev/null +++ b/.changeset/hot-mirrors-shake.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +Add 'took recursive isolate lock' warning to workerd output exceptions diff --git a/packages/wrangler/src/dev/miniflare.ts b/packages/wrangler/src/dev/miniflare.ts index 9e2d512bedd0..96ea16562ba2 100644 --- a/packages/wrangler/src/dev/miniflare.ts +++ b/packages/wrangler/src/dev/miniflare.ts @@ -415,12 +415,19 @@ export function handleRuntimeStdio(stdout: Readable, stderr: Readable) { const containsLlvmSymbolizerWarning = chunk.includes( "Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set" ); + const containsRecursiveIsolateLockWarning = chunk.includes( + "took recursive isolate lock" + ); // Matches stack traces from workerd // - on unix: groups of 9 hex digits separated by spaces // - on windows: groups of 12 hex digits, or a single digit 0, separated by spaces const containsHexStack = /stack:( (0|[a-f\d]{4,})){3,}/.test(chunk); - return containsLlvmSymbolizerWarning || containsHexStack; + return ( + containsLlvmSymbolizerWarning || + containsRecursiveIsolateLockWarning || + containsHexStack + ); }, // Is this chunk an Address In Use error? isAddressInUse(chunk: string) {