Skip to content

Netty 4.1.75.Final HTTP/2 connection closures #8981

Closed

Description

@chemicL

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.

Activity

  1. added this to the v1.46 milestone on Mar 10, 2022
  2. ejona86 commented on Mar 10, 2022

    @ejona86
    Member

    Looks like add() was set up to handle pseudo headers, but not get/remove. getAll() would be easy to implement by just calling get() since we know there's only one. Not hard, just more code like addPseudoHeader()... and actually simpler because we don't have to have the condition that throws for each.

  3. self-assigned this
    on Mar 10, 2022
  4. njhill commented on Mar 11, 2022

    @njhill
    Contributor

    @ejona86 actually only contains() is needed so could have a slightly simpler impl? and maybe the duplicate checks could now be removed from addPseudoHeader() since netty now also checks for this? (the reason that contains() is now called)

  5. njhill commented on Mar 19, 2022

    @njhill
    Contributor

    @ejona86 I had a go at this in #9001

  6. davsclaus commented on Mar 20, 2022

    @davsclaus

    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

  7. added a commit that references this issue on Mar 21, 2022
    1e59f1a
  8. added 5 commits that reference this issue on Mar 22, 2022
    4a0fe99
    363b346
    b065719
    9536204
    8bc9b3b
  9. added a commit that references this issue on Apr 8, 2022
    616176c
  10. locked as resolved and limited conversation to collaborators on Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions