[ruby-core:84279] Re: [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD

From: Eric Wong <normalperson@...>
Date: 2017-12-15 07:21:11 UTC
List: ruby-core #84279
nobu@ruby-lang.org wrote:
> It seems the signal trap causes thread switching then `Process.waitpid` exits.
> That means the target thread status can change during `RUBY_VM_CHECK_INTS_BLOCKING`, but `sleep_forever` doesn't consider the condition to wait at that moment.

Right, that seems correct.  I was considering passing target_th
to sleep_forever last night to check target_th->status inside
sleep_forever; but I think sleep_forever is too complex already.

I guess the sleep_wait_for_interrupt path when !forever has the
same problem and might sleep too long..

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next