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

grpc-binder: Failed sending oob close transaction #10816

Closed
CCint3 opened this issue Jan 11, 2024 · 3 comments · Fixed by #10899
Closed

grpc-binder: Failed sending oob close transaction #10816

CCint3 opened this issue Jan 11, 2024 · 3 comments · Fixed by #10899
Assignees
Milestone

Comments

@CCint3
Copy link

CCint3 commented Jan 11, 2024

What version of gRPC-Java are you using?

grpc-core: 1.60.1
grpc-stub: 1.60.1
grpc-api: 1.60.1
grpc-binder: 1.60.1

What is your environment?

Android 12

What did you expect to see?

What did you see instead?

When the client process is forcibly killed, the following error occurs in the server process.

How should this error be handled? If there is no need to handle it, can the log be hidden?

BinderTransport: Failed sending oob close transaction
BinderTransport: io.grpc.StatusException: UNAVAILABLE
BinderTransport: 	at io.grpc.Status.asException(Status.java:545)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport.sendTransaction(BinderTransport.java:400)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport.sendOutOfBandClose(BinderTransport.java:412)
BinderTransport: 	at io.grpc.binder.internal.Inbound.closeAbnormal(Inbound.java:293)
BinderTransport: 	at io.grpc.binder.internal.Inbound.closeAbnormal(Inbound.java:280)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport.lambda$shutdownInternal$0(BinderTransport.java:317)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport.$r8$lambda$oQtV0cIJ7P07ABal1DZ4FIrGE8U(BinderTransport.java:0)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
BinderTransport: 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
BinderTransport: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
BinderTransport: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
BinderTransport: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
BinderTransport: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
BinderTransport: 	at java.lang.Thread.run(Thread.java:920)
BinderTransport: Caused by: android.os.DeadObjectException
BinderTransport: 	at android.os.BinderProxy.transactNative(Native Method)
BinderTransport: 	at android.os.BinderProxy.transact(BinderProxy.java:571)
BinderTransport: 	at io.grpc.binder.internal.OneWayBinderProxy.transactAndRecycleParcel(OneWayBinderProxy.java:107)
BinderTransport: 	at io.grpc.binder.internal.OneWayBinderProxy$OutOfProcessImpl.transact(OneWayBinderProxy.java:97)
BinderTransport: 	at io.grpc.binder.internal.BinderTransport.sendTransaction(BinderTransport.java:398)
BinderTransport: 	... 12 more

Steps to reproduce the bug

During grpc communication, forcefully killing the client process...

@ejona86
Copy link
Member

ejona86 commented Jan 11, 2024

Looks like that failure would be expected when the remote process dies. We've had similar issues with the Netty server extra logging on connection close. Right now I think we log errors like this at a finer log level with Netty. Might want to do the same here.

CC @jdcormie @markb74

@jdcormie
Copy link
Member

Agreed that DeadObjectException can be expected at runtime and is already correctly exposed to the app to handle programmatically. No reason to spew a huge back trace to the log or anything at all really (anti pattern 5 at https://rolf-engelhard.de/2013/04/logging-anti-patterns-part-ii/)

@markb74
Copy link
Contributor

markb74 commented Jan 19, 2024

+1 to logging at a much finer level.

@sergiitk sergiitk added this to the 1.62 milestone Jan 23, 2024
larry-safran added a commit to larry-safran/grpc-java that referenced this issue Feb 6, 2024
larry-safran added a commit that referenced this issue Feb 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants