[#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:81850] [Ruby trunk Bug#13533] please backport r58534

From: usa@...
Date: 2017-06-30 10:41:04 UTC
List: ruby-core #81850
Issue #13533 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.2: UNKNOWN, 2.3: REQUIRED, 2.4: DONE to 2.2: UNKNOWN, 2.3: DONE, 2.4: DONE

ruby_2_3 r59216 merged revision(s) 58534.

----------------------------------------
Bug #13533: please backport r58534
https://bugs.ruby-lang.org/issues/13533#change-65570

* Author: normalperson (Eric Wong)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.2: UNKNOWN, 2.3: DONE, 2.4: DONE
----------------------------------------
```
This bug causes busy wait (100% CPU usage) on IO.copy_stream
with sockets/pipes with O_NONBLOCK set.

In other words, the following code should not cause 100% CPU usage,
just hang forever w/o burning CPU:

	require 'io/nonblock'
	r, w = IO.pipe
	r.nonblock = true
	IO.copy_stream(r, IO::NULL)

This affects Ruby 2.3 and 2.4.
```




-- 
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