-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Ruby client hangs on Windows #17799
Description
What version of gRPC and what language are you using?
- grpc-1.18.0-x64-ming32 gem (Tested 1.18.0 through to 1.8.0, the behavior is likely consistent on earlier versions.)
What operating system (Linux, Windows, …) and version?
- Windows 10
What runtime / compiler are you using (e.g. python version or version of gcc)
- ruby 2.5, 2.4, 2.3 (all 64bit)
What did you do? What did you expect to see? What did you see instead?
GitHub issue googleapis/google-cloud-ruby#2826 reports that a ruby process hangs after successfully calling the Vision API using the Ruby gRPC client. We have investigated this and have successfully reproduced a hung ruby processes by only creating a GRPC::Core::CallCredentials object. It hangs even though a service stub object is never created, much less used to make an API call.
I have reduced the steps to demonstrate the hung process and posted the needed files to this gist. You should be able to reproduce by cloning the gist locally, adding the path to a service credentials JSON file, and running bundle update and bundle exec rake.
You can uncomment the GRPC_VERBOSITY and GRPC_TRACE lines in repro.rb to get more information. I have occasionally seen the script exit cleanly with those lines uncommented, but I have never seen the script exit cleanly when all of the other code in the file is also uncommented.
We have also seen numerous Kokoro CI jobs fail on Windows due to the build timing out. We have never has a successful build on Windows due to these timeouts AFAIK.
Anything else we should know about your project / environment?
I have reproduced this on a clean Windows 10 PC. I installed Ruby by downloading it from here: https://rubyinstaller.org/downloads/ No other compilers or environment variables have been added to this PC. It does not have the gRPC project, any compilers installed, or any custom environment variables set. Only the pre-compiled Ruby gems were used.