-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Unhandled java.lang.NullPointerException: bio == null in io.grpc.okhttp.internal.framed.Http2$Reader.close #10800
Comments
@temawi - preliminary investigation shows it's legit, please take a look at this code path: grpc-java/okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java Lines 1129 to 1133 in 516f411
Would it make sense to do another catch block and check the description to be |
Probably no harm in doing that, but there's just one thing I'm wondering about. The Conscrypt bug mentions that this problem can occur on Android 9 or 10, but this issue mentions it also happening on Android 12. @ezrafernandez-toast Can you confirm that you really are seeing this on Android 12 devices as well? |
The majority of occurrences are on lower versions, with < 10% of reports on Android 12. I suppose it's possible the Conscrypt module has not updated on those devices? |
I could buy that. We can get this change in to v1.61.0 that is releasing in the next few days, but there would not be patch release for v1.47.0 that you are using. Is this actually causing you problems besides the occasional error message? The connection is already closed so hopefully you are not seeing any actual failed RPCs. |
I can nudge the team to update to 1.61. Our issue tracker reports these as fatal crashes. |
What version of gRPC-Java are you using?
1.47.0
What is your environment?
Android 8, 9, 10, 12.
What did you expect to see?
When the underlying socket fails to close, possibly due to a race condition where it's already been closed, handle the thrown NPE.
What did you see instead?
An NPE is thrown and causes a crash.
https://issuetracker.google.com/issues/177450597
https://github.com/square/okhttp/pull/6533/files#diff-f88f9ac1ee194722f304572130663d2ba659e6e571fbc6dbfc6e639afe4003a4R502
Steps to reproduce the bug
Stack from a production report haven't been able to reproduce locally.
The text was updated successfully, but these errors were encountered: