Project

General

Profile

Actions

Bug #15071

closed

RubyVM::MJIT.pause may cause deadlock after compaction

Added by wanabe (_ wanabe) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:88841]

Description

Sometimes I met thread-deadlock while waiting RubyVM::MJIT.pause.
Here is a terminal log.

$ ruby --disable-gems --jit --jit-verbose=1 --jit-max-cache=3 -e '100.times do |i| eval("def foo#{i}; end; " + "foo#{i}; " * 5); end; RubyVM::MJIT.pause'
JIT success (96.7ms): block in <main>@-e:1 -> /tmp/_ruby_mjit_p9628u4.c
JIT success (25.0ms): foo0@(eval):1 -> /tmp/_ruby_mjit_p9628u0.c
JIT success (26.2ms): foo1@(eval):1 -> /tmp/_ruby_mjit_p9628u1.c
JIT success (24.4ms): foo2@(eval):1 -> /tmp/_ruby_mjit_p9628u2.c
JIT success (28.0ms): foo3@(eval):1 -> /tmp/_ruby_mjit_p9628u3.c
JIT success (24.8ms): foo4@(eval):1 -> /tmp/_ruby_mjit_p9628u5.c
JIT success (25.4ms): foo5@(eval):1 -> /tmp/_ruby_mjit_p9628u6.c
JIT success (24.5ms): foo6@(eval):1 -> /tmp/_ruby_mjit_p9628u7.c
JIT success (25.1ms): foo7@(eval):1 -> /tmp/_ruby_mjit_p9628u8.c
JIT success (25.7ms): foo8@(eval):1 -> /tmp/_ruby_mjit_p9628u9.c
JIT compaction (4.9ms): Compacted 10 methods -> /tmp/_ruby_mjit_p9628u101.so
JIT success (23.9ms): foo9@(eval):1 -> /tmp/_ruby_mjit_p9628u10.c
^CTraceback (most recent call last):
	1: from -e:1:in `<main>'
-e:1:in `pause': Interrupt
JIT success (62.2ms): foo10@(eval):1 -> /tmp/_ruby_mjit_p9628u11.c
Successful MJIT finish

Updated by k0kubun (Takashi Kokubun) over 6 years ago

  • Assignee set to k0kubun (Takashi Kokubun)
Actions #2

Updated by k0kubun (Takashi Kokubun) about 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r65179.


mjit.c: don't let MJIT.pause hang on full active units

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]

Actions

Also available in: Atom PDF

Like0
Like0Like0