summaryrefslogtreecommitdiff
path: root/ext/nkf/extconf.rb
diff options
context:
space:
mode:
authorKJ Tsanaktsidis <[email protected]>2023-06-01 16:37:18 +0800
committerGitHub <[email protected]>2023-06-01 17:37:18 +0900
commitedee9b6a12ac846d7b3de2d704e170bf28178cb3 (patch)
treef0b4af6454d65cc42eb22f58073691bfbd8667e3 /ext/nkf/extconf.rb
parentd8f333491e4c26df7ca577f40d7708d5aedf764f (diff)
Use a real Ruby mutex in rb_io_close_wait_list (#7884)
Because a thread calling IO#close now blocks in a native condvar wait, it's possible for there to be _no_ threads left to actually handle incoming signals/ubf calls/etc. This manifested as failing tests on Solaris 10 (SPARC), because: * One thread called IO#close, which sent a SIGVTALRM to the other thread to interrupt it, and then waited on the condvar to be notified that the reading thread was done. * One thread was calling IO#read, but it hadn't yet reached the actual call to select(2) when the SIGVTALRM arrived, so it never unblocked itself. This results in a deadlock. The fix is to use a real Ruby mutex for the close lock; that way, the closing thread goes into sigwait-sleep and can keep trying to interrupt the select(2) thread. See the discussion in: https://github.com/ruby/ruby/pull/7865/
Notes
Notes: Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'ext/nkf/extconf.rb')
0 files changed, 0 insertions, 0 deletions