Skip to content

Commit

Permalink
Revert "stub: enable throwing rejected execution exception on Threadl…
Browse files Browse the repository at this point in the history
…essExecutor shutdown (#10555)"

This reverts commit 5f480de. We're
seeing it thrown in (b/301552213):

```
java.util.concurrent.RejectedExecutionException
	at io.grpc.stub.ClientCalls$ThreadlessExecutor.execute(ClientCalls.java:761)
	at io.grpc.internal.RetriableStream$Sublistener.closed(RetriableStream.java:954)
	at io.grpc.internal.ForwardingClientStreamListener.closed(ForwardingClientStreamListener.java:34)
	at io.grpc.internal.InternalSubchannel$CallTracingTransport$1$1.closed(InternalSubchannel.java:691)
	at io.grpc.internal.DelayedStream$DelayedStreamListener$4.run(DelayedStream.java:510)
	at io.grpc.internal.DelayedStream$DelayedStreamListener.delayOrExecute(DelayedStream.java:462)
	at io.grpc.internal.DelayedStream$DelayedStreamListener.closed(DelayedStream.java:507)
	at io.grpc.internal.AbstractClientStream$TransportState.closeListener(AbstractClientStream.java:458)
	at io.grpc.internal.AbstractClientStream$TransportState.-$$Nest$mcloseListener(AbstractClientStream.java)
	at io.grpc.internal.AbstractClientStream$TransportState$1.run(AbstractClientStream.java:441)
	at io.grpc.internal.AbstractClientStream$TransportState.deframerClosed(AbstractClientStream.java:278)
	at io.grpc.okhttp.OkHttpClientStream$TransportState.deframerClosed(OkHttpClientStream.java:297)
	at io.grpc.internal.MessageDeframer.close(MessageDeframer.java:234)
	at io.grpc.internal.MessageDeframer.closeWhenComplete(MessageDeframer.java:192)
	at io.grpc.internal.AbstractStream$TransportState.closeDeframer(AbstractStream.java:201)
	at io.grpc.internal.AbstractClientStream$TransportState.transportReportStatus(AbstractClientStream.java:444)
	at io.grpc.okhttp.OkHttpClientTransport.startGoAway(OkHttpClientTransport.java:899)
	at io.grpc.okhttp.OkHttpClientTransport.-$$Nest$mstartGoAway(OkHttpClientTransport.java)
	at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1123)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
```
  • Loading branch information
ejona86 committed Sep 25, 2023
1 parent fec7c2e commit a004096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stub/src/main/java/io/grpc/stub/ClientCalls.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public final class ClientCalls {

@VisibleForTesting
static boolean rejectRunnableOnExecutor =
Strings.isNullOrEmpty(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE"))
|| Boolean.parseBoolean(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE"));
!Strings.isNullOrEmpty(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE"))
&& Boolean.parseBoolean(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE"));

// Prevent instantiation
private ClientCalls() {}
Expand Down

0 comments on commit a004096

Please sign in to comment.