grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.26k stars 3.79k forks source link

Upgrade Netty to fix issue with large headers and HTTP2 continuation packets #11150

Open nicholashagen opened 2 months ago

nicholashagen commented 2 months ago

What version of gRPC-Java are you using?

Latest 1.63.0

What is your environment?

Mac, Unix, any JVM TLS client/server

What did you expect to see?

Large headers over 200KB should work without issue over TLS, even if not ideal.

What did you see instead?

The connection is closed and gRPC errors reported.

Steps to reproduce the bug

This occurs due to a bug in Netty that was resolved in 106.Final. gRPC is actively on 100.Final.

https://github.com/netty/netty/pull/13786

Note that these more recent additions to Netty also renamed the GraalVM reflection config file. There is an integration test for the shaded Netty package to verify that file is repackaged. This test fails since the file name was renamed. Updating the name of that file fixes that issue.

This bug is currently breaking any TLS connection using large headers. We did verify updating to latest Netty does resolve.

Is it possible to update the version of Netty within gRPC to fix the underlying HTTP2 issue?

Thanks!

nicholashagen commented 2 months ago

Here is a test I put together showing this failure: https://github.com/grpc/grpc-java/compare/master...nicholashagen:grpc-java:netty-lg-header-test?expand=1

Updating the repo to use 4.1.109.Final fixes that unit test : https://github.com/grpc/grpc-java/compare/master...nicholashagen:grpc-java:update-netty?expand=1

Note the update to ShadingTest as well.