From af74e4e47d543c5450bd0cf29a59e51d4940e020 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Tue, 26 May 2015 11:52:49 -0700 Subject: [PATCH 1/2] Updates gRPC Ruby to 0.9.0 --- src/ruby/lib/grpc/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 072fb9b1aa3..40b6df9a2b6 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.6.1' + VERSION = '0.9.0' end From 77e091ebac1850b7404ed99ba185e4520721b149 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 May 2015 13:07:21 -0700 Subject: [PATCH 2/2] Workaround: Prevent threads sitting in epoll forever --- src/core/iomgr/pollset_posix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index ab1af0d4eec..f496ac5bfa7 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -174,6 +174,8 @@ void grpc_pollset_del_fd(grpc_pollset *pollset, grpc_fd *fd) { int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline) { /* pollset->mu already held */ gpr_timespec now = gpr_now(); + /* FIXME(ctiller): see below */ + gpr_timespec maximum_deadline = gpr_time_add(now, gpr_time_from_seconds(1)); int r; if (gpr_time_cmp(now, deadline) > 0) { return 0; @@ -184,6 +186,11 @@ int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline) { if (grpc_alarm_check(&pollset->mu, now, &deadline)) { return 1; } + /* FIXME(ctiller): we should not clamp deadline, however we have some + stuck at shutdown bugs that this resolves */ + if (gpr_time_cmp(deadline, maximum_deadline) > 0) { + deadline = maximum_deadline; + } gpr_tls_set(&g_current_thread_poller, (gpr_intptr)pollset); r = pollset->vtable->maybe_work(pollset, deadline, now, 1); gpr_tls_set(&g_current_thread_poller, 0);