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 library crashes when start watching cronet channel state #16381
Comments
@mqingli - Did it work for you before? The C++ API surprises me a bit since I thought on grpc c++ Cronet just links to a dummy interface. How are you linking Cronet? @gcasto - I see you added the c++ API a while ago. Is it supposed to work? Is it not using this fake interface on github? |
@muxi thanks for your response. we linked with grpc.a, grpc++.a, grpc_cronet.a and grpc++_cronet.a in our C++ library. RPC call via cronet channel works. But grpc library errored out or crashed as long as we call cronet channel's NotifyOnStateChange or getState.Briefly checked the related grpc library code, looks like cronet channel has the GRPC_CLIENT_DIRECT_CHANNEL type. It doesn't not registered with grpc_client_channel_filter filter, which handles channel state. If this doesn't work, I'm wondering any alternative way that we can watch cronet channel state? |
Thanks for the info. It is interesting to see rpc call works. You are right that direct channel is not associated with client channel filter since the channel is not a gRPC managed channel. Cronet manages channels by itself which is transparent to gRPC. Cronet API does not provide that information. If you could share us your crash stack with us, we might confirm that was the reason of the crash and make the API work better than simply crashing, but I'm afraid the channel state information is not available. |
Hi @muxi , sorry for the late reply. Here is the crash stack from grpc library. #0 0x000000018381d2e0 in __pthread_kill ()
|
Sorry for missing the message for so long, but (as you probably already find out) Cronet does not support the connectivity_state watch. Closing this issue unless there's other concern being raised. |
What version of gRPC and what language are you using?
v1.11.0 C++
What operating system (Linux, Windows, …) and version?
IOS 11.4.1
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc Apple LLVM version 9.1.0 (clang-902.0.39.2)
What did you do?
If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.
create a cronet channel and call its NotifyOnStateChange to watch channel state:
What did you expect to see?
NotifyOnStateChange returns the tag on cq when the channel state is changed or deadline expires.
What did you see instead?
app crashes at https://github.com/grpc/grpc/blob/master/src/core/ext/filters/client_channel/channel_connectivity.cc#L246
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment?
The code is called in C++ native library from IOS app.
The text was updated successfully, but these errors were encountered: