René's URL Explorer Experiment


Title: `worker_threads.moveMessagePortToContext` results in an abort · Issue #38499 · nodejs/node · GitHub

Open Graph Title: `worker_threads.moveMessagePortToContext` results in an abort · Issue #38499 · nodejs/node

X Title: `worker_threads.moveMessagePortToContext` results in an abort · Issue #38499 · nodejs/node

Description: Version: v17.0.0-pre Platform: Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Subsystem: worker_threads.moveMessagePortToContext What steps will reproduce the bug? Setup a node i...

Open Graph Description: Version: v17.0.0-pre Platform: Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Subsystem: worker_threads.moveMessagePortToContext What step...

X Description: Version: v17.0.0-pre Platform: Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Subsystem: worker_threads.moveMessagePortToContext What step...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`worker_threads.moveMessagePortToContext` results in an abort","articleBody":"\u003c!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or output of `\"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { \"x64\" } else { \"x86\" })\"` in PowerShell console (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n-->\r\n\r\n* **Version**: v17.0.0-pre\r\n* **Platform**: Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux\r\n* **Subsystem**: worker_threads.moveMessagePortToContext\r\n\r\n### What steps will reproduce the bug?\r\nSetup a node instance,\r\n```\r\n» node\r\n```\r\nand run the following javascript code line by line.\r\n```\r\nworker_threads = require('worker_threads');msgChannel = new worker_threads.MessageChannel();\r\nmsgChannel.port2.close();\r\nworker_threads.moveMessagePortToContext(msgChannel.port2,{});\r\n```\r\nThen an abort occurs. \r\nNoticed that paste these codes to REPL all at once seems cannot trigger this abort. Run these codes line by line pls.\r\n\u003c!--\r\nEnter details about your bug, preferably a simple code snippet that can be\r\nrun using `node` directly without installing third-party dependencies.\r\n-->\r\n\r\n### How often does it reproduce? Is there a required condition?\r\nThis problem can always be triggered following the steps above.\r\n\r\n### What is the expected behavior?\r\nIf any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.\r\n\r\n\u003c!--\r\nIf possible please provide textual output instead of screenshots.\r\n-->\r\n\r\n### What do you see instead?\r\n```\r\n» node\r\nWelcome to Node.js v17.0.0-pre.\r\nType \".help\" for more information.\r\n> worker_threads = require('worker_threads');msgChannel = new worker_threads.MessageChannel();\r\nMessageChannel {\r\n  port1: MessagePort [EventTarget] {\r\n    active: true,\r\n    refed: false,\r\n    [Symbol(kEvents)]: SafeMap(2) [Map] {\r\n      'newListener' => [Object],\r\n      'removeListener' => [Object]\r\n    },\r\n    [Symbol(events.maxEventTargetListeners)]: 10,\r\n    [Symbol(events.maxEventTargetListenersWarned)]: false,\r\n    [Symbol(kNewListener)]: [Function (anonymous)],\r\n    [Symbol(kRemoveListener)]: [Function (anonymous)],\r\n    [Symbol(nodejs.internal.kCurrentlyReceivingPorts)]: undefined\r\n  },\r\n  port2: MessagePort [EventTarget] {\r\n    active: true,\r\n    refed: false,\r\n    [Symbol(kEvents)]: SafeMap(2) [Map] {\r\n      'newListener' => [Object],\r\n      'removeListener' => [Object]\r\n    },\r\n    [Symbol(events.maxEventTargetListeners)]: 10,\r\n    [Symbol(events.maxEventTargetListenersWarned)]: false,\r\n    [Symbol(kNewListener)]: [Function (anonymous)],\r\n    [Symbol(kRemoveListener)]: [Function (anonymous)],\r\n    [Symbol(nodejs.internal.kCurrentlyReceivingPorts)]: undefined\r\n  }\r\n}\r\n> msgChannel.port2.close();\r\nundefined\r\n> worker_threads.moveMessagePortToContext(msgChannel.port2,{});\r\n/home/zys/Toolchains/node/node[59534]: ../src/node_messaging.cc:1068:static void node::worker::MessagePort::MoveToContext(const FunctionCallbackInfo\u003cv8::Value> &): Assertion `(port) != nullptr' failed.\r\n 1: 0x3623e04 node::DumpBacktrace(_IO_FILE*) [/home/zys/Toolchains/node/node]\r\n 2: 0x37bb92e node::Abort() [/home/zys/Toolchains/node/node]\r\n 3: 0x37bb3f8  [/home/zys/Toolchains/node/node]\r\n 4: 0x38c8dac node::worker::MessagePort::MoveToContext(v8::FunctionCallbackInfo\u003cv8::Value> const&) [/home/zys/Toolchains/node/node]\r\n 5: 0x3ebd0d8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/home/zys/Toolchains/node/node]\r\n 6: 0x3ebadb9  [/home/zys/Toolchains/node/node]\r\n 7: 0x3eb8d1d  [/home/zys/Toolchains/node/node]\r\n 8: 0x5a08759  [/home/zys/Toolchains/node/node]\r\n[1]    59534 abort (core dumped)  /home/zys/Toolchains/node/node\r\n```\r\n\u003c!--\r\nIf possible please provide textual output instead of screenshots.\r\n-->\r\n\r\n### Additional information\r\n\r\n\u003c!--\r\nTell us anything else you think we should know.\r\n-->\r\n","author":{"url":"https://github.com/zyscoder","@type":"Person","name":"zyscoder"},"datePublished":"2021-05-01T16:18:50Z","url":"https://github.com/nodejs/node/issues/38499"}

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:acb607a7-2ce7-fd06-2953-90da6cfb94ce
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAFC2:30551B:6E1DF6:94B68E:6AED29CD
html-safe-nonce2a6cd51199c855368c312cf57026b8288fe71926a87075f993ce3a66e4ee5695
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkMyOjMwNTUxQjo2RTFERjY6OTRCNjhFOjZBRUQyOUNEIiwidmlzaXRvcl9pZCI6IjY3NTA4NjQzMTcxMjc4Mjc5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac16b29281d0736ca453963b4369bb12a4c24b6804b10b6b8e761c9c3c6b2002a9
hovercard-subject-tagissue:873713087
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/38499/issue_layout
twitter:imagehttps://opengraph.githubassets.com/37d7f4a3b5383758d8e345720cfdac75d5c29c584ad72c54c7e95fa0db2fbd74/nodejs/node/issues/38499
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/37d7f4a3b5383758d8e345720cfdac75d5c29c584ad72c54c7e95fa0db2fbd74/nodejs/node/issues/38499
og:image:altVersion: v17.0.0-pre Platform: Linux 5.8.0-38-generic #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Subsystem: worker_threads.moveMessagePortToContext What step...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezyscoder
hostnamegithub.com
expected-hostnamegithub.com
None9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2
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
release98b41fa4b5635ceb45a4c54320fced73817ff290
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/38499#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F38499
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%2F38499
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/38499
Reloadhttps://github.com/nodejs/node/issues/38499
Reloadhttps://github.com/nodejs/node/issues/38499
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)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/38499
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/38499
worker_threads.moveMessagePortToContext results in an aborthttps://github.com/nodejs/node/issues/38499#top
c++Issues and PRs that require attention from people who are familiar with C++.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22c%2B%2B%22
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
good first issueIssues that are suitable for first-time contributors.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
workerIssues and PRs related to the worker_threads module and Worker API.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22worker%22
https://github.com/zyscoder
zyscoderhttps://github.com/zyscoder
on May 1, 2021https://github.com/nodejs/node/issues/38499#issue-873713087
The binary and long term compatibility with node #43https://github.com/nodejs/node/issues/43
addaleaxhttps://github.com/addaleax
workerIssues and PRs related to the worker_threads module and Worker API.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22worker%22
c++Issues and PRs that require attention from people who are familiar with C++.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22c%2B%2B%22
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
good first issueIssues that are suitable for first-time contributors.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on May 1, 2021https://github.com/nodejs/node/issues/38499#event-4673776014
https://github.com/addaleax
addaleaxhttps://github.com/addaleax
on May 1, 2021https://github.com/nodejs/node/issues/38499#issuecomment-830657742
node/src/node_messaging.cchttps://github.com/nodejs/node/blob/c975dff3c0f0f1ecb1574f3b10dd1d135a7704db/src/node_messaging.cc#L1068
c975dffhttps://github.com/nodejs/node/commit/c975dff3c0f0f1ecb1574f3b10dd1d135a7704db
jasnellhttps://github.com/jasnell
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
b373a2chttps://github.com/nodejs/node/commit/b373a2c4babc213b79b66f6ba36e8a951cae5ba8
on May 6, 2021https://github.com/nodejs/node/issues/38499#event-4696688765
jasnellhttps://github.com/jasnell
on May 6, 2021https://github.com/nodejs/node/issues/38499#event-4696688799
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/75073aba9d7a9bc90bd7c70369d66667565a7f4c
75073abhttps://github.com/nodejs/node/commit/75073aba9d7a9bc90bd7c70369d66667565a7f4c
targoshttps://github.com/targos
on May 17, 2021https://github.com/nodejs/node/issues/38499#event-4752729668
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/nodejs/node/commit/070ee4bb9454874f450cddf9b66e4df529736f57
070ee4bhttps://github.com/nodejs/node/commit/070ee4bb9454874f450cddf9b66e4df529736f57
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/bfec80fd6611ffda329991b3f5921f2e4563b2bd
bfec80fhttps://github.com/nodejs/node/commit/bfec80fd6611ffda329991b3f5921f2e4563b2bd
targoshttps://github.com/targos
on May 30, 2021https://github.com/nodejs/node/issues/38499#event-4816940727
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/nodejs/node/commit/a2c6b5f18ae64090dd6262aaa53f8a8b5b4a83ca
a2c6b5fhttps://github.com/nodejs/node/commit/a2c6b5f18ae64090dd6262aaa53f8a8b5b4a83ca
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/016e46a5921a626d8b5163b529d098d9fe63f9b7
016e46ahttps://github.com/nodejs/node/commit/016e46a5921a626d8b5163b529d098d9fe63f9b7
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/nodejs/node/commit/c778c71ec66edbc8d43229531e83b71c4faa4564
c778c71https://github.com/nodejs/node/commit/c778c71ec66edbc8d43229531e83b71c4faa4564
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/3ceb1334f3f471b24a4f5155415f07e2d2a63c23
3ceb133https://github.com/nodejs/node/commit/3ceb1334f3f471b24a4f5155415f07e2d2a63c23
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/nodejs/node/commit/d6245664a16b9a1bdb378ab0c917e3960ea2b08f
d624566https://github.com/nodejs/node/commit/d6245664a16b9a1bdb378ab0c917e3960ea2b08f
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/0de62701c4102cf410d04d822ed526179a2c2a6f
0de6270https://github.com/nodejs/node/commit/0de62701c4102cf410d04d822ed526179a2c2a6f
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/nodejs/node/commit/2c66305ac4ba6b0c75d52f8c0c04f6ac8328fe76
2c66305https://github.com/nodejs/node/commit/2c66305ac4ba6b0c75d52f8c0c04f6ac8328fe76
src: make workers messaging more resilienthttps://github.com/nodejs/node/commit/bc2111c7e62710810805e0211e0411f9d1884fa0
bc2111chttps://github.com/nodejs/node/commit/bc2111c7e62710810805e0211e0411f9d1884fa0
MayaLekovahttps://github.com/MayaLekova
on May 22, 2026https://github.com/nodejs/node/issues/38499#event-25851968070
Revert "worker: remove `ERR_CLOSED_MESSAGE_PORT`"https://github.com/MayaLekova/node/commit/b373a2c4babc213b79b66f6ba36e8a951cae5ba8
b373a2chttps://github.com/MayaLekova/node/commit/b373a2c4babc213b79b66f6ba36e8a951cae5ba8
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/38499
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/38499
c++Issues and PRs that require attention from people who are familiar with C++.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22c%2B%2B%22
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
good first issueIssues that are suitable for first-time contributors.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
workerIssues and PRs related to the worker_threads module and Worker API.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22worker%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.