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
(PUP-11373) Always lock the environment before its type collection
Puppetserver in MT mode can deadlock if one thread calls into the loaders,
which locks the environment, and then tries to lock the type_collection:
- waiting to lock <3f27e688> (a org.jruby.gen.RubyObject0) owned by "qtp346358872-131" t@131
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:188
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:152
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:152
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/loader/runtime3_type_loader.rb:79
...
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:153
While another thread locks the type_collection and tries to lock the environment:
- waiting to lock <bd0f663> (a org.jruby.gen.RubyObject0) owned by "qtp346358872-67" t@76
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/node/environment.rb:248
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/type_loader.rb:131
...
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:203
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type_collection.rb:188
This commit orders locking so we always acquire the environment lock before its
type collection lock.
0 commit comments