Skip to content

Commit

Permalink
Add took recursive isolate lock warning to workerd output exceptions (
Browse files Browse the repository at this point in the history
#4511)

* Add `took recursive isolate lock` warning to workerd output exceptions

* Add changeset

* Prettify changed file
  • Loading branch information
huw committed Dec 14, 2023
1 parent 850c4d6 commit 6639468
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hot-mirrors-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Add 'took recursive isolate lock' warning to workerd output exceptions
9 changes: 8 additions & 1 deletion packages/wrangler/src/dev/miniflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6639468

Please sign in to comment.