Date: Mon, 14 Aug 2017 10:47:54 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 221518] net-mgmt/smokeping: smokeping process changes its name Message-ID: <bug-221518-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221518 Bug ID: 221518 Summary: net-mgmt/smokeping: smokeping process changes its name Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: rodrigo@FreeBSD.org Reporter: vegeta@tuxpowered.net Assignee: rodrigo@FreeBSD.org Flags: maintainer-feedback?(rodrigo@FreeBSD.org) As smokeping runs as a deamon, at some point it looses its process name. Th= is means that check_pidfile won't be able to find the PID of the main process (even the 2nd call in smokeping_check_pidfile, the one with $command_interpreter). So smokeping is considered dead by `service smokeping status` and my Puppet attempts to start a new one. The fix from bug 221009 = is not enough in such cases. I found what happens by running `while [ true ]; do; date; ps up `pgrep -u smokeping`; sleep 1; done` for a few days. Below you can see the transition happening. The PID is the same, the process is not restarted. It just looses the command line. Fri Aug 4 12:44:45 UTC 2017 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 17248 0.0 0.0 12364 1544 - S 12:44PM 0:00.00 /usr/bin/fp= ing -C 9 -q -B1 -r1 -i10 -p6000 A.A.A.A B.B.B.B C.C.C.C smokeping 45265 0.0 0.2 210384 14128 - Is 2:20PM 0:00.01 /usr/local/bin/perl /usr/local/bin/smokeping --master-url=3Dhttp://XXX:8080/ --cache-dir=3D/usr/local/var/smokeping/ --shared-secr smokeping 45266 0.0 0.3 210384 16620 - S 2:20PM 0:07.75 /usr/local/bin/smokeping [FPing] (perl) Fri Aug 4 12:44:46 UTC 2017 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 17248 0.0 0.0 12364 1544 - S 12:44PM 0:00.00 /usr/bin/fp= ing -C 9 -q -B1 -r1 -i10 -p6000 A.A.A.A B.B.B.B C.C.C.C smokeping 45265 0.0 0.2 210384 14128 - Is 2:20PM 0:00.01 /usr/local/bin/perl /usr/local/bin/smokeping --master-url=3Dhttp://XXX:8080/ --cache-dir=3D/usr/local/var/smokeping/ --shared-secr smokeping 45266 0.0 0.3 210384 16620 - S 2:20PM 0:07.75 /usr/local/bin/smokeping [FPing] (perl) Fri Aug 4 12:44:47 UTC 2017 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 17248 0.0 0.0 12364 1320 - S 12:44PM 0:00.00 /usr/bin/fpi= ng -C 9 -q -B1 -r1 -i10 -p6000 A.A.A.A B.B.B.B C.C.C.C smokeping 45265 0.0 0.0 210384 0 - IWs - 0:00.00 (perl) smokeping 45266 0.0 0.1 210384 9284 - S 2:20PM 0:07.75 /usr/local/bin/smokeping [FPing] (perl) Fri Aug 4 12:44:48 UTC 2017 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 17248 0.0 0.0 12364 1320 - S 12:44PM 0:00.00 /usr/bin/fpi= ng -C 9 -q -B1 -r1 -i10 -p6000 A.A.A.A B.B.B.B C.C.C.C smokeping 45265 0.0 0.0 210384 0 - IWs - 0:00.00 (perl) smokeping 45266 0.0 0.1 210384 9284 - S 2:20PM 0:07.75 /usr/local/bin/smokeping [FPing] (perl) Is loosing command line arguments intrinsic property of processes swapped o= ut? Being swapped out is the thing that changed for this process at some point. Also it seems that when I managed to unswap the process, it recovered its process name: [root@XXXX ~]% ps up 45265=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 45265 0.0 0.0 210384 0 - IWs - 0:00.00 (perl) [root@XXXX ~]% kill -HUP 45265 [root@XXXX~]% ps up 45265=20=20=20=20 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND smokeping 45265 0.0 0.1 210384 8160 - DLs 3Aug17 0:00.02 /usr/local/bin/perl /usr/local/bin/smokeping --master-url=3Dhttp://XXX:8080/ --cache-dir=3D/usr/local/var/smokeping/ --shared-secre That would mean that we must trust the PID in /usr/local/var/smokeping/pid = and not perform any additional checks on commandline or interpreter. Other opti= on would be to not use daemonizing within smokeping and use daemon(8) instead = and use its pid for management. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221518-13>