Open evanlok opened 1 year ago
How do we reproduce this deadlock? I could not reproduce it.
It's difficult to reproduce reliably since it's a race condition between threads. You may be able to reproduce it by writing a script that creates 2 threads: 1 to require shared_helpers and 1 to autoload shared_helpers then invoke that script several times in a loop. We saw this issue occur somewhat often in our CI builds (at least once per day) until this fix was applied. Note that we were running on Ruby 2.7.2. The root cause may have been addressed in newer versions of Ruby although the Ruby bug does not indicate any resolution.
Spring occasionally crashes on boot due to deadlock errors that occur from calling
require
andautoload
ofBundler::SharedHelpers
in separate threads.Ruby bug: https://bugs.ruby-lang.org/issues/15598
Error stack trace: