Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http/2 process throws SIGABRT error when downloading big files using multiple streams #29393

Closed
Rantoledo opened this issue Sep 1, 2019 · 3 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. http2 Issues or PRs related to the http2 subsystem.

Comments

@Rantoledo
Copy link

  • Version: 12.9.1
  • Platform: Linux

Hey,

I've tried to create a simple client-server app using http/2, which needs to transfer directories.
So I started with simple directories, that contains about 10-20 files, then moved to directories containing lots of files 100K, 200K, etc. all of the file we're pretty small (~ 1KB). That worked well…

Then, I've tried to test the performance on larger files, about 300 files, 1GB each. But I got errors, and I have no idea why.

Code is here:
https://github.com/Rantoledo/http2_nodejs_client_server_example2.git

When I set concurrency to 300, all files are downloaded, but I get a SIGABRT error at the end:

node[4183]: ../src/node_http2.cc:892:ssize_t node::http2::Http2Session::ConsumeHTTP2Data(): Assertion `(flags_ & SESSION_STATE_READING_STOPPED) != (0)' failed.
 1: 0x9bcac0 node::Abort() [node]
 2: 0x9bcb47  [node]
 3: 0x9f274a node::http2::Http2Session::ConsumeHTTP2Data() [node]
 4: 0x9f3060 node::http2::Http2Session::OnStreamRead(long, uv_buf_t const&) [node]
 5: 0xad8eab node::TLSWrap::ClearOut() [node]
 6: 0xadb308 node::TLSWrap::OnStreamRead(long, uv_buf_t const&) [node]
 7: 0xa71ab6 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [node]
 8: 0x12bb2d9  [node]
 9: 0x12bb900  [node]
10: 0x12c1438  [node]
11: 0x12afd7b uv_run [node]
12: 0xa002c7 node::NodeMainInstance::Run() [node]
13: 0x993cd8 node::Start(int, char**) [node]
14: 0x7ff4fc7c502a __libc_start_main [/lib64/libc.so.6]
15: 0x932bf5  [node]
Aborted

When I set the concurrency to something less than 300, say 200, after coping 200 files, I get an 'error code NGHTTP2_ENHANCE_YOUR_CALM' error, 'error code NGHTTP2_INTERNAL_ERROR' and also SIGABRT error.

  • sometimes I get only SIGABRT error without the INTERNAL and ENHANCE, I really don't know why. There's an inconsistency…

More info:
1. When I deployed the server with 'createServer' that worked…
2. I don't think this is an error of closed/opened file, or streams, or session, because I added listeners, and tried to debug it, and didn't notice any stream hanging there for no reason (maybe I'm wrong).
3. I've tried to set the max session memory variable to 10000, but still had the same results. BTW the documentation doesn't really explain how this variable works. I don't think that's the problem.

I think something is wrong with resources management (because of the SIGABRT) - if so I think that's an important bug to fix because http2 is great and has a big advantage using multiple streams on one session.

@mscdex
Copy link
Contributor

mscdex commented Sep 1, 2019

Duplicate of #29353

@mscdex mscdex marked this as a duplicate of #29353 Sep 1, 2019
@mscdex mscdex closed this as completed Sep 1, 2019
@mscdex mscdex added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 1, 2019
@addaleax
Copy link
Member

addaleax commented Sep 1, 2019

Thank you for the reproduction though, this bug report seems much easier to work with.

@addaleax addaleax added the http2 Issues or PRs related to the http2 subsystem. label Sep 1, 2019
@Rantoledo
Copy link
Author

Rantoledo commented Sep 1, 2019

@addaleax
You're welcome. Feel free to reproduce with my code.

addaleax added a commit to addaleax/node that referenced this issue Sep 1, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: nodejs#29353
Fixes: nodejs#29393
addaleax added a commit that referenced this issue Sep 4, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: #29353
Fixes: #29393

PR-URL: #29399
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
addaleax added a commit to addaleax/node that referenced this issue Sep 19, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: nodejs#29353
Fixes: nodejs#29393

PR-URL: nodejs#29399
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
addaleax added a commit to addaleax/node that referenced this issue Sep 19, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: nodejs#29353
Fixes: nodejs#29393

PR-URL: nodejs#29399
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this issue Sep 20, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: #29353
Fixes: #29393

PR-URL: #29399
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
BethGriggs pushed a commit that referenced this issue Sep 25, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: #29353
Fixes: #29393

PR-URL: #29399
Backport-PR-URL: #29618
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
BethGriggs pushed a commit that referenced this issue Oct 1, 2019
Don’t start reading more input data if we’re still busy writing output.
This was overlooked in 8a4a193.

Fixes: #29353
Fixes: #29393

PR-URL: #29399
Backport-PR-URL: #29619
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants