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

Capitals in variable names in EPP templates hang threads forever

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 4.9.4
    • Fix Version/s: PUP 4.10.8, PUP 5.3.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Platform Core
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      if illegal variables with many/long name segments had a segment with an initial upper case letter the parser could take an extremely long time trying to match the input. This would cause very long compilation times and the CPU load on the host would go high. This was caused by excessive backtracking taking place to match the regular expression for variables. The regular expression is now changed.
      Show
      if illegal variables with many/long name segments had a segment with an initial upper case letter the parser could take an extremely long time trying to match the input. This would cause very long compilation times and the CPU load on the host would go high. This was caused by excessive backtracking taking place to match the regular expression for variables. The regular expression is now changed.
    • QA Risk Assessment:
      Manual

      Description

      Hi,

      The following EPP snippet compiles with no issues and in a timely manner

      USER='<%= $hg_oais::archivematica::requirements::automation_tools::user %>'
      

      however this one (note the capitals) ends up in a catalog request that never finishes, indefinitely consuming 100% CPU in the thread where the jRuby instance assigned to compile is running.

      USER='<%= $hg_oais::archivematica::requirements::automation_tools::USER %>'
      

      No timeouts/errors master-side, nothing, just huge CPU usage forever.

      The variable name ought have no capitals indeed but the master should either fail or resolve to empty, but never hang.

      We're using Puppet agent 1.9.3 (Puppet 4.9.4) and Puppetserver 2.7.2. No attempts to hit the bug using Puppetserver5 were made so far.

      shows how two threads that had to compile that code have been consuming a large amount of CPU hours. That time roughly matches the time lapsed between the moment when the compilation request was issued and the time when the screenshot was taken. We don't see that pattern on masters that never saw that snippet.

      Could you please try to reproduce the issue?

      Thanks.

      (CERN internal reference: AI-4900)

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            nbarrientos Nacho Barrientos
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support