Issue #19973 has been updated by Charlie Sharpsteen.

Status changed from Unreviewed to Investigating
Assignee set to Charlie Sharpsteen

Couldn't re-produce this by taking a quick stab at it, but I'll look into the 
code that calls the enc and see if anything looks suspicious.

----------------------------------------
Bug #19973: puppet randomly hangs when using a fast-returning enc script
https://projects.puppetlabs.com/issues/19973#change-90781

* Author: John Leach
* Status: Investigating
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: 
* Target version: 
* Affected Puppet version: 2.7.11
* Keywords: enc
* Branch: 
----------------------------------------
I'm running puppet locally with an enc script that just cats a file, so it 
finishes very quickly. Once every few runs, puppet hangs when running it. The 
process list shows the enc script has finished ([sh] <defunct>) but puppet just 
sits waiting for it.

I reproduced it with a minimal script and config:

<pre>
#!/bin/sh
echo -e "classes:\n"
</pre>

<pre>
[main]
  node_terminus = exec
  external_nodes = /home/ubuntu/enc.sh
</pre>

Then I run the "puppet apply" command in a while loop and it eventually hangs, 
like this:

<pre>
$ puppet apply --config puppet.conf --debug -e ''
debug: Executing '/home/ubuntu/enc.sh srv-kyawg.gb1.brightbox.com'
</pre>

When it hangs, the process list looks like:

<pre>
buntu    2275  0.0  0.2   9616  1444 ?        S    12:54   0:00  |   \_ sshd: 
ubuntu@pts/0  
ubuntu    2276  0.0  1.1   9520  5900 pts/0    Ss   12:54   0:00  |       \_ 
-bash
ubuntu   27250  0.5  3.9  31876 20044 pts/0    Sl+  13:23   0:00  |           
\_ /usr/bin/ruby1.8 /usr/bin/puppet apply --config puppet.conf --debug -e ''
ubuntu   27302  0.0  0.0      0     0 pts/0    Z+   13:23   0:00  |             
  \_ [sh] <defunct>
</pre>

If I add a "sleep 1" to the enc script (before the echo) the problem goes away 
(I left it running in a loop for a long time without incident).

I tried debugging this, but I'm not so familiar with the puppet codebase. And 
also, adding a ruby trace proc to puppet appears to stop the problem happening 
too (a trace proc obviously slows the code down, so essentially introduces a 
sleep).

I cannot reproduce this with puppet 3.1.1, but I thought it was worth reporting 
it because the root cause of the problem might not actually be fixed - it might 
just have become harder to reproduce.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to