René's URL Explorer Experiment


Title: Infinite recursion between TriggerUncaughtException and InspectorConsoleCall when console.error throws · Issue #64326 · nodejs/node · GitHub

Open Graph Title: Infinite recursion between TriggerUncaughtException and InspectorConsoleCall when console.error throws · Issue #64326 · nodejs/node

X Title: Infinite recursion between TriggerUncaughtException and InspectorConsoleCall when console.error throws · Issue #64326 · nodejs/node

Description: Version v26.3.0 (also hit this on v22 macOS 15) Platform Darwin TS-Temuulen-2.local 25.5.0 Darwin Kernel Version 25.5.0: Fri Jun 5 02:15:17 PDT 2026; root:xnu-11471.122.99.501.2~1/RELEASE_ARM64_T6000 arm64 arm Subsystem V8 / Inspector / ...

Open Graph Description: Version v26.3.0 (also hit this on v22 macOS 15) Platform Darwin TS-Temuulen-2.local 25.5.0 Darwin Kernel Version 25.5.0: Fri Jun 5 02:15:17 PDT 2026; root:xnu-11471.122.99.501.2~1/RELEASE_ARM64_T60...

X Description: Version v26.3.0 (also hit this on v22 macOS 15) Platform Darwin TS-Temuulen-2.local 25.5.0 Darwin Kernel Version 25.5.0: Fri Jun 5 02:15:17 PDT 2026; root:xnu-11471.122.99.501.2~1/RELEASE_ARM64_T60...

Opengraph URL: https://github.com/nodejs/node/issues/64326

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Infinite recursion between TriggerUncaughtException and InspectorConsoleCall when console.error throws","articleBody":"### Version\n\nv26.3.0 (also hit this on v22 macOS 15)\n\n### Platform\n\nDarwin TS-Temuulen-2.local 25.5.0 Darwin Kernel Version 25.5.0: Fri Jun  5 02:15:17 PDT 2026; root:xnu-11471.122.99.501.2~1/RELEASE_ARM64_T6000 arm64 arm\n\n### Subsystem\n\nV8 / Inspector / Process\n\n### What steps will reproduce the bug?\n\nHard to nail down to a single script — it's non-deterministic. But here's what triggers it:\n\nA native addon (in my case Turbopack via napi-rs ThreadSafeFunction) calls a JS callback that has a pending exception. Instead of handling the error normally, the process locks up.\n\nI caught it with `sample` while it was spinning at 94% CPU. Here's the stack:\n\n```\nuv_run → uv__io_poll → uv__async_io\n  → ThreadSafeFunction::AsyncCb\n    → CallbackScope::~CallbackScope\n      → InternalCallbackScope::Close\n        → v8::Function::Call\n          → Execution::Call → Invoke\n            → Isolate::ReportPendingMessages\n              → MessageHandler::ReportMessage\n                → TriggerUncaughtException\n                  → v8::Function::Call\n                    → Execution::Call → Invoke\n                      → Builtins_JSEntry\n                        → InspectorConsoleCall\n                          → v8::Function::Call  (← re-enters TriggerUncaughtException)\n```\n\nThe pattern is clear: `TriggerUncaughtException` reports via the inspector console, `InspectorConsoleCall` itself throws, and that throw goes right back into `TriggerUncaughtException`. Forever.\n\nYou'd probably need a napi-rs addon with a ThreadSafeFunction that calls into JS and throws, with the inspector/profiler attached during the call. Something like:\n\n```js\nconst addon = require('bindings')('addon.node')\n// addon.startWorker(callbackThatThrows) while inspector is connected\n```\n\n### How often does it reproduce? Is there a required condition?\n\nNon-deterministic. Roughly 1 in 3 dev server restarts for me. Required conditions:\n\n- A native addon callback that throws\n- Inspector protocol active (dev tools or Node inspector)\n- Inspector connection has to be in a state where `InspectorConsoleCall` fails\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`TriggerUncaughtException` should not be re-entrant through the inspector. If the inspector console itself throws during error reporting, Node should detect the re-entrance and either:\n\n- Fall back to writing to stderr directly (bypasses inspector entirely)\n- Or crash with `process.abort()` so at least it's obvious\n\nA `console.error` inside error handling should never be able to loop back into `TriggerUncaughtException`. That path should be guarded.\n\n### What do you see instead?\n\nThe process pegs a CPU core at 94-100%. RSS starts around 150MB and grows to 2.2GB+ — keeps allocating because V8's exception machinery keeps running. The machine starts swapping. `kill` (SIGTERM) does nothing, have to `kill -9` it. Meanwhile the entire system slows to a crawl from memory pressure.\n\n### Additional information\n\n- The workaround is replacing `console.error` with `process.stderr.write` in error handlers — it bypasses the inspector protocol breakage entirely\n- Same loop pattern reported in cdp-tools-mcp #74 (v0.4.3 patch)\n- This isn't specific to Next.js or Turbopack — any native addon with async callbacks can trigger it under the right conditions\n","author":{"url":"https://github.com/themuuln","@type":"Person","name":"themuuln"},"datePublished":"2026-07-06T15:30:22Z","url":"https://github.com/nodejs/node/issues/64326"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:75b32e7c-271d-8990-fb5a-f31ab4108699
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC46:143C91:793A27:A1657E:6AED2441
html-safe-noncef37c1c808474ef2d77b10742ea44b2f0e5e90d8355d72818e40733486e3260e2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzQ2OjE0M0M5MTo3OTNBMjc6QTE2NTdFOjZBRUQyNDQxIiwidmlzaXRvcl9pZCI6IjM2NjUzNDI2NDE0MzY2OTc2NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf1ede18c8b20bec8bff1c912749d1f0ba1bf8d517743e07803346937355e2f00
hovercard-subject-tagissue:4820628186
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64326/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0d885721c4a6f97b14c0df91c644ce5203685e1be343eefb5a3ccbfb3d3ae492/nodejs/node/issues/64326
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0d885721c4a6f97b14c0df91c644ce5203685e1be343eefb5a3ccbfb3d3ae492/nodejs/node/issues/64326
og:image:altVersion v26.3.0 (also hit this on v22 macOS 15) Platform Darwin TS-Temuulen-2.local 25.5.0 Darwin Kernel Version 25.5.0: Fri Jun 5 02:15:17 PDT 2026; root:xnu-11471.122.99.501.2~1/RELEASE_ARM64_T60...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamethemuuln
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/64326#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64326
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64326
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/64326
Reloadhttps://github.com/nodejs/node/issues/64326
Reloadhttps://github.com/nodejs/node/issues/64326
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues657 (657)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64326
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64326
Infinite recursion between TriggerUncaughtException and InspectorConsoleCall when console.error throwshttps://github.com/nodejs/node/issues/64326#top
https://github.com/themuuln
themuulnhttps://github.com/themuuln
on Jul 6, 2026https://github.com/nodejs/node/issues/64326#issue-4820628186
may be it's good idea go tell something about this fork? #74https://github.com/nodejs/node/issues/74
https://github.com/Mahnoor-Zaffar
Mahnoor-Zaffarhttps://github.com/Mahnoor-Zaffar
on Jul 6, 2026https://github.com/nodejs/node/issues/64326#issuecomment-4897858708
https://github.com/joharikapil31-ops
joharikapil31-opshttps://github.com/joharikapil31-ops
on Jul 6, 2026https://github.com/nodejs/node/issues/64326#issuecomment-4898410398
https://github.com/themuuln
themuulnhttps://github.com/themuuln
on Jul 7, 2026https://github.com/nodejs/node/issues/64326#issuecomment-4901152553
#64327https://github.com/nodejs/node/pull/64327
themuulnhttps://github.com/themuuln
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 7, 2026https://github.com/nodejs/node/issues/64326#event-27649844216
themuulnhttps://github.com/themuuln
on Jul 15, 2026https://github.com/nodejs/node/issues/64326#event-28025718418
src/node_errors: add re-entrancy guard to prevent infinite recursion …https://github.com/themuuln/node/commit/f2c1ab5679ee5e2d0182f5f3dc96911ea9ee0c72
f2c1ab5https://github.com/themuuln/node/commit/f2c1ab5679ee5e2d0182f5f3dc96911ea9ee0c72
themuulnhttps://github.com/themuuln
on Jul 30, 2026https://github.com/nodejs/node/issues/64326#event-28723526669
trivikrhttps://github.com/trivikr
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
460b202https://github.com/nodejs/node/commit/460b202859534f6d75b5960709f6dc8db4a0b2a3
on Aug 31, 2026https://github.com/nodejs/node/issues/64326#event-30261684432
trivikrhttps://github.com/trivikr
on Aug 31, 2026https://github.com/nodejs/node/issues/64326#event-30261697722
src: add re-entrancy guard to TriggerUncaughtExceptionhttps://github.com/trivikr/node/commit/460b202859534f6d75b5960709f6dc8db4a0b2a3
460b202https://github.com/trivikr/node/commit/460b202859534f6d75b5960709f6dc8db4a0b2a3
aduh95https://github.com/aduh95
on Sep 3, 2026https://github.com/nodejs/node/issues/64326#event-30485766813
src: add re-entrancy guard to TriggerUncaughtExceptionhttps://github.com/nodejs/node/commit/75e93e99805530ae4cc118e63688ac8845be8ff0
75e93e9https://github.com/nodejs/node/commit/75e93e99805530ae4cc118e63688ac8845be8ff0
aduh95https://github.com/aduh95
on Sep 15, 2026https://github.com/nodejs/node/issues/64326#event-31161515659
src: add re-entrancy guard to TriggerUncaughtExceptionhttps://github.com/nodejs/node/commit/2fd50ae9156fc8e621ad4b68c5fc44f76f4deae2
2fd50aehttps://github.com/nodejs/node/commit/2fd50ae9156fc8e621ad4b68c5fc44f76f4deae2
src: add re-entrancy guard to TriggerUncaughtExceptionhttps://github.com/nodejs/node/commit/b8cf1beea9d0ec95dbcb2dbaa9196da51a15fef2
b8cf1behttps://github.com/nodejs/node/commit/b8cf1beea9d0ec95dbcb2dbaa9196da51a15fef2
src: add re-entrancy guard to TriggerUncaughtExceptionhttps://github.com/nodejs/node/commit/33b8d6e10f89576c8b6faad3769fb6f52a6a25b6
33b8d6ehttps://github.com/nodejs/node/commit/33b8d6e10f89576c8b6faad3769fb6f52a6a25b6
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/64326
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64326
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.