Issue #4955 has been updated by Markus Roberts. Status changed from Accepted to Ready for Testing Branch set to MarkusQ:tickets/2.6.x/4955
Sadly, the clever solution that Brice and I both liked better turned out to work a lot better in theory than in practice. The branch here uses the somewhat more gangling second option, of keeping reference counts on the sync objects for the memory leak and doing the thread safety dance around that. ---------------------------------------- Bug #4955: Puppet::Util.sync is not thread safe https://projects.puppetlabs.com/issues/4955 Author: Markus Roberts Status: Ready for Testing Priority: High Assignee: Markus Roberts Category: threading Target version: Affected version: 0.24.0 Keywords: Branch: MarkusQ:tickets/2.6.x/4955 The routine for issuing reference specific sync objects is tricky to use correctly since it is not thread safe (it also appears to leak memory): <pre> # Return the sync object associated with a given resource. def self.sync(resource) @@syncresources[resource] ||= Sync.new @@syncresources[resource] end </pre> The problem is somewhat muddled by the implication that the key object is a resource (and thus may be thread bound) -- in fact many of the code paths use something other than a resource as a key. This also affect threadlock, which is built on top of sync. Apparently I don't "get" irony, so I won't comment on that aspect of the situation, but this is still something that ought to be fix (a "bug," to be technical). -- 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.
