Repository navigation
Closed
Description
What version of gRPC-Java are you using?
1.46.0-SNAPSHOT
What is your environment?
macOS
What did you expect to see?
After bumping Netty from 4.1.72.Final to 4.1.75.Final I'd expect tests to pass.
What did you see instead?
Broken tests:
> Task :grpc-alts:test
io.grpc.alts.HandshakerServiceChannelTest > resource_lifecycleTwice FAILED
io.grpc.StatusRuntimeException: INTERNAL: Connection closed after GOAWAY. HTTP/2 error code: COMPRESSION_ERROR, debug data: Use direct accessor methods for pseudo headers.
at app//io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at app//io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at app//io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:164)
at app//io.grpc.testing.protobuf.SimpleServiceGrpc$SimpleServiceBlockingStub.unaryRpc(SimpleServiceGrpc.java:355)
at app//io.grpc.alts.HandshakerServiceChannelTest.doRpc(HandshakerServiceChannelTest.java:98)
at app//io.grpc.alts.HandshakerServiceChannelTest.resource_lifecycleTwice(HandshakerServiceChannelTest.java:85)
io.grpc.alts.HandshakerServiceChannelTest > resource_works FAILED
io.grpc.StatusRuntimeException: INTERNAL: Connection closed after GOAWAY. HTTP/2 error code: COMPRESSION_ERROR, debug data: Use direct accessor methods for pseudo headers.
at app//io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at app//io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at app//io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:164)
at app//io.grpc.testing.protobuf.SimpleServiceGrpc$SimpleServiceBlockingStub.unaryRpc(SimpleServiceGrpc.java:355)
at app//io.grpc.alts.HandshakerServiceChannelTest.doRpc(HandshakerServiceChannelTest.java:98)
at app//io.grpc.alts.HandshakerServiceChannelTest.resource_works(HandshakerServiceChannelTest.java:75)
Steps to reproduce the bug
Bump nettyVersion to 4.1.75.Final and run ./gradlew clean build.
Possible cause
GrpcHttp2RequestHeaders most probably contains incorrect implementation and unnecessary guards against accessing pseudo headers, which are not specified by Netty and are in fact used by the contains method.
Reacted by Kenny
Activity
ejona86 commentedon Mar 10, 2022
Looks like
add()was set up to handle pseudo headers, but not get/remove.getAll()would be easy to implement by just callingget()since we know there's only one. Not hard, just more code likeaddPseudoHeader()... and actually simpler because we don't have to have the condition that throws for each.njhill commentedon Mar 11, 2022
@ejona86 actually only
contains()is needed so could have a slightly simpler impl? and maybe the duplicate checks could now be removed fromaddPseudoHeader()since netty now also checks for this? (the reason thatcontains()is now called)njhill commentedon Mar 19, 2022
@ejona86 I had a go at this in #9001
davsclaus commentedon Mar 20, 2022
We have this problem too with Apache Camel and our camel-grpc component, downgrading to netty 4.1.72.Final works
https://issues.apache.org/jira/browse/CAMEL-17832
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods