Bug #1066
closedFrequent failure: test_io.rb test 2 on OS X 10.5.6
Description
=begin
Many times when I build the ruby trunk downloaded from http://svn.ruby-lang.org/repos/ruby/trunk the test_io.rb output is:
test_io.rb .F......................................................
and at the end of the tests there is this failure message:
#223 test_io.rb:11:in `<top (required)>':
begin
require "io/nonblock"
r, w = IO.pipe
w.nonblock = true
w.write_nonblock("a" * 100000)
w.nonblock = false
t1 = Thread.new { w.write("b" * 4096) }
t2 = Thread.new { w.write("c" * 4096) }
sleep 0.5
r.sysread(4096).length
sleep 0.5
r.sysread(4096).length
t1.join
t2.join
rescue LoadError
end
#=> not finished in 10 seconds [ruby-dev:32566]
FAIL 1/928 tests failed
make: *** [btest-ruby] Error 1
Maybe one time in twenty it succeeds, but I have not tried to check whether this is revision dependent. The latest revision I tested and which failed the test was 21852
=end
Files
Updated by yugui (Yuki Sonoda) almost 16 years ago
- Target version changed from 1.9.1 to 2.0.0
=begin
=end
Updated by rogerdpack (Roger Pack) almost 16 years ago
=begin
may be related to
http://redmine.ruby-lang.org/issues/show/703
=end
Updated by ko1 (Koichi Sasada) almost 16 years ago
- Assignee set to akr (Akira Tanaka)
- ruby -v set to -
=begin
=end
Updated by akr (Akira Tanaka) almost 16 years ago
- Assignee deleted (
akr (Akira Tanaka))
=begin
I couldn't find a problem in the test case.
So I think this is a Ruby bug.
However I cannot reproduce the problem on my GNU/Linux environment.
So assignment cleared.
=end
Updated by pedz (Perry Smith) almost 16 years ago
=begin
I got this also. I'm on Mac 10.5.6 running ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]
I don't understand what this test is trying to test. It does not make any sense to me. You fill the pipe with a's. So, the pipe is full. Then you try to write 4096 b's and 4096 c's. That is in blocking mode so it is going to block until there is space. You read only 8192 of space but the pipe may not be back enabled until you read more than that. I would read one byte at a time. Ignore the a's and count the b's and c's until it goes empty, then see if you got 4096 b's and c's.
assert_finish 10, %q{
begin
require "io/nonblock"
r, w = IO.pipe
w.nonblock = true
w.write_nonblock("a" * 100000)
w.nonblock = false
t1 = Thread.new { w.write("b" * 4096) }
t2 = Thread.new { w.write("c" * 4096) }
b_count = 0
c_count = 0
while c = r.sysread(1)
b_count += 1 if c == "b"
c_count += 1 if c == "c"
break if b_count == 4096 && c_count == 4096
end
t1.join
t2.join
rescue LoadError
end
}, '[ruby-dev:32566]'
=end
Updated by mikestok (Mike Stok) over 15 years ago
=begin
This failure still happens with ruby 1.9.2dev (2009-06-19 trunk 23741) [i386-darwin9.7.0] on OS X 10.5.7
ratdog:~ mike$ uname -a
Darwin ratdog.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
=end
Updated by naruse (Yui NARUSE) about 15 years ago
- Status changed from Closed to Feedback
=begin
Mike, this problem still reproduce?
=end
Updated by ujihisa (Tatsuhiro Ujihisa) about 15 years ago
- Assignee set to nobu (Nobuyoshi Nakada)
=begin
=end
Updated by kosaki (Motohiro KOSAKI) over 13 years ago
At least, My Mac OS X 10.6.7 can't reproduce this issue.
Updated by kosaki (Motohiro KOSAKI) over 13 years ago
- Status changed from Feedback to Rejected
I close this as Rejected since no feedback provided.
Please upgrade your OS.