You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this has come up one or twice. I believe the issue is that this "dead" status was either something from CRuby versions before 1.9, or it's a status we added to indicate that a thread was about to terminate but had not yet terminated (in MRI there's no difference between most of these states since a Thread can't context-switch when it's at the end of dying).
So it's a bit of a debate whether this should be a valid status, but the race here is that the thread is still in the process of terminating when you see this "dead" status. I'll have another look at getting rid of this.
I can make the "dead" less likely or impossible to show up by checking it as well as thread "liveliness" when presenting Thread#status. So when we're in that short period after the thread has cleaned up all its locks and resources but before the native thread stops, it will still show up as "nil" status.
Difficult to test, but it should be fixed in bf80054. @mperham hopefully you can get a "head" build of JRuby to test against, but otherwise let us know if you see issues.
This Sidekiq build is failing due to a spec that expects a thread to be dead and therefore Thread#status to return
false
.https://travis-ci.org/mperham/sidekiq/jobs/443494780
The Thread#status return values are documented here and "dead" is not one of them:
https://ruby-doc.org/core-2.3.0/Thread.html#method-i-status
I can't reproduce this locally, the specs pass for me on 9.1.6.0, 9.1.17.0, and 9.2.0.0.
The text was updated successfully, but these errors were encountered: