[#89806] [Ruby trunk Bug#15306] Generate prelude.c using miniruby — v.ondruch@...
Issue #15306 has been reported by vo.x (Vit Ondruch).
3 messages
2018/11/15
[ruby-core:89717] [Ruby trunk Bug#14968] [PATCH] io.c: make all pipes nonblocking by default
From:
Greg.mpls@...
Date:
2018-11-06 04:14:21 UTC
List:
ruby-core #89717
Issue #14968 has been updated by MSP-Greg (Greg L).
normalperson (Eric Wong) wrote:
> Do you have any historical info about the pass/fail rate of these tests in parallel?
Yes. Below is a summary of all builds from r64892 2018-10-01 thru r65558, except TestJIT. I assume TestIO & TestThread are the only tests possibly affected by anything you're working on...
Since the patch, `TestIO#test_readpartial_lock` has failed in parallel testing both times (r65555 & r65558).
```
ruby-loco - Parallel Test Failures - 124 builds
Last
Qty Rev ————————— Test —————————
3 65495 TestGemRemoteFetcher#test_do_not_allow_invalid_client_cert_auth_connection
2 65558 TestIO#test_readpartial_lock
1 65526 TestIO#test_recycled_fd_close
1 65424 TestIOWait#test_ready?
1 65495 TestIOWait#test_wait
2 65097 TestNetHTTPKeepAlive#test_keep_alive_server_close
1 64896_b TestThread#test_priority
3 65317 TestThread#test_thread_interrupt_for_killed_thread
2 65417 TestThreadQueue#test_queue_close_multi_multi
```
----------------------------------------
Bug #14968: [PATCH] io.c: make all pipes nonblocking by default
https://bugs.ruby-lang.org/issues/14968#change-74762
* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Crap, I always planned to have something like this for [Feature #13618]
(auto-Fiber); but introducing a race condition for Timer-thread
elimination in [Misc #14937] forced me to introduce this early.
Anyways, I might have to revert and reintroduce timer-thread if this
change is unnacceptable :< (I HATE timer thread)
```
io.c: make all pipes nonblocking by default
All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are
all capable of appearing to be "blocking" when presented with a
file description with the O_NONBLOCK flag set; so there is
little risk of incompatibility within Ruby-using programs.
The biggest compatibility risk is when spawning external
programs. As a result, stdin, stdout, and stderr are now always
made blocking before exec-family calls.
Timer-thread elimination in https://bugs.ruby-lang.org/issues/14937
introduced a race condition in signal handling. It is possible
to receive a signal inside BLOCKING_REGION right before read/write
syscalls. If this patch cannot be accepted, I will have to revert
to reintroduce timer-thread and increase resource use (which
led to other failures in the past). The race condition
introduced for [Misc #14937] led to rare CI failures on a few
tests:
- test/ruby/test_thread.rb (test_thread_timer_and_interrupt):
http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180805T080500Z.fail.html.gz
- test/ruby/test_io.rb (test_race_gets_and_close):
http://ci.rvm.jp/results/trunk@P895/1190369
This change is ALSO necessary to take advantage of (proposed
lightweight concurrency (aka "auto-Fiber") or any similar
proposal: https://bugs.ruby-lang.org/issues/13618
TODO: all sockets and FIFOs non-blocking by default, too
```
---Files--------------------------------
0001-io.c-make-all-pipes-nonblocking-by-default.patch (12.1 KB)
--
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>