Re: 3.18.1: duplicate cf-exexd processes
"vratislav.podzimek via help-cfengine" <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2022-03-14 at 01:26 -0700, Xander Cage wrote: > before 3.18 cf-execd runs the agent in an thread, now cf-execd replicates itself in a new process > (hence duplicate processes) and starts the agent from this process, at least in my understanding. And it is correct. cf-execd forks (duplicates) itself and the forked (child) process spawns cf-agent and terminates. However, terminated processes need to be reaped by their parent processes and the original (parent) cf-execd process only does that once per minute. So every time cf-execd spawns cf-agent, there's a dead/inactive/zombie/defunct cf-execd for a minute. Hope the bit of extra explanation helps. -- Vratislav > > On Sunday, March 13, 2022 at 9:57:00 PM UTC+1 brontolinux wrote: > > Hello there > > I am hitting a related problem in Debian 11. > > I have just ported by policies from 3.15.5 to 3.18.1. I got both CFEngine and systemd > > complaining about the duplicated process so I applied Nick's patch, and now I have a different > > problem. > > I have not completely understood what's going on. Is it cf-agent that starts a new cf-execd? Or > > is it cf-execd that clones itself and then spawns cf-agent, but then doesn't terminate? Whatever > > it is, when the new agent run starts, one cf-execd is killed (by what?), then the agent starts, > > and then systemd complains again about the duplicated cf-execd... I am trying to figure out, but > > my brain is already in bed tonight. > > Anyone who knows better about the changes around cf-execd in 3.18 and understands what the heck > > is going on here? And, especially, how to fix this? > > > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Main process exited, code=killed, > > > status=9/KILL > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Failed with result 'signal'. > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Unit process 60482 (cf-execd) remains > > > running after unit stopped. > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Unit process 60483 (sh) remains running > > > after unit stopped. > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Unit process 60503 (cf-agent) remains > > > running after unit stopped. > > > Mar 13 21:43:54 minardi systemd[1]: cf-execd.service: Consumed 1.083s CPU time. > > > Mar 13 21:43:54 minardi cf-agent[60503]: CFEngine(agent) R: [INFO > > > abort_agent_if_disabled/methods] The agent is starting. To disable, create flag file > > > /etc/cfengine/disable > > > Mar 13 21:43:54 minardi cf-agent[60503]: CFEngine(agent) R: [INFO main/methods] Promises > > > version 5.28.2 from branch master > > > Mar 13 21:43:54 minardi cf-agent[60503]: CFEngine(agent) R: [INFO main/methods] Our policy > > > server is 52.211.82.124 > > > Mar 13 21:43:55 minardi cf-agent[60503]: CFEngine(agent) R: [INFO apply_roles/methods] > > > Applying roles: standard_node, cfdevnode, home_pc. > > > Mar 13 21:44:00 minardi cf-agent[60503]: CFEngine(agent) R: [INFO main/methods] Custom > > > configuration completed > > > Mar 13 21:44:04 minardi systemd[1]: cf-execd.service: Scheduled restart job, restart counter > > > is at 2. > > > Mar 13 21:44:04 minardi systemd[1]: Stopped CFEngine Execution Scheduler. > > > Mar 13 21:44:04 minardi systemd[1]: cf-execd.service: Consumed 4.924s CPU time. > > > Mar 13 21:44:04 minardi systemd[1]: cf-execd.service: Found left-over process 60518 (cf-execd) > > > in control group while starting unit. Ignoring. > > > Mar 13 21:44:04 minardi systemd[1]: This usually indicates unclean termination of a previous > > > run, or service implementation deficiencies. > > > Mar 13 21:44:04 minardi systemd[1]: Started CFEngine Execution Scheduler. > > Ciao! > > -- bronto > > > -- > You received this message because you are subscribed to the Google Groups "help-cfengine" group. > To unsubscribe from this group and stop receiving emails from it, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/help-cfengine/fd7a9d2e-dca5-4f48-b5c8-17d070e3dec1n%40googlegroups.com > . -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/303ee5c164550184fbb9b5b3d2981094f4ee6d0c.camel%40northern.tech.