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

Puppet::Parser::Scope has no inspect method which is causing an extremely large string to be produced

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.1, PUP 4.1.0
    • Fix Version/s: PUP 3.8.2, PUP 4.2.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Sub-team:
    • Story Points:
      1
    • Sprint:
      Server Jade 2015-06-10
    • Release Notes:
      Bug Fix

      Description

      Recently, SERVER-556 was filed against Puppet Server. After some investigation, it seems that when an error is thrown in Puppet's template function, Ruby will call inspect on the top-level scope object, but not use the returned string.

      However, since the Puppet::Parser::Scope class has no inspect method of its own, inspecting the scope object causes an absolutely massive string to be produced and never used. The more code the user has in their environment, the larger the string. This string can grow so large that it can cause an OOM error when running Puppet Server due to the restrictions placed on the heap size.

      We need to add an inspect method to the Puppet::Parser::Scope class that returns something simple to avoid this.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  erik Erik Dasher
                  Reporter:
                  preben Preben Ingvaldsen
                  QA Contact:
                  Erik Dasher
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support