[#87773] timer thread [was Re: [ruby-alerts:7905] failure alert on trunk-asserts@silicon-docker (NG (r63844))] — Eric Wong <normalperson@...>
> test_all <main>: warning: pthread_create failed for timer: Resource temporarily unavailable, scheduling broken
[#87836] [Ruby trunk Bug#14898] test/lib/test/unit/parallel.rb: TestSocket#test_timestamp stuck sometimes — ko1@...
Issue #14898 has been reported by ko1 (Koichi Sasada).
[email protected] wrote:
On 2018/07/06 18:47, Eric Wong wrote:
[#87847] undefined symbol: mjit_init_p — Leam Hall <leamhall@...>
I pulled Ruby trunk on 3 Jul and am now getting errors similar to the
QXMgSSB0b2xkIHlvdSwgYG1ha2UgaW5zdGFsbGAgaXMgbmVlZGVkIHRvIG1ha2UgUnVieSB3b3Jr
T25lIG1vcmUgcmVhc29uIGZvciBodHRwczovL2J1Z3MucnVieS1sYW5nLm9yZy9pc3N1ZXMvMTM2
[#87986] [Ruby trunk Feature#14915] Deprecate String#crypt, move implementation to string/crypt — mame@...
Issue #14915 has been updated by mame (Yusuke Endoh).
[email protected] wrote:
normalperson (Eric Wong) wrote:
[#88088] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — normalperson@...
Issue #14937 has been reported by normalperson (Eric Wong).
[#88104] [Ruby trunk Bug#14898] test/lib/test/unit/parallel.rb: TestSocket#test_timestamp stuck sometimes — ko1@...
Issue #14898 has been updated by ko1 (Koichi Sasada).
[#88173] [Ruby trunk Bug#14950] r64109 thread.c: move ppoll wrapper before thread_pthread.c - Windows compile failure - thread.c — Greg.mpls@...
Issue #14950 has been reported by MSP-Greg (Greg L).
[#88189] [Ruby trunk Bug#14950] r64109 thread.c: move ppoll wrapper before thread_pthread.c - Windows compile failure - thread.c — nobu@...
Issue #14950 has been updated by nobu (Nobuyoshi Nakada).
[#88199] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — takashikkbn@...
Issue #14937 has been updated by k0kubun (Takashi Kokubun).
[email protected] wrote:
> yet, sky3 had a failure at
> http://ci.rvm.jp/results/trunk@P895/1173951
> > http://ci.rvm.jp/results/trunk@P895/1173951
[ruby-core:88001] Re: [Ruby trunk Feature#14859] [PATCH] implement Timeout in VM
``` [email protected] wrote: > Hi, > > Could you explain your algorithm in pseudo code (or English)? > Current `timeout` method call makes a thread and use `Thread#raise`. > > I assume that your idea is creating "timeout scheduler" in VM and it manages `timeout` calls and invoke `Thread#raise` for timeout blocks if necessary. Yes. The "timeout scheduler" is the same idea I used for auto-fiber. It uses ccan/list to manage a sorted list of timeouts. In my early version of the patch, I think the list_head struct is per-VM. I may make this per-thread; not sure, yet. Either way, the idea is the same based on ccan/list and sort order. list_del() is fast, so timer expiration (common case) is cheap. Slowest part is insertion sort to maintain order O(n); but we can optimize for expected usage and limit traversal. If the list_head is VM-wide; it insertion sort should walk backwards since we can assume many Threads will use the same timeout. If list_head is per-Thread, it should walk forwards; because nested Timeout only makes sense if inner timeout is smaller than outer one. In other words, this is wrong regardless of implementation, so I won't optimize for it: Timeout.timeout(t+=1) do Timeout.timeout(t+=1) do Timeout.timeout(t+=1) do Timeout.timeout(t+=1) do Timeout.timeout(t+=1) do This is correct, but overkill: Timeout.timeout(t-=1) do Timeout.timeout(t-=1) do Timeout.timeout(t-=1) do Timeout.timeout(t-=1) do Timeout.timeout(t-=1) do Best is just a single-timeout per-EC: Timeout.timeout(t) do ... Worst-case insertion sort should still be faster than Thread.new :) The list_top() check covers good blocking functions which take timeout arguments. However, we still need to rely on timer interrupt flag for functions which do not take timeout (and pure-Ruby code). So we need to set timer thread or POSIX timer to set interrupt flag (same way we do normal timeslice). (*) Btw, I should have timer-thread removal w/ POSIX timers ready-to-publish soon. > BTW: > > > I meant: stop using rb_provide("timeout.rb") > > Why? Some existing codes `require('timeout')`. I mean, we keep lib/timeout.rb as an empty file so `require' still works; but is a no-op. I don't feel strongly about it, though. Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>