[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
Environment:

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


Template:

 Description   

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.



 Comments   
Comment by Henrik Lindberg [ 2017/05/15 ]

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

Generated at Mon Dec 16 02:16:01 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.