Issue #14867 has been updated by k0kubun (Takashi Kokubun).


> ubf_select inside ruby_waitpid_locked is safe, but contention on vm->gvl.lock seems wrong. Made r65465 which should fix rb_f_system.
>
> Also taking a look at native_ppoll_sleep for spawn;

Thanks for taking a look at them :)

> but I would feel more comfortable investigating issues if possible race condition around iseq->body access in MJIT worker could be eliminated as source of data corruption.

Ok. As said above, I believe it's properly guarded with locks and `in_jit`, but I'll take a look at that after https://80x24.org/spew/20181030184614.3830-1-e / 80x24.org/raw is committed. Could you check in ccan/list one first? I'll check https://80x24.org/spew/20181030184614.3830-2-e / 80x24.org/raw one later, but ccan change should be safe to merge separately.

> So perhaps mjit worker thread can be eliminated in the future...

I'm hoping to see that too for better reliability. Please let me confirm the benchmark results prior to committing it once it's made possible.

----------------------------------------
Bug #14867: Process.wait can wait for MJIT compiler process
https://bugs.ruby-lang.org/issues/14867#change-74695

* Author: k0kubun (Takashi Kokubun)
* Status: Assigned
* Priority: Normal
* Assignee: normalperson (Eric Wong)
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
If Ruby tries to wait for any child process, MJIT's gcc/clang process could be caught by the method call. It's not convenient for both Ruby's user and MJIT worker thread, so Process.wait and its families should somehow avoid waiting for it.

---Files--------------------------------
0001-hijack-SIGCHLD-handler-for-internal-use.patch (13.8 KB)
JIT-test-all.log (39.9 KB)
mjit_test-all_63796.log (40.4 KB)
config_ruby-loco_mingw.log (27 KB)
test_jit_results.txt (41.2 KB)
14867_91_mingw_build_log_.txt (127 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>