Puppet Strings 'Stack Level Too Deep'

15 views
Skip to first unread message

Trevor Vaughan

unread,
Feb 23, 2016, 1:24:26 PM2/23/16
to puppet...@googlegroups.com
Hi All,

I'm attempting (once again) to document all of my materials with Puppet Strings as a collected reference for *all* of my utilized modules.

Right now, this is somewhere around 1058 Puppet and Ruby artifacts.

Unfortunately, at some point, the Strings Gem gives up the ghost and prints "SystemStackError: stack level too deep'.

It also starts printing errors on files that clearly do not have errors (lint passes and 'puppet strings' on just the failing file passes).

Not quite sure what's going on here or even how to debug it properly.

Thanks,

Trevor

--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

Henrik Lindberg

unread,
Feb 23, 2016, 3:41:57 PM2/23/16
to puppet...@googlegroups.com
On 23/02/16 19:24, Trevor Vaughan wrote:
> Hi All,
>
> I'm attempting (once again) to document all of my materials with Puppet
> Strings as a collected reference for *all* of my utilized modules.
>
> Right now, this is somewhere around 1058 Puppet and Ruby artifacts.
>
> Unfortunately, at some point, the Strings Gem gives up the ghost and
> prints "SystemStackError: stack level too deep'.
>
> It also starts printing errors on files that clearly do not have errors
> (lint passes and 'puppet strings' on just the failing file passes).
>
> Not quite sure what's going on here or even how to debug it properly.
>
> Thanks,
>
> Trevor
>
Out of stack is nasty to solve. It helps running on JRuby as you get
more intelligent backtraces than the "ooops, out of stack" that MRI has
to offer. (The place it says it is out of stack is just unlucky, it can
be one step in a very long cycle).

The first problem is if it needs more stack or not. Bumping it up to
twice the amount or so may make it work. It could also be an infinite
recursion bug in Strings or in Puppet.

Getting a stack trace is thus of value. Armed with the first stack trace
it may be possible to figure out where to instrument the code.
Even it the trace does not show where a cycle starts, it is possible to
figure out what is involved in the cycle. Then artifically inserting a
raise and exception or invoke the debugger at that point i.e. when stack
level is over a certain treshold. Then look at that stack trace to see
the entry into the cycle. Then debug that...

(painful and slow)

- henrik


> --
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699
>
> -- This account not approved for unencrypted proprietary information --
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANs%2BFoV_G4uFqFPJ7pj5qEg6k-5jAowm50r-esFUsD8U5osUEw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CANs%2BFoV_G4uFqFPJ7pj5qEg6k-5jAowm50r-esFUsD8U5osUEw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Trevor Vaughan

unread,
Feb 23, 2016, 5:55:05 PM2/23/16
to puppet...@googlegroups.com
Thanks for the response Henrik,

I was worried that it would be something this fun...

The following script can be used to easily repeat the phenomenon that I'm seeing if someone with some more in depth knowledge on the workings of the Parser and Strings has a chance to take a look.

Any errors that are thrown appear to be object corruption since I can run 'puppet strings' directly on them without issue.

#!/bin/sh
git clone https://github.com/simp/simp-core puppetdoc_test
cd puppetdoc_test
git checkout 5.1.X
bundle
rake deps:checkout
cd src/doc
git fetch --all
git checkout autodoc
bundle
rake docs:auto

Thanks,

Trevor

To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56CCC403.9070504%40puppetlabs.com.

For more options, visit https://groups.google.com/d/optout.



--

Henrik Lindberg

unread,
Feb 23, 2016, 8:54:35 PM2/23/16
to puppet...@googlegroups.com
On 23/02/16 23:54, Trevor Vaughan wrote:
> Thanks for the response Henrik,
>
> I was worried that it would be something this fun...
>
> The following script can be used to easily repeat the phenomenon that
> I'm seeing if someone with some more in depth knowledge on the workings
> of the Parser and Strings has a chance to take a look.
>
> Any errors that are thrown appear to be object corruption since I can
> run 'puppet strings' directly on them without issue.
>
> #!/bin/sh
> git clone https://github.com/simp/simp-core puppetdoc_test
> cd puppetdoc_test
> git checkout 5.1.X
> bundle
> rake deps:checkout
> cd src/doc
> git remote add doctest https://github.com/trevor-vaughan/simp-doc
> git fetch --all
> git checkout autodoc
> bundle
> rake docs:auto
>
> Thanks,
>
> Trevor
>

Please file a PDOC Jira ticket if you have not already (with the
information how to reproduce).

- henrik

> On Tue, Feb 23, 2016 at 3:41 PM, Henrik Lindberg
> <henrik....@puppetlabs.com <mailto:henrik....@puppetlabs.com>>
> (410) 541-6699 <tel:%28410%29%20541-6699>
>
> -- This account not approved for unencrypted proprietary
> information --
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from
> it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users%2Bunsu...@googlegroups.com>
> <mailto:puppet-users...@googlegroups.com
> <mailto:puppet-users%2Bunsu...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANs%2BFoV_G4uFqFPJ7pj5qEg6k-5jAowm50r-esFUsD8U5osUEw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CANs%2BFoV_G4uFqFPJ7pj5qEg6k-5jAowm50r-esFUsD8U5osUEw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to puppet-users...@googlegroups.com
> <mailto:puppet-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/56CCC403.9070504%40puppetlabs.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699
>
> -- This account not approved for unencrypted proprietary information --
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANs%2BFoX1R_JRL%3D%2BfqS3JwSoANxtQmk_L2O22%3D8UxwgFB0E3MsQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CANs%2BFoX1R_JRL%3D%2BfqS3JwSoANxtQmk_L2O22%3D8UxwgFB0E3MsQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Trevor Vaughan

unread,
Feb 24, 2016, 6:04:47 AM2/24/16
to puppet...@googlegroups.com
PDOC-71 Created: https://tickets.puppetlabs.com/browse/PDOC-71

Thanks,

Trevor

To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56CD0D49.7020504%40puppetlabs.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages