grpc / grpc-java

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

Integration tests failing #145

Closed buchgr closed 9 years ago

buchgr commented 9 years ago

Occasionally the integration tests AbstractTransportTest#largeUnary and AbstractTransportTest#serverStreaming are failing on the server side with lots of Exceptions of the like.

Feb 25, 2015 2:58:40 PM io.grpc.transport.netty.NettyServerHandler onStreamError
WARNING: Stream Error
io.netty.handler.codec.http2.Http2Exception$StreamException: Stream closed before write could take place
    at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:90)
    at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$FlowState.clear(DefaultHttp2RemoteFlowController.java:431)
    at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$2.streamInactive(DefaultHttp2RemoteFlowController.java:78)
    at io.netty.handler.codec.http2.DefaultHttp2Connection.deactivateInternal(DefaultHttp2Connection.java:222)

We have traced it down to a bug in the HTTP2 Flow Control in Netty, where frames that are pending due to a not yet received WINDOW_UPDATE frame get canceled. For this bug to trigger the server endpoint has to be in the state HALF_CLOSE_REMOTE with no Flow Control Window left.

I have discussed the problem with @nmittler and @ejona86 and I am currently working on a PR for Netty.

nmittler commented 9 years ago

Fixed by #179