Project

General

Profile

Bug #15071

RubyVM::MJIT.pause may cause deadlock after compaction

Added by wanabe (_ wanabe) 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision 320d7c54
Added by k0kubun (Takashi Kokubun) 4 months ago

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

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 65179
Added by k0kubun (Takashi Kokubun) 4 months ago

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

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]

Revision 65179
Added by k0kubun (Takashi Kokubun) 4 months ago

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

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]

History

Updated by k0kubun (Takashi Kokubun) 6 months ago

  • Assignee set to k0kubun (Takashi Kokubun)
#2

Updated by k0kubun (Takashi Kokubun) 4 months 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]

Also available in: Atom PDF