Bug #1066

Frequent failure: test_io.rb test 2 on OS X 10.5.6

Added by Mike Stok about 6 years ago. Updated over 3 years ago.

[ruby-core:21633]
Status:Rejected
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:- Backport:

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 `':
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
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

0 - printf-debug.patch (2.27 KB) Akira Tanaka, 02/03/2009 05:50 PM


Related issues

Related to Ruby trunk - Bug #2008: test_io.rb: test 2 fails on FreeBSD Closed 08/27/2009
Duplicated by Ruby trunk - Bug #1093: make test fails Closed 02/03/2009

History

#1 Updated by Yuki Sonoda about 6 years ago

  • Target version changed from 1.9.1 to 2.0.0

=begin

=end

#2 Updated by Roger Pack about 6 years ago

=begin
may be related to
http://redmine.ruby-lang.org/issues/show/703
=end

#3 Updated by Koichi Sasada about 6 years ago

  • Assignee set to Akira Tanaka
  • ruby -v set to -

=begin

=end

#4 Updated by Akira Tanaka about 6 years ago

  • File 0 added

=begin

=end

#5 Updated by Akira Tanaka about 6 years ago

  • Assignee deleted (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

#6 Updated by Akira Tanaka about 6 years ago

  • Status changed from Open to Closed

=begin

=end

#7 Updated by Perry Smith almost 6 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
}, ''

=end

#8 Updated by Mike Stok over 5 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

#9 Updated by Yui NARUSE over 5 years ago

  • Status changed from Closed to Feedback

=begin
Mike, this problem still reproduce?
=end

#10 Updated by ujihisa . about 5 years ago

  • Assignee set to Nobuyoshi Nakada

=begin

=end

#11 Updated by Motohiro KOSAKI over 3 years ago

At least, My Mac OS X 10.6.7 can't reproduce this issue.

#12 Updated by Motohiro KOSAKI over 3 years ago

  • Status changed from Feedback to Rejected

I close this as Rejected since no feedback provided.
Please upgrade your OS.

Also available in: Atom PDF