From: takashikkbn@... Date: 2018-11-19T13:40:33+00:00 Subject: [ruby-core:89879] [Ruby trunk Bug#15315] ec_switch can still lose interrupts Issue #15315 has been updated by k0kubun (Takashi Kokubun). > 1) will remain dangerous Is this about Bug #15316? ---------------------------------------- Bug #15315: ec_switch can still lose interrupts https://bugs.ruby-lang.org/issues/15315#change-74949 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Target version: * ruby -v: * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- ec_switch and thread switching may still lose interrupts trap interrupt is OK because of r64062 Not OK: 1) postponed job interrupt from MJIT worker This is trickiest to solve because it also affects thread switching, not just EC switching 2) pending interrupt is not safe but fixing ec_switch is sufficient because rb_threadptr_interrupt only targets threads, not EC. 3) timer interrupt is not critical because another interrupt will fire in 100ms Solutions: moving interrupt_flag back to rb_thread_t will solve 2 and 3 1) will remain dangerous, we need to add extra checks at thread switching because MJIT worker may get stuck if target thread stalls or dies. ---Files-------------------------------- 0001-vm_core.h-move-interrupt_flag-back-to-rb_thread_t.patch (4.54 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: