Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-29 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg I'm going to move this over to SERVER since it seems highly likely that the JRuby issue is what's going on here. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Matthew Nicholson great, thanks for confirming. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Matthew Nicholson (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matthew Nicholson commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I actually do, yes.  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Matthew Nicholson do you also have hiera lookups in your catalogs, which may be looking up undefined variables? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Matthew Nicholson (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matthew Nicholson commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
So, just for a +1, I see this in my environment as well, every now and then, all 4 of my masters start throwing this on all catalogs(well...maybe not "all" but a very high percentage of them as most of our systems have nearly identical profiles/catalogs) , and a restart fixes it right away. I've seen this 3 times in maybe the last month and a half or so.  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Jeremy Barlow (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jeremy Barlow commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 

Jeremy Barlow can you think of any easy way to use jmap or some other tool to watch the instances of org.jruby.runtime.ThreadContext to confirm or refute the theory that the SoftReferences are being GC'd? Or, based on your recent work do you have any suggestions about how to force GC of SoftReferences in a reproducer program?
 
Chris Price For viewing when specific instances of objects are being created/freed across a set of snapshots, I've found taking repeated snapshots and viewing them via the YourKit Generations (https://www.yourkit.com/docs/java/help/generations.jsp) feature to be useful. With that, I can look at two different snapshot generation views and see whether or not specific instances of objects which are present in a generation in one view are still present in a different view at that same generation after a number of additional snapshots have been captured. 
I haven't found any methods, though, for forcing a "harder" GC that will clean up referents of SoftReferences when no other strong references to those referents exist. Supposedly - although it has seemed inconsistent for me - the referents of unused WeakReferences will be slated for clean up on any old GC whereas the references of SoftReferences will only get slated for clean up when there's sufficient memory pressure on the heap. 
Looking at the code snippets you linked, though, I wonder if we can take advantage of fact that the org.jruby.internal.runtime.ThreadService.localContext uses a ThreadLocal to more easily create a reproducer. 
For example, could we instrument Puppet Server such that every time a JRubyPuppet instance is used to send a catalog request that runs the code with the undefined variable, the call is marshaled onto a unique, bare java.lang.Thread instance that we spin up - avoiding any thread pooling that might otherwise have caused Java threads (and, via ThreadLocals, RubyThreads?) to be reused? 
Not sure since I haven't actually seen the reproducer setup but it may be that we haven't been able to locally reproduce the issue thusfar because our reproducer is largely just reusing the same Java thread (or small number of threads) in the Jetty web server's QueuedThreadPool. It could be that RubyThread objects aren't being created frequently enough to trigger the error as a result. In Jürgen Thomann's reproduction environment, though, threads in the QueuedThreadPool may be swapped out more frequently over time if there's more intermittent concurrency among the set of requests. Jetty will dispose/replace Java threads in its pool if they go idle for some period of time, scaling the number of outstanding threads up/down in order to meet demands of the incoming request load. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
  

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I found a code path in the JRuby code that might explain it. There is a method called org.jruby.Ruby#getCurrentContext, which gets called from lots and lots of places. Its call stack ends up checking for the existence of a soft reference of a context object that would contain the current RubyThread object, and if that reference has been cleared out by GC, then it calls an adopt method to "adopt" the current Java thread, which ultimately results in the construction of a new RubyThread instance. 
If you have enough load on your server, and a small enough heap size, it may be garbage collecting these SoftReferences frequently enough to trigger this code path and I think that would explain it. 
Jeremy Barlow can you think of any easy way to use jmap or some other tool to watch the instances of org.jruby.runtime.ThreadContext to confirm or refute the theory that the SoftReferences are being GC'd? Or, based on your recent work do you have any suggestions about how to force GC of SoftReferences in a reproducer program? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price It affected all which did a look up of a undefined variable. And we use at some places a external script from ruby code to do something and if it matters I have some gems installed were maybe the thread_safe gem is interesting as that one had a dependency to thread_safe. 
 
 
 
 
 
 
jruby-openssl (0.9.7 java) 
 
 
 
 
json (1.8.0 java) 
 
 
 
 
rake (10.1.0) 
 
 
 
 
rdoc (4.1.2) 
 
 
 
 
thread_safe (0.3.5 java) 
 
 
 
 
tzinfo (1.2.2) 
 
 
 
 
tzinfo-data (1.2016.4)
 
 
 
 
 
 
 
I looked also on the number it throws and it seems like the number increases by 200.000 in less than one minute. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-28 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Maybe one is created when asking for the current thread? 
 

henrik
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
The timeout code does appear to use Java threads behind the scenes, but I don't see anywhere where it is creating another instance of one of these special RubyThread objects, and it seems like those objects are the ones that would have the offending object ID on them. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Isn't things like "timeouts" also done with threads? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
One thing I notice is that some of the obvious places where JRuby ends up creating these thread objects is in calls to `popen3`, so I'd be curious whether or not you happen to be using that or similar methods for launching external processes in any of your modules? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann when this begins to happen to you, does it affect 100% of the catalog compilations that are looking up an undefined variable? Or is it only a subset of them? 
I'm poking around in this JRuby code, trying to think of a way that I can write a more reliable reproducer, and it's weird to me that the exception seems like it may be related to a RubyThread object, when we shouldn't be using any threads inside of the JRuby containers. It seems like generating a bunch of ruby objects in order to get that ObjectId counter into the "too high" territory will be easy, but it seems like after that I have to figure out how to cause a new RubyThread to be allocated. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Yes, thank you Jürgen Thomann! I'll keep an eye on that JRuby ticket, and also read through this code again to see if it gives me a better idea of how to come up with a local reproducer so that we can confirm the JRuby fix when it goes in. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6409 
 
 
 
  "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 The lookupvar function started failing after some time without any reason with a error message "Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, integer 2181729414 too big to convert to `int' at "this occured on 2 puppetserver at the same time (were restarted at the same time) and also only occur if the name to look up does not exist.I found someone with the same problem in the irc logs of #puppet and there it couldn't be debugged, because a restart fixed it. I still have them running as I could workaround this problem and so they still can be used for debugging. (User: Spec, logs at https://botbot.me/freenode/puppet/2016-05-31/)Stacktrace from puppetserver log is attached. Interesting is that the number which couldn't be converted is increasing over time UPDATEThis cause of this problem was found to be in JRuby  - see link "JRuby issue 3980". 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Thanks Jürgen Thomann, much appreciated! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-27 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I opened a bug at JRuby for it at https://github.com/jruby/jruby/issues/3980 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-26 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Well of cource - Java does not have unsigned integers (not until Java 8, and then with special logic). So 2^63 is actually not possible without some sign juggling. The implementation must use BigInteger to cover the full range of values. The logic found is however flawed in that it checks for Integer.MAX_VALUE instead of Long.MAX_VALUE (Integer is only 32 bits IIRC, and Long is 64). 
 
 
 
 
 
 
Integer.MAX_VALUE =  2147483647 
 
 
 
 
Integer.MIN_VALUE = -2147483648 
 
 
 
 
  
 
 
 
 
Long.MAX_VALUE =  9223372036854775807 
 
 
 
 
Long.MIN_VALUE = -9223372036854775808
 
 
 
 
 
 
 
Looks like a JRuby bug to me... 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
  

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-26 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
So a bit more searching in Java... We know from the snippet before, that 2^63 object ids are possible. So the next interesting part is fix2int (org.jruby.RubyNumeric) 
 
 
 
 
 
 
public static int fix2int(RubyFixnum arg) { 
 
 
 
 
long num = arg.getLongValue(); 
 
 
 
 
checkInt(arg, num); 
 
 
 
 
return (int) num; 
 
 
 
 
}
 
 
 
 
 
 
 
So here we are still using Long and then check if it is a valid int with checkInt (same class) 
 
 
 
 
 
 
public static void checkInt(IRubyObject arg, long num){ 
 
 
 
 
if (num < Integer.MIN_VALUE) { 
 
 
 
 
tooSmall(arg, num); 
 
 
 
 
  

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-26 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Good news, the error is back which means it can be reproduced even after a restart. Error message: 
 
 
 
 
 
 
Puppet  About to throw undef var exception!  Reason: '' (class: 'String') (inspect: '""') 
 
 
 
 
 
 
Henrik Lindberg Interesting. I just looked a bit more and found the following at https://github.com/jruby/jruby/blob/1ec7e208acb193a878eb80ad0cd5b3e88c752bff/core/src/main/java/org/jruby/RubyBasicObject.java#L1038: 
 
 
 
 
 
 
/** rb_obj_id 
 
 
 
 
 * 
 
 
 
 
 * Return the internal id of an object. 
 
 
 
 
 */ 
 
 
 
 
@JRubyMethod(name = "__id__") 
 
 
 
 
@Override 
 
 
 
 
public IRubyObject id() { 
 
 
 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-25 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price The log from Doug Rosser shows this: 
 
 
 
 
 
 
2016-06-21 20:37:01,415 ERROR [qtp251376563-14555] [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, integer 4165060920 too big to convert to `int' at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/master/file_sync.pp:169:8 on node redacted 
 
 
 
 
org/jruby/RubyKernel.java:1320:in `throw'
 
 
 
 
 
 
 
At line 1320, there is this: 
 
 
 
 
 
 
return rbThrowInternal(context, tag, new IRubyObject[] {arg}, block, uncaught19);
 
 
 
 
 
 
 
Which may be misleading, as the call into rbThrowInternal may be where the error is caused. This line (1350) is interesting: 
 
 
 
 
 
 
message += " in thread 0x" + Integer.toHexString(RubyInteger.fix2int(currentThread.id()));
 
 
 
 
 
 
 
If that thread id is very large it could perhaps cause the problem. That may also explain why it is difficult to reproduce this; you have to have thread id's that are very large. 
The code in question is found here: https://github.com/jruby/jruby/blob/1_7_20/core/src/main/java/org/jruby/RubyKernel.java#L1320 
 
 
 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-25 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
The code path is very much the same - although, when calling lookupvar in a template yourself, that call is unprotected unless placed in a a catch. The language evaluator does this: 
 
 
 
 
 
 
  def get_variable_value(name, o, scope) 
 
 
 
 
catch(:undefined_variable) { 
 
 
 
 
  x = scope.lookupvar(name.to_s) 
 
 
 
 
  # Must convert :undef back to nil - this can happen when an undefined variable is used in a 
 
 
 
 
  # parameter's default value _expression_ - there nil must be :undef to work with the rest of 3x. 
 
 
 
 
  # Now that the value comes back to 4x it is changed to nil. 
 
 
 
 
  return :undef.equal?(x) ? nil : x 
 
 
 
 
} 
 
 
 
 
# It is always ok to reference numeric variables even if they are not assigned. They are always undef 
 
 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-25 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I added the mentioned Pupppet.Warning line and also allowed the JRuby administrative API. I hope it is reproducible after some time again... And I currently have nearly 5 catalog compilations every day on a single puppetserver so that you have a number for comparison with your test. 
Just one question out of curiosity, how different are the code paths to look up variables within the Puppet DSL and Ruby/ERB? Because it was not breaking withing the Puppet DSL. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-24 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I left my local repro attempt running for about 3 days and wasn't able to repro. So, I guess, Jürgen Thomann, if you are willing to try that suggestion about the ruby patch and the admin endpoint for flushing, let me know how it goes. If we don't get any actionable info then I can look into putting together a custom .jar file for you that adds some instrumentation to the JRuby code, and maybe that'll help us figure it out? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-23 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
The reported Integer values could possibly be the Ruby Object ID of an object on the Ruby heap. If that is the case, go by a lottery ticket... 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-23 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann oh, I didn't realize we shipped our default auth.conf in a way where that was disabled. Not sure if we did that intentionally.  
No way to trigger that action w/o hitting the HTTP endpoint, unfortunately. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-23 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price I missed the setting in the auth.conf to allow this operation. Is it possible to do this over JMX or some other way? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-23 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann how did you disable the admin api? 
If you want to email me, my email address is just chris at puppet dot com. I'd be happy to take a look at the heap dump. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-23 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price Sadly I don't have the admin api enabled... I have a heap dump from monday with around 1GB and heap is set to -Xmx7500m. What is the best way to provide you with the heap? I have a server where I can put it but I wouldn't put a link to it here for the world to download. Email address would be fine. 
I will restart my puppet server with the change tomorrow to get it enabled and hope that it will somehow happen again... 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-22 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I left my reproduction attempt running overnight and it does not seem to have repro'd for me. I guess I will leave it running for a while longer and see what happens. 
If we can come up with an in-house reproducer I have a lot of ideas about how to debug this; if we can't, we might end up having to do something like create an instrumented build of JRuby and package it up to run in a user environment, which will be a lot more work for everyone  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-22 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann A heap dump wouldn't hurt - what is your max heap size set to? 
If we're unable to come up with a reliable reproducer on our end, then our best chance of tracking this down is probably to have you add a few debug print statements to the Puppet Ruby code itself. 
If you could edit `puppet/parser/scope.rb`, around line 520, and change this: 
 
 
 
 
 
 
begin 
 
 
 
 
  throw(:undefined_variable, reason) 
 
 
 
 
rescue  UNCAUGHT_THROW_EXCEPTION
 
 
 
 
 
 
 
to something like: 
 
 
 
 
 
 
begin 
 
 
 
 
Puppet.warning(" About to throw undef var exception!  Reason: '#{reason}' (class: '#{reason.class}') (inspect: '#{reason.inspect}')") 
 
 
 
 
  throw(:undefined_variable, reason) 
 
 
 
 
rescue  UNCAUGHT_THROW_EXCEPTION
 
 
 
 
 
 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-22 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Do you think a heap dump of the JVM could help you to look into it? I could create the error and then dump the heap so that there is a possibility to find something related to that number in the heap dump. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-22 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price I currently get it with any variable name which is not in any scope, so no need for any exact name. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-21 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg that's an interesting thought. 
Jürgen Thomann you said that {{ inline_template("<%= scope.lookupvar('::missing_variable') %>') }} will reliably reproduce it for you once your server is in this state? If so I'll change my reproduction attempt to use that exact string. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-21 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Just struck me that this may be subject to fun things like the sequence of characters in a variable name (for example, if the hash algorithm overflows). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-21 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg thanks. I'll look into that if I get a second. 
Meantime I spun up a puppet server locally that calls inline_template from site.pp and does a lookup on an invalid var in there; set up a curl script to loop making catalog requests against it. Has been running for a few hours now with no repro, will probably leave it running overnight if it hasn't repro'd before EOB. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-21 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Chris Price The closest thing I can think of is the "benchmarks" in the puppet code base, they set up "puppet as a library" for various tasks. See the respective "benchmarker.rb" files - for example /puppet/benchmarks/evaluations/benchmarker.rb. The benchmarks are driven by rake - driving them from something else should be trivial, and you should be able to trim that down to just what you need. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-21 Thread Chris Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Chris Price commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg is it possible to write a small ruby driver program that uses Puppet as a library and just executes a Puppet function? Assuming that the answer is "yes", do you have an example somewhere of how to do that? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-17 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg, I have some classes from ENC which I can't remove, but I replaced them with empty classes. At the end I have some empty classes plus the inline_template and it still breaks. I would say that just using inline_template is enough in my case to trigger this error. 
Jeremy Barlow I used puppet-agent 1.3.5 before with puppetserver 2.2.1 and that worked without any problems for several weeks. I updated puppet on Monday 08:56:10 UTC and this error started Tuesday 22:37:34 UTC.  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread Jeremy Barlow (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jeremy Barlow commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann, have you only started seeing this problem after upgrading to the specific versions of Puppet Server (2.4.0) and core Puppet (4.5.1) that you listed in this ticket submission? Were you unable to reproduce this issue on some earlier versions of Puppet Server and/or core Puppet and, if so, could you mention which ones? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann Thanks. When you try that, is that the only thing you are evaluating? That is could you try so that is the only logic that is being evaluated for the node? Also make sure there is nothing on the modulepath - only a site.pp with the inline_template call. (Thereby eliminating any interference from any loaded types, other functions, templates, 3d party ruby code etc). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
In my case it is enough to use inline_template("<%= scope.lookupvar('::missing_variable') %>') somewhere.within a manifest to get the error. 
Are there other places in Puppet where I could do some wrong stuff to throw errors? Maybe it is also somewhere else but no throw is used in normal cases. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
From what I can tell, it seems like jruby dies inside throw itself. I have one suspicion; there is a monkeypatch than makes it possible to compare strings with symbols, and maybe that is interfering with internals on JRuby (that is a long shot however). I have no theory why this works outside of functions and ERB templates, but fails inside them. To me this seems like a JRuby bug or a JRuby/JVM issue. 
Jürgen Thomann Do you have a small reproducer? Like a function, that when called shows the problem? 
The different numbers reported as being too large are probably the hash value for the symbol and it varies from run to run in a non deterministic way. 
Ping Chris Price 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Nevermind, it is still broken. Seems like I tested too much and missed something at some point 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
It now works again without any error. The last number from testing some stuff was 4024565408 so maybe there is now a different Bit set somewhere which makes it work again. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-16 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
with the following code you get a Evaluation Error: Error while evaluating a Function Call, undefined local variable or method `result' for Scope(Class[Test]):Puppet::Parser::Scope 
 
 
 
 
 
 
 result = nil 
 
 
 
 
  begin 
 
 
 
 
catch :undefined_variable do 
 
 
 
 
  result = lookupvar("_#{var}") 
 
 
 
 
end
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I'm more a stackoverflow ruby coder, so I hope this helps. If not let me know what I should do in the exception case. As you can see the number is now 3015141520. At the beginning of this errors it was just 2147856200 according to the logs. 
 
 
 
 
 
 
e.class => RangeError 
 
 
 
 
e.message => integer 3015141520 too big to convert to `int' 
 
 
 
 
e.backtrace.inspect = > ["org/jruby/RubyKernel.java:1320:in `throw'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/scope.rb:520:in `variable_not_found'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/scope.rb:501:in `lookupvar'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/scope.rb:499:in `lookupvar'", "/var/lib/puppet-env/juergen/modules/test/lib/puppet/parser/functions/testtest.rb:10:in `real_function_testtest'", "org/jruby/RubyArray.java:1613:in `each'", "/var/lib/puppet-env/juergen/modules/test/lib/puppet/parser/functions/testtest.rb:7:in `real_function_testtest'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions.rb:174:in `function_testtest'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions.rb:167:in `function_testtest'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:281:in `call_function'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:912:in `call_function_with_block'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:881:in `eval_CallNamedFunctionExpression'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:69:in `visit_this_1'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:350:in `eval_AssignmentExpression'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:69:in `visit_this_1'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:617:in `eval_BlockExpression'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:617:in `eval_BlockExpression'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:69:in `visit_this_1'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/parser/evaluating_parser.rb:63:in 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jürgen Thomann - will the examples you gave show the error if invoked for non existing variable? 
To help find out more, you could try a rescue of all errors around the lookupvar in a function as well as a catch of :undefined_variable and see what you get (stacktrace and type of error). Also note the stack trace in a raised error. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
In places with lookupvar I do a lookup with a variable that was constructed before in the following way: 
 
 
 
 
 
 
$lookup = "_${var}" 
 
 
 
 
$result = inline_template("<%= scope.lookupvar('::${lookup}') %>")
 
 
 
 
 
 
 
or within a function: 
 
 
 
 
 
 
  lookup = '_' + var 
 
 
 
 
  result = lookupvar(lookup)
 
 
 
 
 
 
 
So it shouldn't be possible here to pass numbers and both versions fail.  
If you know some ruby code to inject into puppetserver over inline_template or functions I could do that. I have 2 servers to try, so if the first try should do something bad to it I have one left for other things to try. 
Is it maybe possible that jruby has a bug somewhere with this? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
  

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
The reported line in scope (520) does this: 
 
 
 
 
 
 
  throw(:undefined_variable, reason)
 
 
 
 
 
 
 
and it has a catch of "uncaught throw" which then either accepts that and returns nil, or fails the lookup depending on settings. This construct allows code that catches :undefined_variable to handle that case on their own without having to rescue the error (which is much slower). 
If for some reason the "uncaught throw" is not working as it should - the logic would either fail with an error, or simply return nil. 
Could it be that there is a catch in puppet server? (it could also be that it does not work for MRI, but that it survives). The logic hinges on this definition: 
 
 
 
 
 
 
  UNCAUGHT_THROW_EXCEPTION = defined?(UncaughtThrowError) ? UncaughtThrowError : ArgumentError
 
 
 
 
 
 
 
modern MRI has UncaughtThrowError, older uses an ArgumentError. This means that on older MRI there is a very small chance that the rescue logic is invoked for some other error than uncaught throw. 
It is worth spending time trying to create a reproducer that shows the problem reliably. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
  

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Interesting - the hashing that (mostly) goes on during a lookupvar is the hashing of the key being looked up. Could it be that something other than a String is used as the key when things go wrong? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
This error occurs with inline_template and within custom ruby functions, I can also provide a stacktrace for the case, but that looks nearly identical. 
Regarding the --strict_variables setting, I don't have it enabled. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
I don't think this is the same problem (it was fixed in Puppet 4.4.1). While fixing it, I made sure that the Puppet code-base didn't contain other hash methods with the same problem. Then again, perhaps some module is involved that contains ruby code that computes overflowing hash codes? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Jeremy Barlow Yes, it could be the same root cause - the only other cause I can think of is if user is making calculations with huge numbers that overflow 64 bits (unlikely). Hash value calculations are more likely to overflow if not done correctly (as in 

PUP-6070
). 
However,  
The stacktrace reveals (I think) that the failure occurs when lookupvar() is called from within an ERB-template and it throws a variable not found. This suggests that the user is running with --strict_variables turned on. When doing that, all calls to lookupvar must only access existing variables. Code should check if a variable is defined before accessing it. In Ruby that can be done via a call to Scope#exists?('varname'). The problem may be a follow-on problem of the throw; logic swallows the throw and continues with faulty data/assumptions. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread Jeremy Barlow (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jeremy Barlow commented on  PUP-6409 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg, Thomas Hallgren - does this one sound familiar to you? I'm wondering if it is at all related to the root cause for 

PUP-6070
. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6409) integer too big to convert to `int' at with lookupvar

2016-06-15 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6409 
 
 
 
  integer  too big to convert to `int' at with lookupvar  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 4.5.1 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Attachments:
 

 stacktrace 
 
 
 

Components:
 

 Puppet Server 
 
 
 

Created:
 

 2016/06/15 5:53 AM 
 
 
 

Environment:
 
 
Debian Jessie with Puppet 4.5.1, Puppetserver 2.4.0 and java "1.8.0_92" 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Jürgen Thomann 
 
 
 
 
 
 
 
 
 
 
The lookupvar function started failing after some time without any reason with a error message "Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, integer 2181729414 too big to convert to `int' at " 
 

Jira (PUP-6409) "integer too big to convert to `int' at" with lookupvar

2016-06-15 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jürgen Thomann updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6409 
 
 
 
  "integer  too big to convert to `int' at" with lookupvar  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jürgen Thomann 
 
 
 

Summary:
 
 " integer  too big to convert to `int' at "  with lookupvar 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.