Bug #509
Puppetd listen produces runaway child process
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.22.2 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Doing “puppetd —listen —debug” results in two processes and the child process keeps running with 100% CPU.
It looks like the parent process does a configuration run which takes a minute or so. Afterwards, it forks a child process. The child process continues to run with 100%. The parent process is suspended.
The console log says:
notice: Starting configuration run
But does not show any details of the configuration run or the ending of the configuration run.
Doing puppetrun from another machine results in:
Triggering edev3 Host edev3 is already running edev3 finished with exit code 3 Failed: edev3
History
Updated by Ian Burrell over 5 years ago
Killing the child process with normal SIGTERM does not stop it. kill -9 is needed.
I suspect that the parent process is in the middle of the configuration run. It will start another runaway process. It displays:
Execution of ‘/usr/bin/yum -d 0 -e 0 -y install AS3-rtk-perl-5.6.1-libdbd-oracle10’ returned : err: //edev3/base_server/rtk_perl_database/Package[AS3-rtk-perl-5.6.1-libdbd-oracle10]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y install AS3-rtk-perl-5.6.1-libdbd-oracle10’ returned :
Killing or quiting the parent process is required. My guess is that executing yum with —listen is causing a runaway process.
I am running Centos 4 with ruby 1.8.5 (from dev.centos.org).
Updated by Brendan Beveridge about 5 years ago
I also get the same
When i try and run puppetd —debug —listen i get a child process that maxes out cpu when it tries to call apt or dpkg for checking packages:
debug: Calling fileserver.describe debug: package provider apt: Executing ‘/usr/bin/dpkg-query -W —showformat ${Status} ${Package} ${Version}\n rdoc’
If i kill the child proc that was spawned for this it continues with the next operation:
debug: //citadel/template-node-syd/ubuntu/Package[rdoc]: Changing ensure debug: //citadel/template-node-syd/ubuntu/Package[rdoc]: 1 change(s) debug: //citadel/template-node-syd/ubuntu/Package[rdoc]/ensure: setting latest (currently absent) debug: package provider apt: Executing ‘/usr/bin/apt-get -q -y -o DPkg::Options::=—force-confold install rdoc’
This keeps repeating with every package i have set in the manifest.
If i do a trace on the child proc: strace -p rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 sigprocmask(SIG_SETMASK, [], NULL) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 sigprocmask(SIG_SETMASK, [], NULL) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0
This is occuring on ubuntu 6.06 x86 with facter 1.3.6 and puppet 0.22.1 This also occurs on ubuntu 6.06 sparc with facter 1.3.6 and puppet 0.22.1
Updated by Luke Kanies about 5 years ago
- Status changed from 1 to 2
I’m hoping to get this fixed in grover, but it requires that I actually get it reproduced.
Updated by Brendan Beveridge about 5 years ago
Ok Found a fix in my situation, in /usr/local/lib/site_ruby/1.8/puppet/util.rb find this section: if Puppet[:listen] and comment out the whole if statement
if Puppet[:listen]¶
ObjectSpace.each_object+do+|object|">ObjectSpace.each_object do |object|¶
if object.is_a?(TCPServer) and ! object.closed?¶
begin¶
object.close¶
rescue¶
Just ignore these, I guess¶
end¶
end¶
end¶
end¶
Updated by Luke Kanies about 5 years ago
- Status changed from 2 to Closed
- 7 set to fixed
This should all be fixed in SVN now, both with my removal of the ObjectSpace stuff and with mccune’s code that usually ignores the output of commands.