[#39052] Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yugui <yugui@...>

Redmine管理用プロジェクトに報告されてしまったので転送します。

12 messages 2009/08/09
[#39264] Re: Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yutaka Kanemoto <kinpoco@...> 2009/09/08

金本と申します。

[#39107] [Bug #1952] cannot stop with Ctrl+C — Usaku NAKAMURA <redmine@...>

Bug #1952: cannot stop with Ctrl+C

14 messages 2009/08/18

[#39167] [Bug #2000] Change the license to "GPLv2+ or Ruby's original". — Mamoru Tasaka <redmine@...>

Bug #2000: Change the license to "GPLv2+ or Ruby's original".

11 messages 2009/08/26

[#39193] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...>

In article <200908281827.n7SIRbaX003476@ci.ruby-lang.org>,

16 messages 2009/08/29
[#39194] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39195] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a988633.9553f10a.4496.483e@mx.google.com>,

[#39196] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39197] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a989f76.1602be0a.3de4.1131@mx.google.com>,

[#39198] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Yukihiro Matsumoto <matz@...> 2009/08/29

まつもと ゆきひろです

[#39206] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/31

なかだです。

[ruby-dev:39037] Re: [Bug #1848] Net::SSH hangs

From: akira yamada / やまだあきら <akira@...>
Date: 2009-08-07 01:02:51 UTC
List: ruby-dev #39037
Tanaka Akira さんは書きました:
> Net::SSH の問題は手元では再現しないので、この問題の状況はよ
> くわかりません。

以下で、おそらく同じと思われる現象が起きます。
手元では実行ごとに毎回発生していますが、
もしかすると何度か実行すると〜かもしれません。

------------------------------------------------------------------------------
th = []

2.times do
  th << Thread.new do
    open("/dev/zero") do |i|
      loop do
        r, = IO.select([i], [], [], 0)
        if r
          p i.read(1)
          break
        end
      end
    end
  end
end

th.each {|t| t.join }
------------------------------------------------------------------------------

参考になるかどうかわかりませんがdebug printを入れてみました。
先頭が行番号です。

11249     /* Do the select if needed */
11250 fprintf(stderr,"%4d) need_select=%d\n",__LINE__,need_select);    if (need_select) {
11251         /* Convert delay to a timeval */
...
11267         n = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
11268 fprintf(stderr,"%4d) n=%d\n",__LINE__,n);       if (n < 0) {
11269             int e = errno;
...
11361                     th_found = th;
11362 fprintf(stderr,"%4d) th_found=%d\n",__LINE__,th);                   found = 1;
11363                     break;
...
11369                     th_found = th;
11370 fprintf(stderr,"%4d) th_found=%d\n",__LINE__,th);                    found = 1;
11371                     break;
...
11386         }
11387 fprintf(stderr,"%4d) th=%d th_found=%d\n",__LINE__,th,th_found);        if ((th->status == THREAD_RUNNABLE || th == th_found) && th->stk_ptr) {
11388             if (!next || next->priority < th->priority) {
11389 fprintf(stderr,"%4d) next=th\n",__LINE__);              next = th;
11390             }

実行結果はこんな感じになります。
(使用したのはruby 1.8.8dev (2009-08-06 revision 24416) [i686-linux]です)

11250) need_select=1
11268) n=1
11370) th_found=142481000
11387) th=142326496 th_found=142481000
11389) next=th
11387) th=142481000 th_found=142481000
11250) need_select=1
11268) n=1
11370) th_found=142490464
11387) th=142481000 th_found=142490464
11389) next=th
11387) th=142326496 th_found=142490464
11387) th=142490464 th_found=142490464
11250) need_select=1
11268) n=1
11370) th_found=142481000
11387) th=142326496 th_found=142481000
11389) next=th
11387) th=142490464 th_found=142481000
11387) th=142481000 th_found=142481000
...

1.8.7-p35でも現象が発生します。1.8.7-p{72,134}と1.9.0-p0ではすぐに終了します。
-- 
やまだ

In This Thread