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

node_http2.cc: void node::http2::Http2Session::CheckAllocatedSize(size_t) const: Assertion `(current_nghttp2_memory_) >= (previous_size)' failed. #130

Closed
huan opened this issue Mar 18, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@huan
Copy link
Member

huan commented Mar 18, 2021

When upgrading from grpc to grpc-js, we encountered the following error in tests/integration.spec.ts:

eventStream.cancel()
await new Promise<void>(resolve => server.tryShutdown(resolve))

node[122920]: ../src/node_http2.cc:449:void node::http2::Http2Session::CheckAllocatedSize(size_t) const: Assertion `(current_nghttp2_memory_) >= (previous_size)' failed.

Node Versions

All node major versions will be affected: 10/12/14/15

Similiar Issues

Workaround

+ await new Promise(resolve => setImmediate(resolve))
eventStream.cancel() 
@huan huan added the bug Something isn't working label Mar 18, 2021
@huan huan closed this as completed Mar 18, 2021
@huan huan reopened this Mar 18, 2021
huan added a commit that referenced this issue Mar 18, 2021
* Replace grpc with @grpc/grpc-js

* grpc-tools works with optional!

* v0.23

* Use grpc-js in stub generater

* convert to grpc-js

* 0.23.1

* workaround for grpc-js stream.cancel() (#130)

* 0.23.2

* fix all unit tests for grpc-js

* 0.23.3

* fix examples

* 0.23.4
@huan huan pinned this issue Mar 18, 2021
huan added a commit that referenced this issue Mar 19, 2021
@mdouglass
Copy link

I opened nodejs/node#38964 against nodejs as I ran into the same assertion failure you saw. The same setImmediate fix you suggested helps with my repro case as well, but thought you might want to track the issue on nodejs side as well.

@huan
Copy link
Member Author

huan commented Jun 8, 2021

Thanks for filing the issue on the nodejs side, I believe there must be a bug in nodejs and it should be definitely fixed.

@huan
Copy link
Member Author

huan commented Jul 1, 2021

According to nodejs/node#38964 (comment) I believe this problem will be fixed in the next major version of Node.js.

However, for maximum compatibility for our module, we should keep this workaround "as-it-is", which means we will not remove the workaround.

@huan huan closed this as completed Aug 8, 2021
@huan huan unpinned this issue Oct 3, 2021
huan added a commit that referenced this issue Oct 4, 2021
* require protoc v3.15 (#109)

* Upgrade grpc-gateway v2.1 -> v2.3 (#109)

* show version when install grpc-gateway (#109)

* use `optional` in friendship source (#109)

* clean

* optional hello

* v0.25 for optional

* add comment to #130

* add docs for gRPC proto

* clean script

* add link

* add back optional to replace wrappers

* improvement

* remove unnecessary optional

* 0.29.36

* 0.29.37

* 0.29.38

* 0.29.39

* 0.29.40

* clean

* 0.29.41

* clean

* 0.29.42

* clean

* 0.29.43

* re-export google pb classes from cjs

* re-export google pb classes from cjs

* 0.29.44

* 0.29.45

* add @latest for install

* 0.29.46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants