[#81492] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — normalperson@...

Issue #13618 has been reported by normalperson (Eric Wong).

12 messages 2017/06/01

[ruby-core:81534] [Ruby trunk Bug#13624] MinGW - TestIO#test_copy_stream_no_busy_wait - new failure

From: Greg.mpls@...
Date: 2017-06-02 15:33:29 UTC
List: ruby-core #81534
Issue #13624 has been reported by MSP-Greg (Greg L).

----------------------------------------
Bug #13624: MinGW - TestIO#test_copy_stream_no_busy_wait - new failure
https://bugs.ruby-lang.org/issues/13624

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-06-02 trunk 58998) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Today's MinGW build had a new failure, one that I don't recall seeing before.

Code is (located [here](https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L535-L546)):

```ruby
def test_copy_stream_no_busy_wait
  msg = 'r58534 [ruby-core:80969] [Backport #13533]'
  IO.pipe do |r,w|
    r.nonblock = true
    assert_cpu_usage_low(msg, pct: 0.11) do
      th = Thread.new { IO.copy_stream(r, IO::NULL) }
      sleep 0.1
      w.close
      th.join
    end
  end
end
```

Failure (I show skips, this is the 4th of 7 failures):

```
 88) Failure:
TestIO#test_copy_stream_no_busy_wait [E:/GitHub/ruby/test/ruby/test_io.rb:539]:
r58534 [ruby-core:80969] [Backport #13533].
Expected 0.01599999999996271 to be <= 0.013757898662006482.
```

From the assert `assert_cpu_usage_low`, it seems like a test that might be kind of arbitrary, especially when a user (or the OS) might be doing another task at the exact same time.  Also, I'm not quite sure how `0.11` relates to the two numbers shown in the failure...

Again, I've never seen it before, and I'm ignoring it.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next