[PUP-5072] parser validate hangs on unclosed quotes and braces Created: 2015/08/25  Updated: 2017/05/18  Resolved: 2017/05/15

Status: Closed
Project: Puppet
Component/s: Language
Affects Version/s: PUP 4.2.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tim Stibbs Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

CentOS 6.4, puppet_version=4.2.1, ruby_version=2.1.6, run_mode=user, default_encoding=UTF-8



Certain combinations of unclosed quotes and braces can cause puppet parser validate to hang.

To reproduce:

  1. Put the following into a file test.pp

    class { 'class1':
        param1 => "${val1,
        param2 => "${val2
    randomresource { "/*"

  2. run puppet parser validate test.pp

It will hang. Even with --verbose --debug the only output I get is the Debug: Runtime environment: puppet_version=... line.

The code above is a contrived example minimised as small as I can get it (the quotes and the /* in the second resource all seem to be required to reproduce), but it came from a real-world manifest where I had mucked up a find-replace.

This is a pretty minor issue, but I'm reporting it as ideally it would give you a helpful message telling you which line of your code was invalid.

Comment by Henrik Lindberg [ 2017/05/15 ]

On latest 4.x this is no longer a problem. Closed as cannot reproduce.

Generated at Wed Jul 15 11:31:03 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.