Comment 16 for bug 986973

Revision history for this message
Robie Basak (racb) wrote :

I found a machine exhibiting this problem. On Precise (facter 1.6.5-1ubuntu1), I ran the following experiments:

No patch: "puppet apply" failed 20 out of 100 runs.
Patched both memory.rb and processor.rb: "puppet apply" failed 0 out of 100 runs.
Patched only memory.rb: "puppet apply" failed 23 out of 100 runs.
Pathced only processor.rb: "puppet apply" failed 0 out of 100 runs.

So for me, patching just processor.rb fixed the problem. However, this being a race, it might be that I just wasn't able to trigger a race involving memory.rb in my specific circumstances.

The patch I used was https://github.com/puppetlabs/facter/commit/9ff4453b2f0843df887ae1ec2098a4336291df0c.patch. I can see that at least on Linux, all the affected areas do is parse /proc/meminfo and /proc/cpuinfo in a way that I don't see why any thread exclusive locks would be needed at all. Upstream seemed to agree in https://github.com/puppetlabs/facter/pull/174 and had no explanation for why they were put in either. So I think it's safe to backport all of the patch to Precise. I'll do this next week.