GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: handle cases where the raw socket is destroyed by lpinca · Pull Request #49980 · nodejs/node

Conversation

@lpinca

@lpinca lpinca commented Sep 30, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Ensure that the 'close' event is emitted on a TLSSocket when it is
created from an existing raw net.Socket and the raw socket is not
closed cleanly (destroyed).

Refs: 048e0bec5147
Refs: #49902 (comment)
Fixes: #49902

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. labels Sep 30, 2023
@lpinca
lpinca force-pushed the emit/close-event branch 2 times, most recently from 9c7a6df to c14baa7 Compare September 30, 2023 15:20
@lpinca

lpinca commented Sep 30, 2023

Copy link
Copy Markdown
Member Author

cc: @pimterry

pimterry reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 30, 2023
benjamingr
benjamingr reviewed Sep 30, 2023
View reviewed changes
Comment thread test/parallel/test-tls-socket-close.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 30, 2023
@nodejs-github-bot

nodejs-github-bot commented Sep 30, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54411/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca
tls: handle cases where the raw socket is destroyed
8e51895
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is
created from an existing raw `net.Socket` and the raw socket is not
closed cleanly (destroyed).

Refs: nodejs@048e0bec5147
Refs: nodejs#49902 (comment)
Fixes: nodejs#49902
@lpinca
lpinca force-pushed the emit/close-event branch from c14baa7 to 8e51895 Compare September 30, 2023 15:44
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 30, 2023
benjamingr
benjamingr approved these changes Sep 30, 2023
View reviewed changes

@benjamingr benjamingr left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual fix LGTM, I wonder if we shouldn't nextTick the callback in this case since I thhinkk it can be called synchronously in this case and I'm not sure it was possible before

That said, "maybe not 100% inconsistently timed" is still much better than "not sure if called at all"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 30, 2023
@lpinca

lpinca commented Sep 30, 2023

Copy link
Copy Markdown
Member Author

Actual fix LGTM, I wonder if we shouldn't nextTick the callback in this case since I thhinkk it can be called synchronously in this case and I'm not sure it was possible before

I thought about that, but it is called after the 'close' event on the raw net.Socket so definitely not synchronously.

benjamingr reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 30, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54413/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 30, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54416/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Oct 1, 2023
CI Reliability 2023-10-01 nodejs/reliability#680
Open
16 tasks
pimterry
pimterry reviewed Oct 1, 2023
View reviewed changes

@pimterry pimterry left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Makes sense, LGTM 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Oct 2, 2023
CI Reliability 2023-10-02 nodejs/reliability#681
Open
CI Reliability 2023-10-03 nodejs/reliability#682
Open
joyeecheung
joyeecheung approved these changes Oct 4, 2023
View reviewed changes
@lpinca lpinca added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 4, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 4, 2023
@nodejs-github-bot
nodejs-github-bot merged commit b1ada0a into nodejs:main Oct 4, 2023
@nodejs-github-bot

nodejs-github-bot commented Oct 4, 2023

Copy link
Copy Markdown
Collaborator

Landed in b1ada0a

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca
lpinca deleted the emit/close-event branch October 4, 2023 14:24
@RafaelGSS RafaelGSS mentioned this pull request Oct 9, 2023
2023-10-17, Version 21.0.0 (Current) #49870
Merged
targos pushed a commit that referenced this pull request Nov 11, 2023
@lpinca @targos
tls: handle cases where the raw socket is destroyed
294b650
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is
created from an existing raw `net.Socket` and the raw socket is not
closed cleanly (destroyed).

Refs: 048e0bec5147
Refs: #49902 (comment)
Fixes: #49902
PR-URL: #49980
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@targos targos mentioned this pull request Nov 12, 2023
v20.10.0 release proposal #50682
Merged
@juanarbol juanarbol mentioned this pull request Dec 6, 2023
2023-12-06, N|Solid v5.0.1 Iron Release nodesource/nsolid#41
Merged
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
@lpinca @debadree25
tls: handle cases where the raw socket is destroyed
3bbb759
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is
created from an existing raw `net.Socket` and the raw socket is not
closed cleanly (destroyed).

Refs: nodejs@048e0bec5147
Refs: nodejs#49902 (comment)
Fixes: nodejs#49902
PR-URL: nodejs#49980
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@benjamingr benjamingr benjamingr approved these changes
@pimterry pimterry pimterry left review comments
@anonrig anonrig anonrig left review comments
@joyeecheung joyeecheung joyeecheung approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

parallel.test-tls-socket-close is flaky

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@lpinca @nodejs-github-bot @benjamingr @pimterry @anonrig @joyeecheung
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.