Facter bug causes puppet to hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
facter (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Robie Basak | ||
Quantal |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
[Impact]
"puppet apply" hangs about 20% of the time on affected servers. This
affects users using puppet without a puppetmaster. The normal use case
is to make "puppet apply" run regularly. This causes hung puppet
processes to build up, eventually exhausting system resources.
For those users using puppet without a puppetmaster, this makes puppet
unusable.
[Workaround]
Run puppet with the timeout command. For example:
timeout -k 300s 290s puppet apply /etc/puppet/
This assumes that there won't be another hang on the next run. This is useful if you run "puppet apply" from a cron job, for example, and assumes that not all attempts hang. If you need puppet to actually apply when you run the command, then no workaround is available.
[Development Fix]
Fixed upstream by removing some unnecessary thread-exclusive locks that
were evidently causing a deadlock when the facter module is used from
puppet in the "puppet apply" case.
[Stable Fix]
Development fix cherry-picked from upstream.
[Test Case]
1. apt-get install -y puppet
2. cat > /etc/puppet/
file { '/tmp/foo': content => 'bar'; }
EOT
3. successes=0; failures=0; for i in `seq 1 100`; do timeout -k 35s 30s puppet apply /etc/puppet/
Expected result: Successes: 100; failures: 0
Actual result (approx): Successes: 80; failures: 20
Note that this is dependent on a race condition, so this is difficult to
reproduce. I have not managed to reproduce the fault reliably except on
particular servers where it happens to occur. I have a server where it
is happening, and the fix eliminates the problem, and am prepared to use
this for -proposed verification.
[Regression Potential]
The code that runs inside each lock section is trivial, clearly does not
need a lock, and upstream concurs:
http://
[Original Description]
I found a bug with Facter that's affecting the version distributed with 12.04. Upstream bug report here: http://
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: facter 1.6.5-1ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-23-virtual x86_64
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Sun Apr 22 19:11:56 2012
Ec2AMI: ami-2616cd4f
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: c1.medium
Ec2Kernel: aki-825ea7eb
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
LC_CTYPE=
TERM=xterm
LANG=en_US.UTF-8
SHELL=/usr/bin/zsh
SourcePackage: facter
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in facter (Ubuntu): | |
assignee: | nobody → Marc Cluet (lynxman) |
description: | updated |
Pull request https:/ /github. com/puppetlabs/ facter/ pull/174 was committed by upstream in https:/ /github. com/puppetlabs/ facter/ commit/ 15b857472a75caf 9cd596c2b33d285 577382293a. I think it makes sense to SRU this.