You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This helps to prevent retryable stream from using calloptions.executor when it shouldn't. It is done by delaying notifying upper layer (through masterListener).
Dec 15, 2022 5:58:51 PM io.grpc.internal.RetriableStream createSubstream
INFO: created sub stream, inflight count 1
Dec 15, 2022 5:58:52 PM io.grpc.internal.RetriableStream$1CommitTask run
INFO: cancelling drained : {delegate=io.grpc.netty.NettyClientStream@414be180}
Dec 15, 2022 5:58:52 PM io.grpc.internal.RetriableStream safeCloseMasterListener
INFO: save close reason status:Status{code=DEADLINE_EXCEEDED, description=deadline exceeded after 0.959140709s. [closed=[], open=[[remote_addr=/0:0:0:0:0:0:0:0:49769]]], cause=null}, progress PROCESSED
io.grpc.testing.integration.AutoWindowSizingOnTest > deadlineExceeded FAILED
org.junit.runners.model.TestTimedOutException: test timed out after 15 seconds
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:748)
at io.grpc.stub.ClientCalls$BlockingResponseStream.waitForNext(ClientCalls.java:633)
at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:657)
at io.grpc.stub.ClientCalls$BlockingResponseStream.next(ClientCalls.java:676)
at io.grpc.testing.integration.AbstractInteropTest.deadlineExceeded(AbstractInteropTest.java:1167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
timeline:
Original stream is created and drained. inFlightStreamCount = 1
RetriableStream is cancelled and noop stream is committed. The commit cancel the original stream. (==> suppose that netty stream will call back on sub stream listener onClose but not happen.)
safeCloseMasterListener is called and listener not closed because inFlightStreamCount is not Integer.MIN_VALUE.
RetriableStream is cancelled and noop stream is committed. The commit cancel the original stream. (==> suppose that netty stream will call back on sub stream listener onClose but not happen.)
It turns out the sub listener closed() was called. It looks the race condition that although safeCloseMasterListener happens earlier then subListener.close(), the status not yet saved. So master listener can not be closed, (assert null failed prevents master listener to be called).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is follow up fix of #9626
This helps to prevent retryable stream from using calloptions.executor when it shouldn't. It is done by delaying notifying upper layer (through masterListener).