grpc / grpc/grpc-node

@grpc/grpc-js Abort on ClientReadableStream cancel

Open
#1,652 9 comments 4 reactions 0 assignees View on GitHub
package: @grpc/grpc-js
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Problem description
invoking ClientReadableStream.cancel() cause abort
```
node[8728]: ../src/node_http2.cc:448:void node::http2::Http2Session::CheckAllocatedSize(size_t) const: Assertion `(current_nghttp2_memory_) >= (previous_size)' failed.
1: 0xa03530 node::Abort() [node]
2: 0xa035ae [node]
3: 0xa3ba6b node::mem::NgLibMemoryManager::ReallocImpl(void*, unsigned long, void*) [node]
4: 0xa3bc43 node::mem::NgLibMemoryManager::FreeImpl(void*, void*) [node]
5: 0x1865d81 nghttp2_session_close_stream [node]
6: 0x186c4e4 nghttp2_session_mem_recv [node]
7: 0xa2faa9 node::http2::Http2Session::ConsumeHTTP2Data() [node]
8: 0xa2fe18 node::http2::Http2Session::OnStreamRead(long, uv_buf_t const&) [node]
9: 0xada258 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [node]
10: 0x1385197 [node]
11: 0x1385b50 [node]
12: 0x138c545 [node]
13: 0x137a398 uv_run [node]
14: 0xa438d4 node::NodeMainInstance::Run() [node]
15: 0x9d1735 node::Start(int, char**) [node]
16: 0x7fd5025050b3 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
17: 0x96971c [node]
Aborted
```

but when I use 'grpc' module with same code, there is no abort.

### Reproduction steps
invoke ClientReadableStream.cancel()

### Environment
- OS name, version and architecture: [WSL Ubuntu 20.04.1 amd64]
- Node version [14.15.1]
- Node installation method [nvm]
- If applicable, compiler version []
- Package name and version [@grpc/grpc-js@1.2.2]

### Additional context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.