René's URL Explorer Experiment


Title: Async hook stack corruption with --unhandled-rejections=strict · Issue #60034 · nodejs/node · GitHub

Open Graph Title: Async hook stack corruption with --unhandled-rejections=strict · Issue #60034 · nodejs/node

X Title: Async hook stack corruption with --unhandled-rejections=strict · Issue #60034 · nodejs/node

Description: Version v24.3.0 (Other versions are also affected. See below.) Platform Darwin hood.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64 Also reported on Windows 11. S...

Open Graph Description: Version v24.3.0 (Other versions are also affected. See below.) Platform Darwin hood.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6...

X Description: Version v24.3.0 (Other versions are also affected. See below.) Platform Darwin hood.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Async hook stack corruption with --unhandled-rejections=strict","articleBody":"### Version\n\nv24.3.0 (Other versions are also affected. See below.)\n\n### Platform\n\n```text\nDarwin hood.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64\n\nAlso reported on Windows 11.\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nFirst, install jasmine@5.11.0. Then create runner.js as follows:\n\n```\nconst Jasmine = require(\"jasmine\");\nconst fs = require(\"fs\");\n\n(async () =\u003e {\n  const runner = new Jasmine();\n\n  runner.addSpecFile(\"./crash.spec.js\");\n\n  runner.addReporter({\n    suiteDone: async () =\u003e {\n      console.log(\"\\nAbout to crash!\");\n      await fs.promises.readFile(\"./package.json\");\n    },\n  });\n\n  await runner.execute();\n})();\n```\n\nAnd create crash.spec.js as follows:\n\n```\ndescribe('a suite that crashes NodeJS', () =\u003e {\n  it('throws twice', async () =\u003e {\n        await new Promise((resolve, reject) =\u003e {\n            setTimeout(() =\u003e {\n                reject(new Error('foo'));\n            }, 0);\n        }).foo();\n    });\n});\n```\n\nFinally, run `node --unhandled-rejections=strict runner.js`.\n\nI tried and failed to reduce this down to a simple code snippet with no dependencies. The user who reported it to me [stated that it took them two days to reproduce it to this point](https://github.com/jasmine/jasmine/issues/2076). \n\n### How often does it reproduce? Is there a required condition?\n\nReproduces 100% of the time with (at least) 20.19.0, 22.14.0, 24.0.0, and 24.3.0. It's also been reported on \u003e= 22.3.0. Does not reproduce with 20.0.0 or 22.0.0.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nNode should not crash. The script should run to completion and produce output like the following:\n\n```\nRandomized with seed 36538\nStarted\nF\nAbout to crash!\n\n\nFailures:\n1) a suite that crashes NodeJS throws twice\n  Message:\n    TypeError: (intermediate value).foo is not a function\n  Stack:\n        at UserContext.\u003canonymous\u003e (/Users/steve/Downloads/no-zip/crash.spec.js:7:12)\n        at \u003cJasmine\u003e\n\nSuite error: top suite\n  Message:\n    Uncaught exception: Error: foo\n  Stack:\n        at Timeout._onTimeout (/Users/steve/Downloads/no-zip/crash.spec.js:5:24)\n        at listOnTimeout (node:internal/timers:573:17)\n        at process.processTimers (node:internal/timers:514:7)\n  Message:\n    Unhandled promise rejection: Error: foo\n  Stack:\n        at Timeout._onTimeout (/Users/steve/Downloads/no-zip/crash.spec.js:5:24)\n        at listOnTimeout (node:internal/timers:573:17)\n        at process.processTimers (node:internal/timers:514:7)\n\n1 spec, 3 failures\nFinished in 0.007 seconds\nRandomized with seed 36538 (jasmine --random=true --seed=36538)\n```\n\n### What do you see instead?\n\n```\nRandomized with seed 66384\nStarted\nF\nAbout to crash!\n\n  #  node[9176]: void node::AsyncHooks::push_async_context(double, double, Local\u003cObject\u003e) at ../src/env.cc:130\n  #  Assertion failed: (trigger_async_id) \u003e= (-1)\n\n----- Native stack trace -----\n\n 1: 0x10019f040 node::Assert(node::AssertionInfo const\u0026) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 2: 0x102236be0 node::AsyncHooks::push_async_context(double, double, v8::Local\u003cv8::Object\u003e) (.cold.2) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 3: 0x1000dc85c node::AsyncHooks::grow_async_ids_stack() [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 4: 0x100098cb4 node::InternalCallbackScope::InternalCallbackScope(node::Environment*, v8::Local\u003cv8::Object\u003e, node::async_context const\u0026, int, v8::Local\u003cv8::Value\u003e) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 5: 0x100098da0 node::InternalCallbackScope::InternalCallbackScope(node::AsyncWrap*, int) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 6: 0x100196cd4 node::fs::FSReqPromise\u003cnode::AliasedBufferBase\u003cdouble, v8::Float64Array\u003e\u003e::Resolve(v8::Local\u003cv8::Value\u003e) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 7: 0x1001a5850 node::fs::AfterStat(uv_fs_s*) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 8: 0x1001973a8 node::MakeLibuvRequestCallback\u003cuv_fs_s, void (*)(uv_fs_s*)\u003e::Wrapper(uv_fs_s*) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n 9: 0x100fd12c4 uv__work_done [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n10: 0x100fd4ff4 uv__async_io [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n11: 0x100fe938c uv__io_poll [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n12: 0x100fd555c uv_run [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n13: 0x100099a98 node::SpinEventLoopInternal(node::Environment*) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n14: 0x1001eb704 node::NodeMainInstance::Run() [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n15: 0x100159474 node::Start(int, char**) [/Users/steve/.nvm/versions/node/v24.3.0/bin/node]\n16: 0x19fc1ab98 start [/usr/lib/dyld]\nzsh: abort      node --unhandled-rejections=strict runner.js\n```\n\n### Additional information\n\nIf I replace ` await fs.promises.readFile(\"./package.json\");` with `await new Promise(resolve =\u003e setTimeout(resolve));` in runner.js, I sometimes get an early exit instead of a crash. It's easiest to see that if you patch `node_modules/jasmine/lib/jasmine.js` as follows:\n\n```diff\n@@ -239,7 +239,7 @@\n       this.addMatchingSpecFiles(files);\n     }\n \n-    const prematureExitHandler = new ExitHandler(() =\u003e this.exit(4));\n+    const prematureExitHandler = new ExitHandler(() =\u003e console.error('premature exit!'));\n     prematureExitHandler.install();\n     let overallResult;\n```","author":{"url":"https://github.com/sgravrock","@type":"Person","name":"sgravrock"},"datePublished":"2025-09-27T18:18:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/60034/node/issues/60034"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:163568d7-5857-aa67-a704-383c8156f6c9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9EE:9B927:D9EA49:13BDADC:6A4CC54C
html-safe-nonceac3efa3e03093b722fee5e9ae16b6a1858bdca9a1d76b864bd3e774ee484dcc4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUVFOjlCOTI3OkQ5RUE0OToxM0JEQURDOjZBNENDNTRDIiwidmlzaXRvcl9pZCI6IjUwMzM3NzE1Nzc1ODMxMjU4MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac49ae7e93c7ddea67e5c1468be391b6243dbf1a3673e9118cc16851709820c91a
hovercard-subject-tagissue:3460592457
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/60034/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d4e11b5b0d70c4233740ba03844bb2e490627c04a3d4197ffbf8d31d3ddd335/nodejs/node/issues/60034
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d4e11b5b0d70c4233740ba03844bb2e490627c04a3d4197ffbf8d31d3ddd335/nodejs/node/issues/60034
og:image:altVersion v24.3.0 (Other versions are also affected. See below.) Platform Darwin hood.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesgravrock
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
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
released0da0eb92994395299ed4450bf67b0373005be36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/issues/60034#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F60034
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F60034
Sign up https://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/60034
Reloadhttps://github.com/nodejs/node/issues/60034
Reloadhttps://github.com/nodejs/node/issues/60034
Please reload this pagehttps://github.com/nodejs/node/issues/60034
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/issues/60034
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 963 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
#60103https://github.com/nodejs/node/pull/60103
Async hook stack corruption with --unhandled-rejections=stricthttps://github.com/nodejs/node/issues/60034#top
#60103https://github.com/nodejs/node/pull/60103
async_hooksIssues and PRs related to the async hooks subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22async_hooks%22
https://github.com/sgravrock
sgravrockhttps://github.com/sgravrock
on Sep 27, 2025https://github.com/nodejs/node/issues/60034#issue-3460592457
stated that it took them two days to reproduce it to this pointhttps://github.com/jasmine/jasmine/issues/2076
async_hooksIssues and PRs related to the async hooks subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22async_hooks%22
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.