Project

General

Profile

Actions

Bug #8039

closed

DRB/dRuby server throws an exception when probed on its port

Bug #8039: DRB/dRuby server throws an exception when probed on its port

Added by kimptoc (Chris Kimpton) over 12 years ago. Updated about 6 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.3-p392 and jruby 1.7.3
Backport:
[ruby-core:53186]

Description

I am not sure if this is a bug or a feature ...

When I use nmap to probe the port that the DRB server is listening on, it throws an exception.

Should the server be more resilient to this and/or have an option to restart itself automatically?

Or is the last code sample I give the suggested usage.

See this stackoverflow issue for sample code and little more info - http://stackoverflow.com/questions/15256619/druby-server-crashes-when-probed-on-the-port-its-listening-on?noredirect=1#comment21525295_15256619

Thanks,
Chris


Files

drb.socket_shutdown_fix.patch (1.03 KB) drb.socket_shutdown_fix.patch drbrain (Eric Hodel), 03/11/2013 01:43 PM
drb-sockopt-8039.patch (1.57 KB) drb-sockopt-8039.patch jeremyevans0 (Jeremy Evans), 08/08/2019 10:45 PM

Updated by drbrain (Eric Hodel) over 12 years ago Actions #1 [ruby-core:53246]

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to seki (Masatoshi Seki)

Updated by drbrain (Eric Hodel) over 12 years ago Actions #2 [ruby-core:53313]

This patch fixes the bug.

Updated by hsbt (Hiroshi SHIBATA) over 11 years ago Actions #3 [ruby-core:60284]

  • Target version changed from 2.1.0 to 2.2.0

Updated by naruse (Yui NARUSE) almost 8 years ago Actions #4

  • Target version deleted (2.2.0)

Updated by jeremyevans0 (Jeremy Evans) about 6 years ago Actions #5 [ruby-core:94208]

This bug is still present in the master branch. I've updated drbrain's patch to apply to the master branch, including adding some additional exceptions to rescue.

Updated by jeremyevans (Jeremy Evans) about 6 years ago Actions #6

  • Status changed from Assigned to Closed

Applied in changeset git|567e312d1f56c27ecb4fa20deac4311f05ee5507.


Do not raise an exception on a closed DRb socket

This rescues some exceptions that could happen with a closed or
shutdown DRb socket. This can prevent the server from
exiting if an client socket is closed directly after it is
accepted.

Fixes [Bug #8039]

Actions

Also available in: PDF Atom