[#41918] [Feature #3647] Array#sample(n, replace=false) — Kenta Murata <redmine@...>

Feature #3647: Array#sample(n, replace=false)

11 messages 2010/08/03

[#41966] [Bug #3673] PTY.getpty with IO.pipe doesn't finish on FreeBSD — Yui NARUSE <redmine@...>

Bug #3673: PTY.getpty with IO.pipe doesn't finish on FreeBSD

9 messages 2010/08/10

[#41969] [Feature #3675] String#prepend, String#>> — Sora Harakami <redmine@...>

Feature #3675: String#prepend, String#>>

15 messages 2010/08/10
[#41976] Re: [Feature #3675] String#prepend, String#>> — Yukihiro Matsumoto <matz@...> 2010/08/10

まつもと ゆきひろです

[#41974] Re: [ruby-cvs:36157] Ruby:r28955 (trunk): * complex.c (nucomp_to_[ifr]): don't allow complex with in-exact — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

7 messages 2010/08/10

[#42003] WEBrickに関するセキュリティ修正 (CVE-2010-0541) — Hideki Yamane <henrich@...>

12 messages 2010/08/11

[#42090] Math::atan2(0, 0) on ruby 1.9.2 — KUBO Takehiro <kubo@...>

久保です。

18 messages 2010/08/22
[#42092] Re: Math::atan2(0, 0) on ruby 1.9.2 — Kenta Murata <muraken@...> 2010/08/22

=1B$B$`$i$?$G$9!#=1B(B

[#42166] Ruby'sライセンスの、BSDLとのデュアルライセンスへの変更 — "NARUSE, Yui" <naruse@...>

Ruby's ライセンスは BSDL と Ruby's のデュアルライセンスになります。

14 messages 2010/08/31

[ruby-dev:41967] [Bug #3674] dRuby サーバプロセスを停止する時に時間がかかることがある

From: Tomoyuki Chikanaga <redmine@...>
Date: 2010-08-10 06:26:35 UTC
List: ruby-dev #41967
Bug #3674: dRuby サーバプロセスを停止する時に時間がかかることがある
http://redmine.ruby-lang.org/issues/show/3674

起票者: Tomoyuki Chikanaga
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.9.3dev (2010-08-05 trunk 28840) [i686-linux]

CentOS release 5.4 Linux のマシンで dRuby のサーバプロセスを停止させる時に CPU 利用した状態で
数秒から十数秒程度時間がかかることがあります。
Redhat Enterprise Linux, Ubuntu 8.10, openSUSE 11.1 等の他の環境で同じものを動かしていますが
今のところこの現象がみられるのは CentOS のところだけのようです。
(CPU の種類/速度や libpthread のバージョンも異なるのでその影響もあるかもしれません)

たとえば以下のようなサンプルでも稀に発生します。

* server.rb
require "drb"

class S
  def m1
    puts "S#m1 called"
    sleep 10
  end
end

begin
  front = S.new
  uri = ARGV[0] || "druby://localhost:0"
  puts DRb.start_service(uri, front).uri

  DRb.thread.join
rescue Interrupt
ensure
  DRb.stop_service
end

* client.rb
require "drb"

obj = DRbObject.new_with_uri ARGV[0]
obj.m1

* 実行例
$ ruby server.rb druby://localhost:10000
druby://localhost:10000
S#m1 called
 <- Ctrl-C で中断

(別端末で実行)
$ ruby client.rb druby://localhost:10000

発生した時に gdb attach してみると DRbServer#kill_sub_thread で dRuby 要求を処理している
Thread を kill して回っているところで止まっているようです。
以下のように Thread.pass を挿入すると発生しなくなりました。

Index: lib/drb/drb.rb
===================================================================
--- lib/drb/drb.rb      (revision 28880)
+++ lib/drb/drb.rb      (working copy)
@@ -1421,6 +1421,7 @@
          list.each do |th|
            th.kill if th.alive?
          end
+         Thread.pass
          list = @grp.list
        end
       end


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next