Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E/AndroidRuntime: FATAL EXCEPTION: grpc-okhttp-2 #6584

Closed
sujeet-kumar-mehta opened this issue Jan 6, 2020 · 3 comments
Closed

E/AndroidRuntime: FATAL EXCEPTION: grpc-okhttp-2 #6584

sujeet-kumar-mehta opened this issue Jan 6, 2020 · 3 comments

Comments

@sujeet-kumar-mehta
Copy link

sujeet-kumar-mehta commented Jan 6, 2020

What version of gRPC-Java are you using?

1.26.0

What is your environment?

MacOS, Android Studio

What did you expect to see?

What did you see instead?

Steps to reproduce the bug

Using grpc as it is required in com.google.cloud:google-cloud-speech:1.22.0 . When doing the speech recognition the crash is coming sometime.

  1. Start the Speech Recognition than it will stop with this crash
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@71f2fe9 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@a217070[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
        at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:334)
        at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
        at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:654)
        at io.grpc.internal.SerializingExecutor.schedule(SerializingExecutor.java:93)
        at io.grpc.internal.SerializingExecutor.execute(SerializingExecutor.java:86)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closedInternal(ClientCallImpl.java:707)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closed(ClientCallImpl.java:657)
        at io.grpc.internal.DelayedStream$DelayedStreamListener$5.run(DelayedStream.java:475)
        at io.grpc.internal.DelayedStream$DelayedStreamListener.delayOrExecute(DelayedStream.java:417)
        at io.grpc.internal.DelayedStream$DelayedStreamListener.closed(DelayedStream.java:472)
        at io.grpc.internal.ForwardingClientStreamListener.closed(ForwardingClientStreamListener.java:39)
        at io.grpc.internal.InternalSubchannel$CallTracingTransport$1$1.closed(InternalSubchannel.java:661)
        at io.grpc.internal.AbstractClientStream$TransportState.closeListener(AbstractClientStream.java:471)
        at io.grpc.internal.AbstractClientStream$TransportState.access$400(AbstractClientStream.java:233)
        at io.grpc.internal.AbstractClientStream$TransportState$1.run(AbstractClientStream.java:454)
        at io.grpc.internal.AbstractClientStream$TransportState.deframerClosed(AbstractClientStream.java:290)
        at io.grpc.internal.Http2ClientStreamTransportState.deframerClosed(Http2ClientStreamTransportState.java:31)
        at io.grpc.okhttp.OkHttpClientStream$TransportState.deframerClosed(OkHttpClientStream.java:313)
        at io.grpc.internal.MessageDeframer.close(MessageDeframer.java:229)
        at io.grpc.internal.MessageDeframer.closeWhenComplete(MessageDeframer.java:191)
        at io.grpc.internal.AbstractStream$TransportState.closeDeframer(AbstractStream.java:183)
        at io.grpc.internal.AbstractClientStream$TransportState.transportReportStatus(AbstractClientStream.java:457)
        at io.grpc.okhttp.OkHttpClientTransport.startGoAway(OkHttpClientTransport.java:870)
        at io.grpc.okhttp.OkHttpClientTransport.access$1600(OkHttpClientTransport.java:107)
        at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1096)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
@voidzcy
Copy link
Contributor

voidzcy commented Jan 6, 2020

Can you provide us a minimal example to reproduce this issue?

@voidzcy voidzcy added this to the Unscheduled milestone Jan 8, 2020
@ejona86
Copy link
Member

ejona86 commented Mar 26, 2020

This looks similar to googleapis/google-cloud-java#5810, although that should have been fixed in 1.22.0 as that version depends on gax-java 1.50.1, and the bug was fixed in 1.49. Since you are using Android Studio I assume you are using Gradle, and Gradle would get those versions right.

This error generally is caused by a bug in something using gRPC. Any scheduledExecutors should be kept running until the ManagedChannel is terminated, not just shutdown.

@ejona86 ejona86 removed this from the Unscheduled milestone Mar 26, 2020
@ejona86 ejona86 removed the bug label Mar 27, 2020
@creamsoup
Copy link
Contributor

closing it due to inactivity, please feel free to reopen if you have any follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants