Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Josh Cooper commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow I believe this was fixed in PUP-10221, so closing this as a duplicate. Please reopen if I've missed something. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.126358.1611772980313%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Rob Braden updated an issue Puppet / PUP-10029 A Puppet::DataTypes::Error#to_s() fails with a stack overflow Change By: Rob Braden Team: Bolt Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.120043.1569862260757%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Josh Cooper commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow I'd expect puppet to fail more gracefully if there isn't a current environment. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.112030.1569350340314%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Joshua Partlow commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow I opened https://github.com/puppetlabs/bolt/issues/1242 to discuss how to handle this issue in Bolt. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.111723.1569346321016%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Joshua Partlow commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow Hmm, that's interesting, that does work: [root@wuh7cxdfusfnult ~]# cat test.rb require 'puppet' Puppet.initialize_settings env = Puppet.lookup(:environments).get(Puppet[:environment]) Puppet.override(:current_environment => env, :loaders => Puppet::Pops::Loaders.new(env)) do require 'puppet/datatypes/error' e = Puppet::DataTypes::Error.new('foo') puts e.to_s end [root@wuh7cxdfusfnult ~]# /opt/puppetlabs/puppet/bin/ruby test.rb Error({'msg' => 'foo'}) So the issue I'm seeing appears to be a case of Bolt handling an error instance outside of a context with loaders available, here. Unless you consider the Puppet::DataTypes::Error.to_s requiring loaders a bug in and of itself?
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Henrik Lindberg commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow Joshua Partlow That means there are no loaders bound in the puppet context. The logic you are executing ends up in this method to get the implementation registry - and since there are no loaders in the context you end up with the nil loaders. def self.implementation_registry loaders = Puppet.lookup(:loaders) { nil } loaders.nil? ? nil : loaders.implementation_registry end You can probably initialize it like apply does - like this: env = Puppet.lookup(:environments).get(Puppet[:environment]) Puppet.override(:current_environment => env, :loaders => Puppet::Pops::Loaders.new(env)) do # Do your stuff here end
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Joshua Partlow commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow Hi Thomas Hallgren, yeah, I was originally trying to require 'puppet/datatypes/error', but that has some add behavior, see below: [root@wuh7cxdfusfnult ~]# /opt/puppetlabs/puppet/bin/irb irb(main):001:0> require 'puppet' => true irb(main):002:0> require 'puppet/datatypes' => false irb(main):003:0> require 'puppet/datatypes/error' Traceback (most recent call last): 7: from /opt/puppetlabs/puppet/bin/irb:11:in `' 6: from (irb):3 5: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require' 4: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require' 3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/datatypes/error.rb:1:in `'
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Thomas Hallgren commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow The code doesn't understand that Puppet::Datatypes::Error is a known type. Does the same thing happen if you precede this with require 'puppet/datatypes' (that's where the type registration happens)? Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.110990.1569328140298%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Henrik Lindberg commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow Ping Thomas Hallgren - any thoughts ? Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.110800.1569302580157%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Joshua Partlow commented on PUP-10029 Re: A Puppet::DataTypes::Error#to_s() fails with a stack overflow Henrik Lindberg Hi there; bumped into this while working with Bolt apply(). Looks like Puppet::DataTypes::Error.to_s() is broken, or something else is going on that I'm not following...getting an isolated instance of Puppet::DataTypes::Error to test against wasn't straight forward . Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.325693.1569277631000.110550.1569277800167%40Atlassian.JIRA.
Jira (PUP-10029) A Puppet::DataTypes::Error#to_s() fails with a stack overflow
Title: Message Title Joshua Partlow created an issue Puppet / PUP-10029 A Puppet::DataTypes::Error#to_s() fails with a stack overflow Issue Type: Bug Affects Versions: PUP 6.10.0 Assignee: Unassigned Created: 2019/09/23 3:27 PM Priority: Normal Reporter: Joshua Partlow Puppet Version: 6.10 (master) Instances of Puppet::DataTypes::Error end up recursively overflowing the stack calling to_s(). [root@wuh7cxdfusfnult installer]# /opt/puppetlabs/puppet/bin/puppet --version 6.10.0 [root@wuh7cxdfusfnult installer]# /opt/puppetlabs/puppet/bin/irb irb(main):001:0> require 'puppet' r=> true irb(main):0