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_wrap: fix BIO leak on SSL error by indutny · Pull Request #1244 · nodejs/node

Conversation

@indutny

@indutny indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member

Fix: #1075

R=@bnoordhuis

Sorry, something went wrong.

Uh oh!

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

All reactions
@indutny
tls_wrap: fix BIO leak on SSL error
16a13c7
Fix: nodejs#1075
@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

cc @iojs/crypto

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny indutny mentioned this pull request Mar 24, 2015
Possible memory leak in TLS(Wrap?) #1075
Closed
@mscdex mscdex added tls Issues and PRs related to the tls subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. labels Mar 24, 2015
@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

Cecil,

May ask you to gist a test case that your are using?

Thank you!

On Monday, March 23, 2015, Cecil Worsley [email protected] wrote:

I found a pretty simple way to reproduce this. I created an HTTPS hello
world server and another process that produces hundreds of HTTPS get
requests/sec. In io.js I found the memory leaking exponentially but not in
node 0.10.33. Perhaps this could make it easier to test this issue? I'm not
a C++ guy but seems like a simple way to test the hypotheses?

—
Reply to this email directly or view it on GitHub
#1244 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

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

@cworsley4

cworsley4 commented Mar 24, 2015

Copy link
Copy Markdown

Shoot, I accidentally deleted my comment. But sure, I can do that. I have been running the test for a few minutes and on node 0.10.33 memory climbs and then flattens out. io.js consumes multiple gigs after running for the same amount of time. I'll post the gist in a few.

All reactions

Sorry, something went wrong.

Uh oh!

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

@cworsley4

cworsley4 commented Mar 24, 2015

Copy link
Copy Markdown

Example gist: https://gist.github.com/cworsley4/458aa035f97672794e9f
You'll have to generate your own SSL Cert but this should pretty clearly.

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

@cworsley4 running it locally now, will report back here. @bnoordhuis do not let this stop you, though :) This commit is surely fixing some leak.

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

@cworsley4 just to make sure, what io.js version are you using?

All reactions

Sorry, something went wrong.

Uh oh!

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

@cworsley4

cworsley4 commented Mar 24, 2015

Copy link
Copy Markdown

I just duplicated the issue in 1.4.2, 1.5.1, and 1.6.2.

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

Interesting, I see some leaks in a client code... Will check it in a bit.

All reactions

Sorry, something went wrong.

Uh oh!

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

@cworsley4

cworsley4 commented Mar 24, 2015

Copy link
Copy Markdown

@indutny Leaks in the code I provided?

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 24, 2015

Copy link
Copy Markdown
Member Author

Not sure about containment yet, but I am able to confirm it with your test
case. Thank you!

On Tuesday, March 24, 2015, Cecil Worsley [email protected] wrote:

@indutny https://github.com/indutny Leaks in the code I provided?

—
Reply to this email directly or view it on GitHub
#1244 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

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

@cworsley4

cworsley4 commented Mar 24, 2015

Copy link
Copy Markdown

I'm glad to hear it! Of course let us know what you find, or if I can provide anything else to the effort.

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

Update PR with a fix :) @cworsley4 thank you so much! You helped a lot.

@jasisk: this should fix your leak, guys ;)

cc @iojs/crypto

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

@jasisk: at least I have lots of hope for this

All reactions

Sorry, something went wrong.

Uh oh!

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

@jasisk

jasisk commented Mar 25, 2015

Copy link
Copy Markdown

Haha. 👍 Deploying.

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny
tls_wrap: fix this incredibly stupid leak
3327932
Always call `Done` on the WriteWrap, and ensure that `EncOut` will
consume all data in clear_in_ and invoke queued callbacks.

Fix: nodejs#1075
@indutny
indutny force-pushed the fix/gh-1075-3 branch from acffdd2 to 3327932 Compare March 25, 2015 03:25
@cworsley4

cworsley4 commented Mar 25, 2015

Copy link
Copy Markdown

Do you guys think this PR will make it into #1252?

All reactions

Sorry, something went wrong.

Uh oh!

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

bnoordhuis
bnoordhuis reviewed Mar 25, 2015
View reviewed changes
Comment thread src/tls_wrap.cc Outdated

@bnoordhuis bnoordhuis Mar 25, 2015

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.

s/maed/made/ and can you end the sentence with a dot?

Sorry, something went wrong.

Uh oh!

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

All reactions

@indutny indutny Mar 25, 2015

Copy link
Copy Markdown
Member Author

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.

Fixed, thanks.

Sorry, something went wrong.

Uh oh!

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

All reactions
indutny added 3 commits March 25, 2015 15:09
@indutny
fixup
be2d212
@indutny
fixup
301cf94
@indutny
invoke queued
ec2a2ba
@indutny

indutny commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/373/

Thanks for the comments!

All reactions

Sorry, something went wrong.

Uh oh!

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

@jasisk

jasisk commented Mar 25, 2015

Copy link
Copy Markdown

Redeploying. 😀

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny

indutny commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

The CI: appears to be blue.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnoordhuis

bnoordhuis commented Mar 25, 2015

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

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

indutny added a commit that referenced this pull request Mar 25, 2015
@indutny
tls_wrap: fix BIO leak on SSL error
e74b5d2
Fix: #1075
PR-URL: #1244
Reviewed-By: Ben Noordhuis <[email protected]>
indutny added a commit that referenced this pull request Mar 25, 2015
@indutny
tls_wrap: fix this incredibly stupid leak
2ccc8f3
Always call `Done` on the WriteWrap, and ensure that `EncOut` will
consume all data in clear_in_ and invoke queued callbacks.

Fix: #1075
PR-URL: #1244
Reviewed-By: Ben Noordhuis <[email protected]>
@indutny

indutny commented Mar 25, 2015

Copy link
Copy Markdown
Member Author

Landed in e74b5d2, 2ccc8f3. Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

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

@indutny indutny closed this Mar 25, 2015
@indutny
indutny deleted the fix/gh-1075-3 branch March 25, 2015 22:51
@Fishrock123 Fishrock123 mentioned this pull request Mar 26, 2015
Release proposal: v1.6.3 #1252
Closed
@Fishrock123 Fishrock123 mentioned this pull request Apr 9, 2015
test: windows ci timeouts related to child_process #1383
Closed
@brendanashworth brendanashworth mentioned this pull request Oct 13, 2015
Memory leak when hitting a site over https with invalid certificates. nodejs/node-v0.x-archive#25616
Closed
@MarcelRaschke MarcelRaschke mentioned this pull request Nov 5, 2022
[Snyk] Security upgrade webpack-cli from 3.3.12 to 4.0.0 MarcelRaschke/node#18
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. 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.

Uh oh!

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

5 participants

@indutny @cworsley4 @jasisk @bnoordhuis @mscdex
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 01402775 — 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.