[#90865] [Ruby trunk Bug#15499] Breaking behavior on ruby 2.6: rb_thread_call_without_gvl doesn't invoke unblock_function when used on the main thread — apolcyn@...
Issue #15499 has been reported by apolcyn (alex polcyn).
3 messages
2019/01/03
[#90877] [Ruby trunk Bug#15499] Breaking behavior on ruby 2.6: rb_thread_call_without_gvl doesn't invoke unblock_function when used on the main thread — apolcyn@...
Issue #15499 has been updated by apolcyn (alex polcyn).
3 messages
2019/01/03
[#90895] Re: [ruby-alerts:11680] failure alert on trunk-mjit@silicon-docker (NG (r66707)) — Eric Wong <normalperson@...>
ko1c-failure@atdot.net wrote:
4 messages
2019/01/05
[#90896] Re: [ruby-alerts:11680] failure alert on trunk-mjit@silicon-docker (NG (r66707))
— Takashi Kokubun <takashikkbn@...>
2019/01/05
Thanks to explain that.
[#91200] [Ruby trunk Feature#15553] Addrinfo.getaddrinfo supports timeout — glass.saga@...
Issue #15553 has been reported by Glass_saga (Masaki Matsushita).
4 messages
2019/01/21
[#91289] Re: [Ruby trunk Feature#15553] Addrinfo.getaddrinfo supports timeout
— Eric Wong <normalperson@...>
2019/01/26
glass.saga@gmail.com wrote:
[ruby-core:90900] [Ruby trunk Bug#15509] TCPServer#accept isn't interrupted
From:
lars@...
Date:
2019-01-05 18:09:26 UTC
List:
ruby-core #90900
Issue #15509 has been reported by larskanis (Lars Kanis).
----------------------------------------
Bug #15509: TCPServer#accept isn't interrupted
https://bugs.ruby-lang.org/issues/15509
* Author: larskanis (Lars Kanis)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
This is another issue I noticed with [Eventbox](https://github.com/larskanis/eventbox):
This script tries to stop `TCPServer#accept` with `Thread#raise`:
```ruby
require "socket"
Thread.abort_on_exception = true
class Stop < RuntimeError
end
serv = TCPServer.new("localhost", 12345)
th = Thread.handle_interrupt(Exception => :never) do
Thread.new do
begin
Thread.handle_interrupt(Stop => :on_blocking) do
# sleep # sleep is aborted
serv.accept # but accept isn't
end
rescue Stop
end
end
end
th.raise Stop
th.join
serv.close
```
The program freezes and if stopped per CTRL-C the output looks similar to:
```sh
$ ruby -d --disable-gems no-interrupt-while-accept.rb
^CException `Interrupt' at no-interrupt-while-accept.rb:23 -
Exception `Stop' at no-interrupt-while-accept.rb:15 - Stop
Traceback (most recent call last):
1: from no-interrupt-while-accept.rb:23:in `<main>'
no-interrupt-while-accept.rb:23:in `join': Interrupt
```
The debug output shows, that the `Stop` exception is delivered after the `Interrupt` exception has been delivered to the main thread. However it should be delivered immediately, since it's a blocking operation. In contrast `sleep` is aborted as expected.
This issue is present on all older MRI versions. However it doesn't appear on JRuby-9.2.5.0.
--
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>