[Ruby 1.9-Bug#4157][Open] test pty で、たまに出る Failure

Bug #4157: test_pty で、たまに出る Failure
http://redmine.ruby-lang.org/issues/show/4157

起票者: Makoto K.
ステータス: Open, 優先度: Low
ruby -v: ruby 1.9.3dev (2010-12-14 trunk 30206) [x86_64-freebsd8.2]

amd64 FreeBSD8 でも #4121 が起きることがあるのですが、
while で $ while make test-all TESTS=“test_pty.rb” ; do : ; done
のように実行していると、他の Failure がたまに起きます。
以下のように、どれも、期待した文字列の代わりに nil が返っています。

  1. Failure:
    test_argv0(TestPTY)
    [/export/home/ksmakoto/ruby-git/test/test_pty.rb:45]:
    <“bar\r\n”> expected but was
    .

  2. Failure:
    test_commandline(TestPTY)
    [/export/home/ksmakoto/ruby-git/test/test_pty.rb:36]:
    <“foo\r\n”> expected but was
    .

  3. Failure:
    test_spawn_with_block(TestPTY)
    [/export/home/ksmakoto/ruby-git/test/test_pty.rb:26]:
    <“b\r\n”> expected but was
    .

  4. Failure:
    test_spawn_without_block(TestPTY)
    [/export/home/ksmakoto/ruby-git/test/test_pty.rb:19]:
    <“a\r\n”> expected but was
    .

チケット #4157 が更新されました。 (by Makoto K.)

%ruby で CPU 数が影響してるのかも、とコメントをいただいたので、cpuset -l 0 で実行して
みたところ、#4121 が確実に起きるようになり、(test_getpty_nonexistent をコメントアウトして
実行すると)逆にこの報告の Failure は出なくなりました。4 コアマシンです。

チケット #4157 が更新されました。 (by Makoto K.)

手元でビルド可能な最古の trunk の r21509 でも起きました。

$B$,$5$4$=$d$C$F$$$F$A$g$C$H5$$K$J$C$?$N$G$9$,!"(B

PTY.getpty $B$N(B rdoc $B$K$O!“5?;wC<Kv$N%^%9%?!<%G%P%$%9$K$D$J$,$C$?(B
r $B$H(B w
$B$N%*%V%8%’%/%H$,(B IO $B$H=q$+$l$F$$$^$9$,!”%3!<%I$N$[$&$O(B File
[email protected]@.$7$F(B
$B$$$^$9!#(B

$B$-$7$b$H$G$9(B

PTY
$B$K$D$$$F$G$9$,!"$5$i$K$$$/$D$+5$$K$J$C$?$N$G!"Cf4V$^$H$a$r:n$j$^$9!#(B

$B!&!J$k$j$^!K(B1.9.2 $B$G(B protect_signal
$B$,:o=|$5$l$?$3$H$KBP1~$7$F$$$J$$(B
$B!&!J$k$j$^!K(B1.9.2 ($B!)(B) $B$G(B SIGCHLD
$B$NJaB*$r$*$3$J$o$J$/$J$C$?$3$H$K(B
$B!!BP1~$7$F$$$J$$(B
$B!&(BPTY.check $B$rBhFs0z?t(B raise=true
$B$G<B9T$9$k$H!";R%W%m%;%9$,<B9TCf$G$b(B
$B!!(BPTY::ChildExited $B$,H/@8$9$k!J$3$l$OJL7o$G%P%0!)!K(B

$B!V%F%9%H$,$?$^$K(B fail$B!W$N860x$O!"(Bktrace $B$7$F$_$k$H(B read
$B$N;[email protected]$GFI$a$F(B
$B$J$$!"$H$$$&$3$H0J30!“3’L\DO$a$J$$$N$G$9$,!”(BPTY.open $B$H(B
Kernel#spawn
$B$rAH$_9g$o$;$FF1$8$3$H$r$d$C$?>l9g$OLdBj$,=P$J$$$h$&$G$9$7!"(BKernel#spawn
$B$N?7$7$$5!G=$r;H$($P(B PTY#getpty$B!J(BPTY#spawn$B!K$HF1$8$3$H$O(B
PTY.open $B$H(B
$BAH$_9g$o$;$F4JC1$K$G$-$k$N$G!"(BPTY#getpty $B$O(B deprecated
$B$H$7$F!"(B
2.0$B!J$+(B 1.9.5 $B!)!K$G:o=|$7$F$7$^$&!"$3$H$rDs0F$7$^$9!#(B

2011$BG/(B10$B7n(B12$BF|(B9:03 KISHIMOTO, Makoto
[email protected]:

$B!V%F%9%H$,$?$^$K(B fail$B!W$N860x$O!"(Bktrace $B$7$F$_$k$H(B read
$B$N;[email protected]$GFI$a$F(B
$B$J$$!"$H$$$&$3$H0J30!“3’L\DO$a$J$$$N$G$9$,!”(BPTY.open $B$H(B Kernel#spawn
$B$rAH$_9g$o$;$FF1$8$3$H$r$d$C$?>l9g$OLdBj$,=P$J$$$h$&$G$9$7!"(BKernel#spawn
$B$N?7$7$$5!G=$r;H$($P(B PTY#getpty$B!J(BPTY#spawn$B!K$HF1$8$3$H$O(B PTY.open
$B$H(B
$BAH$_9g$o$;$F4JC1$K$G$-$k$N$G!"(BPTY#getpty $B$O(B deprecated $B$H$7$F!"(B
2.0$B!J$+(B 1.9.5 $B!)!K$G:o=|$7$F$7$^$&!"$3$H$rDs0F$7$^$9!#(B

$BF1$8$3$H$,$G$-$k$H$$$&$N$O;v<B8mG’$G$9!#(B

$B>/$J$/$H$b(B PTY.open $B$H(B spawn
[email protected])8fC<[email protected]_Dj$9$k5!G=$,$"$j$^$;$s!#(B

$B$-$7$b$H$G$9(B

$BF1$8$3$H$,$G$-$k$H$$$&$N$O;v<B8mG’$G$9!#(B

$B>/$J$/$H$b(B PTY.open $B$H(B spawn
[email protected])8fC<[email protected]_Dj$9$k5!G=$,$"$j$^$;$s!#(B

$B$o$+$j$^$7$?!#(Bdeprecated $B0J9_$K$D$$$F$NDs0F$O0lC6$R$C$3$a$^$9!#(B

$B$"$H!"$k$j$^$N5-=R$r3NG’$7$F$$$C$?$H$3$m!“3NG’$7$-$l$J$+$C$?$N$G!”(B
$B$I$J$?$+$o$+$k$+$?$K<ALd$7$?$$$N$G$9$,!"(B

$B;R%W%m%;%9$N>uBV$r4F;k$9$k$?$a$K(B SIGCHLD $B%7%0%J%k$rJaB*$7$^$9!#(B
$B$3$N5-=R$,@5$7$$$N$O$$$D:"$^$G$G$7$g$&$+!)(B

$B;R%W%m%;%9$,=*N;$7$?$jDd;_$7$?>l9g$K$O!“Nc30(B PTY::ChildExited
$B$,H/@8$7$^$9!#(B
$B%V%m%C%/IU$-$N>l9g!”(B1.8 $B$H(B 1.9.1 r33056
$B$G$OH/@8$7$^$9$,!"(B1.9.2 r32926 $B$G$O(B
$BH/@8$7$^$;$s!#%V%m%C%/$J$7$N>l9g!"(B1.9.1 $B$G$bH/@8$7$^$;$s!#(B

$B$3$N4V!"$9$Y$F$N(B SIGCHLD $B$,(B PTY
$B%b%8%e!<%k$N%7%0%J%k%O%s%I%i$KJaB*$5$l$k$N$G!"(B
$B%5%V%W%m%;%[email protected]@.$9$kB>$N%a%=%C%I(B(Kernel.#system $B$d(B
IO.popen$B$J$I(B)$B$r;H$&$H!"(B
$BM=4|$7$J$$Nc30$,H/@8$9$k$3$H$,$"$j$^$9!#(B
1.8 $B$G$b3NG’$G$-$^$;$s$G$7$?!#(B
protect_signal $B$,(B obsolete $B$H$J$C$?$N$O(B r1666
$B$H$$$&Hs>o$K8E$$%j%S%8%g%s(B
$B$N$h$&$J$N$G!"[email protected]$$$V8E$$$3$H$G$7$g$&$+!)(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs