[#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:81552] [Ruby trunk Bug#13624] MinGW - TestIO#test_copy_stream_no_busy_wait - new failure

From: Greg.mpls@...
Date: 2017-06-03 04:12:25 UTC
List: ruby-core #81552
Issue #13624 has been updated by MSP-Greg (Greg L).


Eric,

Thanks for the patch.  I'll build tomorrow, isolate the test, then run it a few hundred times...

>  And yeah, maybe you can figure out a way to improve Process.times for other Windows users.

After I learn c, I'll get right on that.  Right now, I've got some old code (I wrote, haven't looked at for a few years) that now has the following error (I have to use Ruby 2.3, embedded in another app, calling an MSIE html control):
```
Error: #<FiberError: fiber called across stack rewinding barrier>
```

Google doesn't return a whole lot of hits...

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

* 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