Jira (PUP-11722) concurrent-ruby 1.2.0 breaks puppet

33 views
Skip to first unread message

Romain Tartière

unread,
Jan 23, 2023, 3:53:02 PM1/23/23
to puppe...@googlegroups.com
Romain Tartière created an issue
 
Puppet / Bug PUP-11722
concurrent-ruby 1.2.0 breaks puppet
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2023/01/23 12:52 PM
Priority: Normal Normal
Reporter: Romain Tartière

Puppet Version: 7.x
Puppet Server Version: N/A
OS Name/Version: N/A

concurrent-ruby 1.2.0 was just released and breaks running Puppet using gem/bundler.

It looks like puppet use a private class of this gem that got removed in:

https://github.com/ruby-concurrency/concurrent-ruby/commit/30465396414e13290c3e1d8d26a0f2de2ebedc4c

Desired Behavior:

Puppet should work with concurrent-ruby 1.2.0

Actual Behavior:

romain@zappy ~/Projects/puppetlabs % git clone g...@github.com:puppetlabs/puppet.gitromain@zappy ~/Projects/puppetlabs % cd puppetromain@zappy ~/Projects/puppetlabs/puppet % bundle installromain@zappy ~/Projects/puppetlabs/puppet % bundle show concurrent-ruby/usr/home/romain/.vendor/ruby/3.0/gems/concurrent-ruby-1.2.0romain@zappy ~/Projects/puppetlabs/puppet % bundle exec bin/puppet 
bundler: failed to load command: bin/puppet (bin/puppet)
/usr/home/romain/Projects/puppetlabs/puppet/lib/puppet/thread_local.rb:6:in `<top (required)>': uninitialized constant Concurrent::RubyThreadLocalVar (NameError)
Did you mean?  Concurrent::RubyThreadPoolExecutor
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet/context.rb:1:in `require_relative'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet/context.rb:1:in `<top (required)>'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet.rb:45:in `require_relative'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet.rb:45:in `<module:Puppet>'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet.rb:42:in `<top (required)>'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet/util/command_line.rb:12:in `require_relative'
    from /usr/home/romain/Projects/puppetlabs/puppet/lib/puppet/util/command_line.rb:12:in `<top (required)>'
    from bin/puppet:4:in `require'
    from bin/puppet:4:in `<top (required)>'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `load'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:58:in `kernel_load'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli/exec.rb:23:in `run'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli.rb:483:in `exec'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli.rb:31:in `dispatch'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/cli.rb:25:in `start'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/exe/bundle:48:in `block in <top (required)>'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
    from /usr/home/romain/.vendor/ruby/3.0/gems/bundler-2.3.12/exe/bundle:36:in `<top (required)>'
    from /usr/local/bin/bundle:25:in `load'
    from /usr/local/bin/bundle:25:in `<main>'
{{}}

Workaround:

Add this line to the Gemfile to use the previous version of concurrent-ruby :

gem 'concurrent-ruby', '< 1.2.0'

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Jan 23, 2023, 4:50:02 PM1/23/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2023-02-01

Josh Cooper (Jira)

unread,
Jan 23, 2023, 4:50:02 PM1/23/23
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Josh Cooper
Change By: Josh Cooper
Assignee: Josh Cooper

Josh Cooper (Jira)

unread,
Jan 23, 2023, 4:50:04 PM1/23/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Phoenix

Josh Cooper (Jira)

unread,
Jan 23, 2023, 4:58:01 PM1/23/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Story Points: 1

Josh Cooper (Jira)

unread,
Jan 23, 2023, 4:59:01 PM1/23/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 7.22.0

Tim Meusel (Jira)

unread,
Jan 24, 2023, 10:15:04 AM1/24/23
to puppe...@googlegroups.com
Tim Meusel commented on Bug PUP-11722
 
Re: concurrent-ruby 1.2.0 breaks puppet

Josh Cooper this currently breaks a lot if CI setups. Do you know if this will be shipped in Puppet 7.22 in the next couple of hours, or should we update Gemfiles to pin concurrent-ruby to 1.1.x?

Josh Cooper (Jira)

unread,
Jan 24, 2023, 12:31:02 PM1/24/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.29.0

Josh Cooper (Jira)

unread,
Jan 24, 2023, 12:31:03 PM1/24/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11722

We are going to ship 6.29.0 and 7.22.0 gem only releases

Josh Cooper (Jira)

unread,
Jan 25, 2023, 6:47:03 PM1/25/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 7.23.0

Romain Tartière

unread,
Jan 30, 2023, 3:21:02 PM1/30/23
to puppe...@googlegroups.com
Romain Tartière updated an issue
Change By: Romain Tartière
*Puppet Version: 7.x*
*Puppet Server Version: N/A*
*OS Name/Version: N/A*


concurrent-ruby 1.2.0 was just released and breaks running Puppet using gem/bundler.

It looks like puppet use a private class of this gem that got removed in:

https://github.com/ruby-concurrency/concurrent-ruby/commit/30465396414e13290c3e1d8d26a0f2de2ebedc4c

*Desired Behavior:*


Puppet should work with concurrent-ruby 1.2.0

*Actual Behavior:*

{{romain@zappy ~/Projects/puppetlabs % git clone g...@github.com:puppetlabs/puppet.git}}
{{romain@zappy ~/Projects/puppetlabs % cd puppet}}
{{romain@zappy ~/Projects/puppetlabs/puppet % bundle install}}
{{romain@zappy ~/Projects/puppetlabs/puppet % bundle show concurrent-ruby}}
{{/usr/home/romain/.vendor/ruby/3.0/gems/concurrent-ruby-1.2.0}}
{{romain@zappy ~/Projects/puppetlabs/puppet % bundle exec bin/puppet}}
* {{ Workaround: }} *


Add this line to the Gemfile to use the previous version of concurrent-ruby :

{{gem 'concurrent-ruby', '< 1.2.0'}}

Romain Tartière

unread,
Jan 30, 2023, 3:21:02 PM1/30/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 3, 2023, 1:48:04 PM2/3/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Updates puppet to be compatible with the concurrent-ruby gem versions 1.2 and above.

Parker Leach (Jira)

unread,
Feb 7, 2023, 2:56:03 PM2/7/23
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed

Josh Cooper (Jira)

unread,
Feb 10, 2023, 12:34:01 PM2/10/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes Summary: Updates puppet to be compatible with the require versions of concurrent-ruby gem versions prior to 1.2 and above .

Denys Kyrii (Jira)

unread,
Apr 14, 2023, 4:07:02 PM4/14/23
to puppe...@googlegroups.com
Denys Kyrii commented on Bug PUP-11722

The issue isn't solved for puppetserver.
STR:

Install any gem which has concurrent-ruby >= 1.2.0 dependency via puppetserver gem install.

For me it was https://rubygems.org/gems/activesupport

 
2023-04-14T14:05:01.204Z ERROR [clojure-agent-send-pool-0] [p.t.internal] shutdown-on-error triggered because of exception!
java.lang.IllegalStateException: There was a problem adding a JRubyInstance to the pool.
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34540$add_instance34545$fn_34549.invoke(jruby_agents.clj:58)
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34540$add_instance_34545.invoke(jruby_agents.clj:47)
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34567$prime_pool_BANG_34572$fn_34576.invoke(jruby_agents.clj:76)
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34567$prime_pool_BANG__34572.invoke(jruby_agents.clj:61)
at puppetlabs.services.jruby_pool_manager.impl.instance_pool$fn_35129$fn_35130.invoke(instance_pool.clj:16)
at puppetlabs.trapperkeeper.internal$shutdown_on_error_STAR_.invokeStatic(internal.clj:403)
at puppetlabs.trapperkeeper.internal$shutdown_on_error_STAR_.invoke(internal.clj:378)
at puppetlabs.trapperkeeper.internal$shutdown_on_error_STAR_.invokeStatic(internal.clj:388)
at puppetlabs.trapperkeeper.internal$shutdown_on_error_STAR_.invoke(internal.clj:378)
at puppetlabs.trapperkeeper.internal$fn_15141$shutdown_service15146$fn$reify15148$service_fnk5324auto_positional$reify_15153.shutdown_on_error(internal.clj:448)
at puppetlabs.trapperkeeper.internal$fn_15088$G15067_15096.invoke(internal.clj:411)
at puppetlabs.trapperkeeper.internal$fn_15088$G15066_15105.invoke(internal.clj:411)
at clojure.core$partial$fn__5908.invoke(core.clj:2642)
at clojure.core$partial$fn__5908.invoke(core.clj:2641)
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34514$send_agent34519$fn34520$agent_fn_34521.invoke(jruby_agents.clj:41)
at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2050)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.Agent$Action.doRun(Agent.java:114)
at clojure.lang.Agent$Action.run(Agent.java:163)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.jruby.embed.EvalFailedException: (NameError) uninitialized constant Concurrent::RubyThreadLocalVar
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:134)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1296)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1289)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)
at puppetlabs.services.jruby.jruby_puppet_core$fn_36348$get_initialize_pool_instance_fn36353$fn36354$fn_36355.invoke(jruby_puppet_core.clj:115)
at puppetlabs.services.jruby_pool_manager.impl.jruby_internal$fn_34122$create_pool_instance_BANG_34131$fn_34134.invoke(jruby_internal.clj:256)
at puppetlabs.services.jruby_pool_manager.impl.jruby_internal$fn_34122$create_pool_instance_BANG__34131.invoke(jruby_internal.clj:225)
at puppetlabs.services.jruby_pool_manager.impl.jruby_agents$fn_34540$add_instance34545$fn_34549.invoke(jruby_agents.clj:52)
... 22 common frames omitted
Caused by: org.jruby.exceptions.NameError: (NameError) uninitialized constant Concurrent::RubyThreadLocalVar
at org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:3947)
at RUBY.<main>(/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/thread_local.rb:6)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1045)
at RUBY.<main>(/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1045)
at RUBY.<module:Puppet>(/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:44)
at RUBY.<main>(/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:41)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85)
at RUBY.<main>(uri:classloader:/puppetserver-lib/puppet/server.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85)
at RUBY.<main>(uri:classloader:/puppetserver-lib/puppet/server/master.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1017)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85)
at RUBY.<main>(<script>:1)
 
 

Josh Cooper (Jira)

unread,
Apr 14, 2023, 4:57:03 PM4/14/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11722

Denys Kyrii The "gem install" command doesn't take into account currently installed gems when resolving gem dependencies like bundler does with a Gemfile. In other words, it's up to you to install a version of activesupport and concurrent-ruby that are compatible with puppet. For example:

puppetserver gem uninstall concurrent-ruby
puppetserver gem install concurrent-ruby -v 1.10.0
puppetserver gem install activesupport

Denys Kyrii (Jira)

unread,
Apr 14, 2023, 5:22:02 PM4/14/23
to puppe...@googlegroups.com
Denys Kyrii commented on Bug PUP-11722

The main question was why you fixed the issue for puppet-agent and didn't do it for puppetserver.

I fixed the issue by creating Gemfile with the corresponding gems and running /opt/puppetlabs/server/bin/puppetserver gem install -g

slack

Reply all
Reply to author
Forward
0 new messages