Issue #4921 has been updated by James Turnbull.

Status changed from Ready for Testing to Closed

Pushed in commit:f57425da6aeefd4ff019068c5933add0d2a02f87 in branch 2.6.x
----------------------------------------
Bug #4921: Parser functions creation is not thread-safe 
https://projects.puppetlabs.com/issues/4921

Author: Brice Figureau
Status: Closed
Priority: Normal
Assignee: 
Category: functions
Target version: 2.6.3
Affected Puppet version: 2.6.1
Keywords: 
Branch: http://github.com/masterzen/puppet/tree/tickets/2.6.x/4921


Parser functions are lazily created in the environment when needed.
When running with puppet-load with 4 simulated clients, this creates 4 ruby 
green threads in the master.
Each one tries to create the functions and the following error happens:

<pre>
err: Could not autoload template: Function template already defined at 
/home/brice/cvs/puppet/modules/apt/manifests/init.pp:95 on node test.domain.com
</pre> 

Of course template is defined only once, since it is part of Puppet. This 
happens because two threads enter the functions autoloader at the same time.  
See lib/puppet/functions.rb line 77. 

The Puppet::Parser::Functions#function should be protected by a critical 
section.


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

Reply via email to