From: Eric Wong Date: 2019-01-04T13:20:23+00:00 Subject: [ruby-core:90887] Re: [Ruby trunk Bug#15499] Breaking behavior on ruby 2.6: rb_thread_call_without_gvl doesn't invoke unblock_function when used on the main thread Eric Wong wrote: > apolcyn@google.com wrote: > > Thanks for the quick look! I didn't get a chance to try out > > UBF_TIMER=2 before your last comment, but let me know if > > there's something else to try. > > Sorry for the breakage. For now, you can workaround this > breakage by spawning a do-nothing thread to handle signals: r66708 should fix the breakage in your particular case. Again, deeply sorry for the breakage. > Thread.new { sleep } > > I'm slowly working on a permanent fix which won't increase > overhead for the majority of use cases. So r66708 uses a short-lived thread and thread-cache to avoid permanent overhead. r66712 introduces an experimental new API (rb_nogvl) which allows C-API users to fire some unblock functions in signal handlers. It won't affect grpc's case, but it affects zlib and bignum in core, at least. It turns out zlib and bignum had the same problem you encountered; but I missed them. Unsubscribe: