Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4775

org.jruby.exceptions.RaiseException: (SystemStackError) stack level too deep

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 4.1.0
    • Fix Version/s: PUP 4.2.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 14.04.2

    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-07-08
    • Release Notes:
      Bug Fix

      Description

      Release Note


      Serialization of node objects could produce giant serializations than when later loaded would cause 'stack level too deep' errors. This was caused
      by logic missing in the node implementation that should have prevented serialization of the entire runtime state of the environment.

      Summary


      Serialization/Deseerialization of Puppet::Node objects using yaml causes the entire environment associated with the node to be serialized in full - this is everything loaded and evaluated in the environment, and it goes very deep. As noted in comments, it is possible to work around the issue of hitting a stack overflow by increasing the stack and making more memory available.

      The root cause is that objects (such as Puppet::Node) which requires asymmetric serialization (it only wants a serialization of the environment's name, and looks up the environment on deserialization) must include a module:

      include Puppet::Util::PsychSupport
      

      to get the expected behavior of using to/from datahash methods.

      ORIGINAL

      After running for a while Puppet agent runs start to fail due to server errors, the exception appears to indicate an issue with yaml encoding. This error was happening with 2.0.0 and I have also tried the latest package available in the nightly repo which is exhibiting the same behaviour.

      2015-05-31 15:50:41,651 ERROR [p.p.ringutils] Exception while handling HTTP request
      org.jruby.exceptions.RaiseException: (SystemStackError) stack level too deep
      	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) ~[puppet-server-release.jar:na]
       
      <repeated part omitted>
       
      	at RUBY.accept(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:128) ~[na:na]
      	at RUBY.dump_ivars(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:480) ~[na:na]
      	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) ~[puppet-server-release.jar:na]
      	at RUBY.dump_ivars(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:478) ~[na:na]
      	at RUBY.visit_Object(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:150) ~[na:na]
      	at RUBY.accept(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:128) ~[na:na]
      	at RUBY.visit_Array(/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/shared/psych/visitors/yaml_tree.rb:344) ~[na:na]
      	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) ~[puppet-server-release.jar:na]
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  damoxc Damien Churchill
                  QA Contact:
                  Erik Dasher
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: