Feature #4243

[PATCH] DRb should not forefully close connections on DRb#stop_service

Added by zimba tm almost 6 years ago. Updated almost 4 years ago.



When DRb#stop_service is called, all connections get terminated by
calling Thread.kill on them. It means that all code that is invoked trough
DRb must be exception-safe. This poses the same kind of issues we have
with Kernel#timeout.

This patch changes the behavior or DRb to only kill the accepting
thread, so that no new connections are made. New queries are also
rejected. DRb#stop_service is synchronous and waits for all child-threads
to terminate.

Please note that this patch is quite old, so I may have forgotten some details
of it. It was posted on rubyforge at
The new version got imported into git and applies on top of ae3666b38fd723231c0bbc3c33f4603b6e0e0ef0 or svn r30363 (not sure about the patch format)

This patch can easily be back-ported to 1.8.x since drb.rb hasn't changed much.



#1 Updated by Usaku NAKAMURA almost 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to Masatoshi Seki



#2 [ruby-core:37428] Updated by Hiroshi Nakamura over 5 years ago

  • Target version changed from 1.9.2 to 1.9.3

#3 Updated by Yusuke Endoh over 5 years ago

  • Tracker changed from Bug to Feature

#4 [ruby-core:37995] Updated by Yusuke Endoh over 5 years ago

This ticket is a feature, not a bug. Moving to Feature tracker.
And the feature proposed introduces incompatibility. We have to
be careful about the ticket.

Yusuke Endoh

#5 [ruby-core:37996] Updated by Yusuke Endoh over 5 years ago

  • Target version changed from 1.9.3 to 2.0.0

#6 [ruby-core:48368] Updated by Koichi Sasada almost 4 years ago

  • Status changed from Assigned to Closed

I close this ticket. Seki-san said no such problem now.
Please re-open this ticket if the issue is not gone.

Also available in: Atom PDF