René's URL Explorer Experiment


Title: async_hooks: AsyncResource.runInAsyncScope causes Node process to crash · Issue #31783 · nodejs/node · GitHub

Open Graph Title: async_hooks: AsyncResource.runInAsyncScope causes Node process to crash · Issue #31783 · nodejs/node

X Title: async_hooks: AsyncResource.runInAsyncScope causes Node process to crash · Issue #31783 · nodejs/node

Description: Version: v12.16.0 Platform: Darwin xxxxx 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64 Subsystem: async_hooks What steps will reproduce the bug? There are 2 flavours to the...

Open Graph Description: Version: v12.16.0 Platform: Darwin xxxxx 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64 Subsystem: async_hooks What steps will reprod...

X Description: Version: v12.16.0 Platform: Darwin xxxxx 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64 Subsystem: async_hooks What steps will reprod...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"async_hooks: AsyncResource.runInAsyncScope causes Node process to crash","articleBody":"* **Version**: v12.16.0\r\n* **Platform**: Darwin xxxxx 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec  1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64\r\n* **Subsystem**: async_hooks\r\n\r\n### What steps will reproduce the bug?\r\nThere are 2 flavours to the crash. Run the following simplified code to reproduce.\r\n\r\n**Version 1**:\r\n```javascript\r\n  const {AsyncResource} = require('async_hooks');\r\n  new AsyncResource('Foo').runInAsyncScope(() =\u003e {throw new Error()});\r\n```\r\n\r\n**Version 2**:\r\n```javascript\r\n  const {AsyncResource} = require('async_hooks');\r\n  const run = () =\u003e new AsyncResource('Foo').runInAsyncScope(() =\u003e {throw new Error()});\r\n  Promise.resolve().then(run).catch(console.log)\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\nReproduces constantly\r\n\r\n### What is the expected behavior?\r\nFor Node not to crash\r\n\r\n### What do you see instead?\r\nNode process crashes with the following output.\r\n\r\n**Version 1**:\r\n```\r\nWelcome to Node.js v12.16.0.\r\nType \".help\" for more information.\r\n\u003e const {AsyncResource} = require('async_hooks');\r\nundefined\r\n\u003e new AsyncResource('Foo').runInAsyncScope(() =\u003e {throw new Error()});\r\nUncaught Error\r\n    at repl:1:55\r\n    at AsyncResource.runInAsyncScope (async_hooks.js:176:7)\r\n\u003e Error: async hook stack has become corrupted (actual: 28, expected: 5)\r\n 1: 0x10000b7f1 node::AsyncHooks::pop_async_id(double) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 2: 0x10000189a node::InternalCallbackScope::Close() [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 3: 0x100001b2f node::InternalMakeCallback(node::Environment*, v8::Local\u003cv8::Object\u003e, v8::Local\u003cv8::Function\u003e, int, v8::Local\u003cv8::Value\u003e*, node::async_context) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 4: 0x10001475c node::AsyncWrap::MakeCallback(v8::Local\u003cv8::Function\u003e, int, v8::Local\u003cv8::Value\u003e*) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 5: 0x1001085f2 node::StreamBase::CallJSOnreadMethod(long, v8::Local\u003cv8::ArrayBuffer\u003e, unsigned long, node::StreamBase::StreamBaseJSChecks) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 6: 0x100109f31 node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const\u0026) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 7: 0x10010e263 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 8: 0x1008c3d8a uv__stream_io [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 9: 0x1008cba7f uv__io_poll [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n10: 0x1008bb036 uv_run [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n11: 0x1000b6836 node::NodeMainInstance::Run() [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n12: 0x10005dd94 node::Start(int, char**) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n13: 0x7fff67e8f3d5 start [/usr/lib/system/libdyld.dylib]\r\n```\r\n\r\n**Version 2**:\r\n```\r\nWelcome to Node.js v12.16.0.\r\nType \".help\" for more information.\r\n\u003e   const {AsyncResource} = require('async_hooks');\r\nundefined\r\n\u003e   const run = () =\u003e new AsyncResource('Foo').runInAsyncScope(() =\u003e {throw new Error()});\r\nundefined\r\n\u003e   Promise.resolve().then(run).catch(console.log)\r\nPromise { \u003cpending\u003e }\r\n\u003e Error\r\n    at repl:1:75\r\n    at AsyncResource.runInAsyncScope (async_hooks.js:176:7)\r\n    at run (repl:1:46)\r\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\r\nnode[78213]: ../src/api/callback.cc:117:void node::InternalCallbackScope::Close(): Assertion `(env_-\u003eexecution_async_id()) == (0)' failed.\r\n 1: 0x100080dde node::Abort() [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 2: 0x100080b86 node::AppendExceptionLine(node::Environment*, v8::Local\u003cv8::Value\u003e, v8::Local\u003cv8::Message\u003e, node::ErrorHandlingMode) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 3: 0x10000194c node::InternalCallbackScope::Close() [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 4: 0x100001b2f node::InternalMakeCallback(node::Environment*, v8::Local\u003cv8::Object\u003e, v8::Local\u003cv8::Function\u003e, int, v8::Local\u003cv8::Value\u003e*, node::async_context) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 5: 0x100001d0f node::MakeCallback(v8::Isolate*, v8::Local\u003cv8::Object\u003e, v8::Local\u003cv8::Function\u003e, int, v8::Local\u003cv8::Value\u003e*, node::async_context) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 6: 0x10003a362 node::Environment::CheckImmediate(uv_check_s*) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 7: 0x1008c0d46 uv__run_check [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 8: 0x1008bb03e uv_run [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n 9: 0x1000b6836 node::NodeMainInstance::Run() [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n10: 0x10005dd94 node::Start(int, char**) [/Users/user/.nvm/versions/node/v12.16.0/bin/node]\r\n11: 0x7fff67e8f3d5 start [/usr/lib/system/libdyld.dylib]\r\n[1]    78213 abort      node\r\n```\r\n\r\n### Additional information\r\nSame code works fine with Node 12.15.0.\r\n","author":{"url":"https://github.com/alexandervain","@type":"Person","name":"alexandervain"},"datePublished":"2020-02-14T00:30:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/31783/node/issues/31783"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9710a8d7-b069-6bca-686e-4872c3b0c90c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC0BA:10B1AF:6AB276:8ECB96:6A505010
html-safe-nonce0a9e0b24058c0609f9c6f85d69885cd69bf3e372ef8dc121c17e1a4f28a2baf0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEJBOjEwQjFBRjo2QUIyNzY6OEVDQjk2OjZBNTA1MDEwIiwidmlzaXRvcl9pZCI6IjE3MDUwMTMzNzAxNzA2NTg4MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3dc8861505bc55e098b833192086f508335feb440e21f5959ce2f166fd533193
hovercard-subject-tagissue:565030622
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/31783/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b4bb923734a1d921e33d6a8ef2631fd1f7d04f373e753aa9d79c5640b8cdc6b6/nodejs/node/issues/31783
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b4bb923734a1d921e33d6a8ef2631fd1f7d04f373e753aa9d79c5640b8cdc6b6/nodejs/node/issues/31783
og:image:altVersion: v12.16.0 Platform: Darwin xxxxx 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64 Subsystem: async_hooks What steps will reprod...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealexandervain
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
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
release5741a45fe07e5f377d0d4c524a92e3056acc51bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/issues/31783#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F31783
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2F31783
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/31783
Reloadhttps://github.com/nodejs/node/issues/31783
Reloadhttps://github.com/nodejs/node/issues/31783
Please reload this pagehttps://github.com/nodejs/node/issues/31783
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/issues/31783
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.3k https://github.com/nodejs/node/issues
Pull requests 978 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
async_hooks: AsyncResource.runInAsyncScope causes Node process to crashhttps://github.com/nodejs/node/issues/31783#top
https://github.com/alexandervain
alexandervainhttps://github.com/alexandervain
on Feb 14, 2020https://github.com/nodejs/node/issues/31783#issue-565030622
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.