-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Cannot stop python client with Ctrl-C #3820
Comments
Thanks for the report. I see you're calling |
Hi, I cloned gRPC git repository and checked out release-0_11_1 tag, and then compiled and installed in an Ubuntu 14.04 VM. Is there any solution or measure to analyze for this? Thank you |
I'm also seeing this problem with my Python client. Here's my code https://gist.github.com/kyleconroy/9c2ba448d46f2ec93900 |
We are also seeing this problem (Python2.7, beta API) for both client and server. Client side is easier to trigger. It seems to have something to do with internal broken connection objects that lingered around and causing destructor to block wait forever. |
@nathanielmanistaatgoogle what's the status of this issue? |
@hsaliak I expect it to be resolved this quarter; likely before mid-May. |
still not fixed in 0.14.0. |
+1 Definitely still not fixed in HEAD. |
@jaytaylor: while working on this we've been finding several causes of it rather than just one. Please go into more detail - platform, Python version, gRPC commit point, and if possible code to reproduce? |
hi I think this is easy to find the code to reproduce, I wrote the code here GuoJinghttp://guojing.me http://guojing.me/
|
@kpayson64 Thanks! I can confirm that the indefinite hang-on-exit I've seen with
|
Ctrl + C can not make the client to exit with
|
@kpayson64 Is it still a issue on the master branch? |
@zj8487 |
I'm still having this issue with |
@kpayson64 that actually looks exactly like the problem I'm having. |
@minhaz1: as the person who wrote that leaving the problem in place is "highly unlikely to have any effect in the real world", I'd be curious to hear more about how significant an obstacle it is for you. Also what is it that has you using Python 2.7? |
@nathanielmanistaatgoogle Just a friendly aside, which versions of Python is gRPC supported for? I thought 2.7 was in the set of supported versions. |
@hsaliak Fair enough, but it would be nice to add another column to the Repository Structure & Status table, and listing the supported versions for each language. |
@nathanielmanistaatgoogle what I am working on is going to be an internal library and consumers of the library will most likely be running as python 2.x. It isn't really a huge issue, as it does still handle other signals like SIGTERM correctly. It just made it inconvenient for testing things locally because I would have to Ctrl-Z + and kill %%. I just added a signal handler for my test client code to handle SIGINT and then send SIGTERM to the current process so I can Ctrl-C for local testing. |
@minhaz1: good to know and thank you for sharing. |
@hsaliak Thank you - very appreciated. |
@minhaz1: you can just ctrl+\ to kill a process. If that doesnt work, try On Tue, 2 Aug 2016, 09:16 Paul Grosu, notifications@github.com wrote:
|
I'm using grpc stream between a server process implemented by Golang and a client process in Python.
The client can receive values from the server with the stream. However when it comes to disconnecting from the client, it doesn't work well.
I made sample programs using the stream like below.
https://gist.github.com/yokoi-h/06ab4d802fa918884d38
Components in the sample program are as follows.
If client1 sends count to server, then client2 can receive total count via the server.
But when hit Ctrl-C to quit client2 in the terminal, it's blocked and not possible to quit except using kill.
I would like to know how to finish a client that is reading stream with Ctrl-C.
If you can provide the example to stop with Ctrl-C, it would be great.
Thank you
The text was updated successfully, but these errors were encountered: