Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add took recursive isolate lock warning to workerd output exceptions #4511

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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