FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src,http2: ensure cleanup if a frame is not sent by ywave620 · Pull Request #47244 · nodejs/node · GitHub

/ node Public

src,http2: ensure cleanup if a frame is not sent - #47244

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
ywave620:fixFrameNotSentBUg
Mar 30, 2023
Merged

src,http2: ensure cleanup if a frame is not sent#47244
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
ywave620:fixFrameNotSentBUg

Conversation

Copy link
Copy Markdown
Contributor

Fix 41582
Call to JS and close the session if a frame is not sent even there is no frameError listener registered by user.

Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. labels Mar 24, 2023

Copy link
Copy Markdown
Contributor Author

The evidence of the absence of 'frameError' listener is the blame is that if you add such a listener to the http2Session in the server side in the test, client can get a response.
This PR ensures 'onFrameError' in JS, which takes care of cleanup get called even if no user registered 'frameError' listener.

// Called by the native layer when an error has occurred sending a
// frame. This should be exceedingly rare.
function onFrameError(id, type, code) {
const session = this[kOwner];
if (session.destroyed)
return;
debugSessionObj(session, 'error sending frame type %d on stream %d, code: %d',
type, id, code);
const emitter = session[kState].streams.get(id) || session;
emitter[kUpdateTimer]();
emitter.emit('frameError', type, code, id);
session[kState].streams.get(id).close(code);
session.close();
}

RafaelGSS added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 24, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 24, 2023

Copy link
Copy Markdown
Collaborator

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

Copy link
Copy Markdown
Contributor Author

Don't know what was going on, many tests ended up with no report generated, likes

Could anyone re-run the CI?

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor Author

@mcollina are we ready to merge this? :)

RafaelGSS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I was afraid it would revert the memory leak fix I did a while ago. But, the since the CI is green I think we are good. LGTM.

RafaelGSS added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Mar 30, 2023
mcollina added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Mar 30, 2023

Copy link
Copy Markdown
Member

@RafaelGSS could you reopen that issue?

nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 30, 2023
nodejs-github-bot merged commit 18e1f3c into nodejs:main Mar 30, 2023

Copy link
Copy Markdown
Collaborator

Landed in 18e1f3c

Copy link
Copy Markdown
Member

@RafaelGSS could you reopen that issue?

Why? I meant I didn't approve this PR before because I was waiting for the CI to run to guarantee this won't bring back the memory leak issue.

RafaelGSS pushed a commit that referenced this pull request Apr 5, 2023
Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

PR-URL: #47244
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS mentioned this pull request Apr 6, 2023
RafaelGSS pushed a commit that referenced this pull request Apr 6, 2023
Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

PR-URL: #47244
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Apr 7, 2023
Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

PR-URL: #47244
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

PR-URL: #47244
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http2: receiving a request with a header exceeding the max threshold hangs indefinitely

4 participants


Back | FazBrowse Home | New Git URL