René's URL Explorer Experiment


Title: Missing 'aborted' on IncomingMessage (v16 regression) · Issue #40775 · nodejs/node · GitHub

Open Graph Title: Missing 'aborted' on IncomingMessage (v16 regression) · Issue #40775 · nodejs/node

X Title: Missing 'aborted' on IncomingMessage (v16 regression) · Issue #40775 · nodejs/node

Description: Version v16.13.0 / v17.1.0 Platform Darwin Silmaril.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64 Subsystem http What steps will reproduce the bug? 'use strict'; c...

Open Graph Description: Version v16.13.0 / v17.1.0 Platform Darwin Silmaril.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64 Subsystem http What steps...

X Description: Version v16.13.0 / v17.1.0 Platform Darwin Silmaril.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64 Subsystem http What steps...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing 'aborted' on IncomingMessage (v16 regression)","articleBody":"### Version\r\n\r\nv16.13.0 / v17.1.0\r\n\r\n### Platform\r\n\r\nDarwin Silmaril.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64\r\n\r\n### Subsystem\r\n\r\nhttp\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```js\r\n'use strict';\r\n\r\nconst http = require('http');\r\n\r\nlet clientReq;\r\nconst server = http.createServer(function (req, res) {\r\n    req.on('aborted', function () {\r\n        console.log('ABORTED');\r\n        server.close();\r\n    });\r\n\r\n    req.on('end', () => {\r\n        console.log('DESTROY');\r\n        clientReq.destroy();\r\n    });\r\n\r\n    req.resume(); // read all client data\r\n});\r\n\r\nserver.listen(0, () => {\r\n    clientReq = http.request({\r\n        method: 'POST',\r\n        port: server.address().port,\r\n        headers: { connection: 'keep-alive' }\r\n    }, (res) => {\r\n    });\r\n\r\n    clientReq.on('error', (err) => console.log('CLIENT ERROR', err));\r\n\r\n    clientReq.end();\r\n});\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\n100%\r\n\r\n### What is the expected behavior?\r\n\r\nScript exits and logs the following (node v14.18.1):\r\n\r\n```\r\nDESTROY\r\nCLIENT ERROR Error: socket hang up\r\n    at connResetException (internal/errors.js:639:14)\r\n    at Socket.socketCloseListener (_http_client.js:449:25)\r\n    at Socket.emit (events.js:412:35)\r\n    at TCP.\u003canonymous> (net.js:686:12) {\r\n  code: 'ECONNRESET'\r\n}\r\nABORTED\r\n```\r\n\r\n### What do you see instead?\r\n\r\nScript *never* exits and misses the last `ABORTED` line from the log:\r\n\r\n```\r\nDESTROY\r\nCLIENT ERROR Error: socket hang up\r\n    at connResetException (node:internal/errors:691:14)\r\n    at Socket.socketCloseListener (node:_http_client:420:25)\r\n    at Socket.emit (node:events:402:35)\r\n    at TCP.\u003canonymous> (node:net:687:12) {\r\n  code: 'ECONNRESET'\r\n}\r\n```\r\n\r\n### Additional information\r\n\r\nThis seems to be a fallout for #33035, which had to be reverted in the v15 release line, but now included in v16+. I discovered it while investigating https://github.com/hapijs/hapi/issues/4315.\r\n\r\nEssentially `'close'` is now emitted on `IncomingMessage` as soon as all data has been consumed, regardless of whether the underlying stream is still open (ie. the response is still being delivered). Thus node is clearly violating its own streaming API, since the underlying socket is still very much active, and will occasionally need to signal `'aborted'` on the `req` object.\r\n\r\nI expect the proper solution is to delay the `'close'` event until `res` has also finished. This should also fix related issues, like #38924.\r\n\r\n/cc @dnlup","author":{"url":"https://github.com/kanongil","@type":"Person","name":"kanongil"},"datePublished":"2021-11-10T15:32:11Z","url":"https://github.com/nodejs/node/issues/40775"}

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:212ed210-f0c1-856e-6168-33de484b6e54
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FD8:3B3F35:8E18D6:BA0A6B:6AED3C68
html-safe-noncee61f6c2fa3eb76d9239d20bda4aa2a17bfc13b8d05555d6a73fc8c87dff44e3a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkQ4OjNCM0YzNTo4RTE4RDY6QkEwQTZCOjZBRUQzQzY4IiwidmlzaXRvcl9pZCI6IjUwMzY4Mjc5MjM1NjYxMTU5NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf8e52dd55135d08e39eb30af192acc6bc0c6b612b3e7a2e45310fb5965a9c888
hovercard-subject-tagissue:1049980189
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/40775/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c8a9ad3d33d7414818bb4e1de8eba4ef7ac75dce16d4b586b060c501eb15d462/nodejs/node/issues/40775
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c8a9ad3d33d7414818bb4e1de8eba4ef7ac75dce16d4b586b060c501eb15d462/nodejs/node/issues/40775
og:image:altVersion v16.13.0 / v17.1.0 Platform Darwin Silmaril.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64 Subsystem http What steps...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekanongil
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
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
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/40775#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F40775
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%2F40775
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/40775
Reloadhttps://github.com/nodejs/node/issues/40775
Reloadhttps://github.com/nodejs/node/issues/40775
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)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/40775
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/40775
Missing 'aborted' on IncomingMessage (v16 regression)https://github.com/nodejs/node/issues/40775#top
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%22
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#issue-1049980189
#33035https://github.com/nodejs/node/pull/33035
hapijs/hapi#4315https://github.com/hapijs/hapi/issues/4315
#38924https://github.com/nodejs/node/issues/38924
@dnluphttps://github.com/dnlup
VoltrexKeyvahttps://github.com/VoltrexKeyva
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%22
regressionIssues related to regressions.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22regression%22
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#event-5599328267
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#issuecomment-965702967
#33035https://github.com/nodejs/node/pull/33035
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#issuecomment-965709782
@mcollinahttps://github.com/mcollina
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#issuecomment-965804921
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 10, 2021https://github.com/nodejs/node/issues/40775#issuecomment-965830717
Mesteeryhttps://github.com/Mesteery
regressionIssues related to regressions.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22regression%22
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#event-5600813316
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966085887
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966152881
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966153508
current docshttps://nodejs.org/api/http.html#messagedestroyerror
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966159152
https://github.com/mcollina
mcollinahttps://github.com/mcollina
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966164193
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966166198
https://nodejs.org/api/http.html#event-close_2https://nodejs.org/api/http.html#event-close_2
@mcollinahttps://github.com/mcollina
https://github.com/mcollina
mcollinahttps://github.com/mcollina
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966184268
@kanongilhttps://github.com/kanongil
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966198953
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966229546
#30625https://github.com/nodejs/node/issues/30625
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966245320
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966246475
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966247889
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966286483
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966286901
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966301363
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966305651
https://github.com/ronag
ronaghttps://github.com/ronag
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966306863
#30625https://github.com/nodejs/node/issues/30625
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966325680
#33035 (comment)https://github.com/nodejs/node/pull/33035#issue-606092465
https://github.com/kanongil
kanongilhttps://github.com/kanongil
on Nov 11, 2021https://github.com/nodejs/node/issues/40775#issuecomment-966332619
ronaghttps://github.com/ronag
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 13, 2021https://github.com/nodejs/node/issues/40775#event-5612703636
https://github.com/lukiano
lukianohttps://github.com/lukiano
on May 9, 2022https://github.com/nodejs/node/issues/40775#issuecomment-1120527729
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/40775
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/40775
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%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.