Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrepareCommitMsg concurrency spec fails on Ruby 3.2 due to deadlock #838

Closed
fulf opened this issue Feb 24, 2024 · 0 comments
Closed

PrepareCommitMsg concurrency spec fails on Ruby 3.2 due to deadlock #838

fulf opened this issue Feb 24, 2024 · 0 comments

Comments

@fulf
Copy link
Contributor

fulf commented Feb 24, 2024

Overcommit::Hook::PrepareCommitMsg::Base when multiple hooks run simultaneously works well with concurrency
     Failure/Error: Thread.list.each { |t| t.join unless t == Thread.current }

     fatal:
       No live threads left. Deadlock?
       2 threads, 2 sleeps current:0x000055a887475180 main thread:0x000055a8851f0120
       * #<Thread:0x00007f502c89a7c8 sleep_forever>
          rb_thread_t:0x000055a8851f0120 native:0x00007f502d01bc00 int:0
          
       * #<Thread:0x00007f502780aa10@Timeout stdlib thread /opt/hostedtoolcache/Ruby/3.2.3/x64/lib/ruby/3.2.0/timeout.rb:101 sleep_forever>
          rb_thread_t:0x000055a887475180 native:0x00007f502694f640 int:0
           depended by: tb_thread_id:0x000055a8851f0120
          
     # ./spec/overcommit/hook/prepare_commit_msg/base_spec.rb:43:in `join'
     # ./spec/overcommit/hook/prepare_commit_msg/base_spec.rb:43:in `block (4 levels) in <top (required)>'
     # ./spec/overcommit/hook/prepare_commit_msg/base_spec.rb:43:in `each'
     # ./spec/overcommit/hook/prepare_commit_msg/base_spec.rb:43:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:64:in `block (3 levels) in <top (required)>'
     # ./lib/overcommit/utils.rb:260:in `with_environment'
     # ./spec/spec_helper.rb:63:in `block (2 levels) in <top (required)>'

Explanation (thanks ChatGPT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants