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

segmentation fault when connecting through nginx proxy #1682

Closed
jwulf opened this issue Feb 3, 2021 · 2 comments
Closed

segmentation fault when connecting through nginx proxy #1682

jwulf opened this issue Feb 3, 2021 · 2 comments

Comments

@jwulf
Copy link

jwulf commented Feb 3, 2021

Problem description

I'm the maintainer of zeebe-node. I'm testing the grpc-js package as a replacement for the C-based client, since that one is being deprecated in April, 2021.

When connecting to Camunda Cloud, which uses a TLS-secured nginx proxy at the front-end, using the grpc-js library causes the process to exit with a segmentation fault.

It traced it with a debugger and it happens in Node's http2 module.

The same code, using the grpc package works with no problem.

Reproduction steps

If I run a test in my suite on Node 12.6.0 like this:

NODE_DEBUG=http2 NODE_DEBUG_NATIVE=tls,http2 GRPC_TRACE=channel,call_stream GRPC_VERBOSITY=DEBUG ZEEBE_NODE_LOGLEVEL=debug ZEEBE_NODE_PUREJS=true jest Worker-integration

I get the following output:

HttpStream 13 (754) [Http2Session client (443)] destroying stream
HttpStream 13 (754) [Http2Session client (443)] destroying stream
HttpStream 11 (703) [Http2Session client (443)] sending rst_stream with code 8
Http2Session client (443) sending pending data
Http2Session client (443) stream 13 closed with code: 0
Http2Session client (443) nghttp2 has 13 bytes to send
TLSWrap client (423) DoWrite()
TLSWrap client (423) Writing 13 bytes, written = 13
TLSWrap client (423) Trying to write encrypted output
TLSWrap client (423) EncOut() setting write_callback_scheduled_
TLSWrap client (423) Writing 1 buffers to the underlying stream
TLSWrap client (423) Write finished synchronously
HTTP2 14446: Http2Session client: marking session closed
HTTP2 14446: Http2Session client: submitting goaway

 RUNS  src/__tests__/integration/Worker-integration.spec.ts
Http2Session client (443) submitting goaway
[1]    14446 segmentation fault  NODE_DEBUG=http2 NODE_DEBUG_NATIVE=tls,http2 GRPC_TRACE=channel,call_stream =

On Node 13.14.0:

HttpStream 13 (619) [Http2Session client (422)] destroying stream
HttpStream 13 (619) [Http2Session client (422)] destroying stream
HttpStream 11 (589) [Http2Session client (422)] sending rst_stream with code 8
Http2Session client (422) sending pending data
Http2Session client (422) stream 13 closed with code: 0
Http2Session client (422) nghttp2 has 13 bytes to send
TLSWrap client (411) DoWrite()
TLSWrap client (411) Writing 13 bytes, written = 13
TLSWrap client (411) Trying to write encrypted output
TLSWrap client (411) EncOut() setting write_callback_scheduled_
TLSWrap client (411) Writing 1 buffers to the underlying stream
TLSWrap client (411) Write finished synchronously
HTTP2 12875: Http2Session client: marking session closed
HTTP2 12875: Http2Session client: submitting goaway

 RUNS  src/__tests__/integration/Worker-integration.spec.ts
Http2Session client (422) submitting goaway
node(12875,0x10f1215c0) malloc: *** error for object 0x109814600: pointer being freed was not allocated
node(12875,0x10f1215c0) malloc: *** set a breakpoint in malloc_error_break to debug

On Node 14.15.6:

HttpStream 13 (619) [Http2Session client (433)] destroying stream
HttpStream 13 (619) [Http2Session client (433)] destroying stream
HttpStream 11 (590) [Http2Session client (433)] sending rst_stream with code 8
Http2Session client (433) sending pending data
Http2Session client (433) stream 13 closed with code: 0
Http2Session client (433) nghttp2 has 13 bytes to send
TLSWrap client (417) DoWrite()
TLSWrap client (417) Writing 13 bytes, written = 13
TLSWrap client (417) Trying to write encrypted output
TLSWrap client (417) EncOut() setting write_callback_scheduled_
TLSWrap client (417) Writing 1 buffers to the underlying stream
TLSWrap client (417) Write finished synchronously
HTTP2 15636: Http2Session client: marking session closed
HTTP2 15636: Http2Session client: submitting goaway

 RUNS  src/__tests__/integration/Worker-integration.spec.ts
Http2Session client (433) submitting goaway
[1]    15636 segmentation fault  NODE_DEBUG=http2 NODE_DEBUG_NATIVE=tls,http2 GRPC_TRACE=channel,call_stream =

Environment

  • OS name, version and architecture: Mac OS 10.14.6
  • Node version 12.6.0, 13.14.0, 14.15.4
  • Node installation method nvm
  • Package name and version grpc-js@1.2.5
@murgatroid99
Copy link
Member

A segmentation fault in Node is, in my view, unambiguously a bug in Node itself, so I suggest filing an issue against Node (https://github.com/nodejs/node). When you do so, you should probably include a C-level stacktrace, which can be obtained using a tool like gdb. Some code that reproduces the error would probably also help.

@nicolasnoble
Copy link
Member

This is an issue for nodejs, not us. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants