From: Eric Wong Date: 2018-11-01T10:55:37+00:00 Subject: [ruby-core:89672] native_ppoll_sleep wakeups (was: [Bug #14867]) I wrote: >>http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1437559 > OK, I think it's the lack of locking/atomics around > checking waitpid_state.ret and I introduced the bug > in commit 9d4027b50334ef804f6f138fba1d342fe188826b > ("process.c: simplify SIGCHLD-based waitpid"). > > I redesign rb_thread_sleep_interruptible tomorrow. Nope, only native_ppoll_sleep path in native_sleep was vulnerable to that, I think. Instead, I will add an extra FD which only the main thread sleeps on: https://80x24.org/spew/20181101103147.18505-1-e@80x24.org/raw One downside is (rare?) pthreads platforms without POSIX timers will now have six pipe FDs (3 pipes) at startup (Ruby 2.5 had 4 pipe FDs). Now, I don't know which platforms lack POSIX timers. I know FreeBSD has them; and Linux can even use cheaper eventfd. (we also had CI failures due to system-wide pipe limit, so I favor eventfd when possible) Unsubscribe: