-
Notifications
You must be signed in to change notification settings - Fork 417
Open
Labels
pendingWaiting for response, blocked by other problem, etc.Waiting for response, blocked by other problem, etc.questionAn user question, does not change the library.An user question, does not change the library.
Description
Hey, I have a deadlock problem, code snippet like this:
thread_pool = Concurrent::FixedThreadPool.new(3)
res = Concurrent::ThreadLocalVar.new({})
while @queue.size > 0 do
thread_pool.post do
cur = @queue.pop
build_res = start(cur)
do_sth(res)
end
end
thread_pool.shutdown
thread_pool.wait_for_terminationThen here is what I got:
/RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:43:in `sleep': No live threads left. Deadlock? (fatal)
from /RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:43:in `wait'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:43:in `ns_wait'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_lockable_object.rb:43:in `ns_wait_until'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb:87:in `block in wait'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `block in synchronize'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb:84:in `wait'
from RHEL5_64/DEV.STD.PTHREAD/build/private/env/ruby2.3.x/ruby2.3.x/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_executor_service.rb:49:in `wait_for_termination'
from package_builder.rb:64:in `bulk_build'
from lib/test.rb:152:in `<main>'
rake aborted!
Can someone help me out?
Metadata
Metadata
Assignees
Labels
pendingWaiting for response, blocked by other problem, etc.Waiting for response, blocked by other problem, etc.questionAn user question, does not change the library.An user question, does not change the library.