You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Mukul Kumar Singh (JIRA)" <ji...@apache.org> on 2018/01/10 04:33:00 UTC
[jira] [Created] (RATIS-189) AppendRequestStreamObserver close can
be called twice
Mukul Kumar Singh created RATIS-189:
---------------------------------------
Summary: AppendRequestStreamObserver close can be called twice
Key: RATIS-189
URL: https://issues.apache.org/jira/browse/RATIS-189
Project: Ratis
Issue Type: Bug
Reporter: Mukul Kumar Singh
Assignee: Mukul Kumar Singh
AppendRequestStreamObserver can be called twice, causing the following exception.
The following sequence of events will trigger this exception :-
1) AppendRequestStreamObserver#sendReply calls close
2) close closes responseObserver with responseObserver#onCompleted();
3) This will cause the server to again call AppendRequestStreamObserver#onCompleted
4) This will again call close, causing this exception.
{code}
SEVERE: Exception while executing runnable org.apache.ratis.shaded.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$2@5036879a
java.lang.IllegalStateException: call already closed
at org.apache.ratis.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:174)
at org.apache.ratis.shaded.io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:178)
at org.apache.ratis.shaded.io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:304)
at org.apache.ratis.grpc.client.RaftClientProtocolService$AppendRequestStreamObserver.close(RaftClientProtocolService.java:175)
at org.apache.ratis.grpc.client.RaftClientProtocolService$AppendRequestStreamObserver.onCompleted(RaftClientProtocolService.java:169)
at org.apache.ratis.shaded.io.grpc.stub.ServerCalls$2$1.onHalfClose(ServerCalls.java:217)
at org.apache.ratis.shaded.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:260)
at org.apache.ratis.shaded.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$2.runInContext(ServerImpl.java:503)
at org.apache.ratis.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52)
at org.apache.ratis.shaded.io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)