Project

General

Profile

Actions

Bug #1066

closed

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

Added by mikestok (Mike Stok) about 15 years ago. Updated over 12 years ago.

Status:
Rejected
Target version:
ruby -v:
-
Backport:
[ruby-core:21633]

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

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

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #2008: test_io.rb: test 2 fails on FreeBSDClosedakr (Akira Tanaka)08/27/2009Actions
Has duplicate Ruby master - Bug #1093: make test failsClosedakr (Akira Tanaka)02/03/2009Actions
Actions #1

Updated by yugui (Yuki Sonoda) about 15 years ago

  • Target version changed from 1.9.1 to 2.0.0

=begin

=end

Actions #3

Updated by ko1 (Koichi Sasada) about 15 years ago

  • Assignee set to akr (Akira Tanaka)
  • ruby -v set to -

=begin

=end

Actions #4

Updated by akr (Akira Tanaka) about 15 years ago

  • File 0 0 added

=begin

=end

Actions #5

Updated by akr (Akira Tanaka) about 15 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

Actions #6

Updated by akr (Akira Tanaka) about 15 years ago

  • Status changed from Open to Closed

=begin

=end

Actions #7

Updated by pedz (Perry Smith) about 15 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

Actions #8

Updated by mikestok (Mike Stok) almost 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

Actions #9

Updated by naruse (Yui NARUSE) over 14 years ago

  • Status changed from Closed to Feedback

=begin
Mike, this problem still reproduce?
=end

Actions #10

Updated by ujihisa (Tatsuhiro Ujihisa) over 14 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)

=begin

=end

Updated by kosaki (Motohiro KOSAKI) almost 13 years ago

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

Updated by kosaki (Motohiro KOSAKI) over 12 years ago

  • Status changed from Feedback to Rejected

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0