exit! and --debug events can cause a deadlock #4419

enebo opened this Issue Jan 3, 2017 · 2 comments


None yet

2 participants

enebo commented Jan 3, 2017

This is an issue made because I had to revert the PR (Fix deadlock when tearing down runtime during debugging #4352). I don't know if I am thick but I can also trivially deadlock with this:

def foo

2.times do
  puts "T"
  Thread.new {
    a = []
    [:call, :c_call, :return, :c_return].each do |n|
      t = TracePoint.new(n) { |tp| p tp.event }
    loop do
      sleep 0.01

sleep 0.5

I think it is because both threads need to receive an event callback but the event callback is generating an event callback and we deadlock? In any case I threw this second deadlock into this issue...

@enebo enebo added this to the JRuby milestone Jan 3, 2017
@enebo enebo added a commit that referenced this issue Jan 3, 2017
@enebo enebo Revert "Fix deadlock when tearing down runtime during debugging"
This reverts commit f9d704c.

New issue #4419 opened to address this revert.
enebo commented Jan 3, 2017

I should add this was reverted because simplecov stopped working for multiple users where only a small subset of coverage was being reported.

PragTob commented Jan 8, 2017

Adding to what Tom said, there is further info as to how to check the things that caused problems on simplecov in the issue that caused the revert: #4404 (simplecovs integration test suite also helpfully fails :) )

It was also mentioned that it might be simplecovs fault, as in inadequate usage of hooks, I'm not really into the code base but would be willing to help debug issues given I got the time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment