PacketFence - BTS - PacketFence
View Issue Details
0001464PacketFencecorepublic2012-06-11 12:272012-08-06 13:24
obilodeau 
obilodeau 
highminorsometimes
resolvedfixed 
 
3.4.03.4.0 
375c5ab
0001464: process management issues (pid misuse in listing and killing daemons)
Processes started with perl ... instead of specifying directly the executable name wouldn't be listed in status (which relies on pidof) and wouldn't be killed (which relies on pkill).

It's not 100% straightforward to reproduce but anything started under the debugger (perl -d ...) is simply not properly managed (killed or listed in status) which definitely causes problems when trying to investigate odd crashes.

Also, I think this could be related to the double processes started when pfsetvlan was restarted from the Web admin and could also explain the core dumps. I remember seeing that perl was explicitly mentionned in the `ps -ef` output.

Attempted workarounds:
- Using `pkill -f` matches the entire command line of the process and fixed the killing problems. However it doesn't work on listing statuses which relies on pidof.
- Setting $0 works for pidof but sometimes didn't work with pkill but I'm not too sure now (done that last Friday before leaving..)

We could either:
- implement both changes (re-validate in lab)
- implement -f pkill fix and use `pgrep -f` instead of pidof for status (warning: output format differs slightly)
No tags attached.
related to 0001478closed obilodeau pfdhcplistener not showing full start line under ps 
Issue History
2012-06-11 12:27obilodeauNew Issue
2012-06-12 14:36obilodeauStatusnew => assigned
2012-06-12 14:36obilodeauAssigned To => obilodeau
2012-06-12 14:37obilodeauNote Added: 0002756
2012-06-12 14:48obilodeaugit revision => 375c5ab
2012-06-12 14:48obilodeauNote Added: 0002757
2012-06-12 14:48obilodeauStatusassigned => resolved
2012-06-12 14:48obilodeauFixed in Version => +1
2012-06-12 14:48obilodeauResolutionopen => fixed
2012-06-14 12:15obilodeauTarget Version => 3.4.0
2012-06-14 12:15obilodeauFixed in Version+1 => 3.4.0
2012-06-14 12:16obilodeauNote Added: 0002772
2012-06-14 12:16obilodeauStatusresolved => closed
2012-07-19 11:18fgaudreaultNote Added: 0002848
2012-07-19 11:18fgaudreaultStatusclosed => feedback
2012-07-19 11:18fgaudreaultResolutionfixed => reopened
2012-07-19 11:19fgaudreaultRelationship addedrelated to 0001478
2012-08-06 13:24obilodeauNote Added: 0002872
2012-08-06 13:24obilodeauStatusfeedback => resolved
2012-08-06 13:24obilodeauResolutionreopened => fixed

Notes
(0002756)
obilodeau   
2012-06-12 14:37   
Re-tested the stuff properly and we can avoid the risky `pkill -f` if we set $0 ($PROGRAM_NAME) to basename($0) in all daemons. I'm taking that route.
(0002757)
obilodeau   
2012-06-12 14:48   
fix available in branch fix/process-management-1464. Will hit stable before the next stable release.
(0002772)
obilodeau   
2012-06-14 12:16   
fix released in 3.4.0 yesterday
(0002848)
fgaudreault   
2012-07-19 11:18   
Regression. We lost the arguments in the ps line.
(0002872)
obilodeau   
2012-08-06 13:24   
I marked this one as resolved as the underlying issue has been resolved. I'll update the related 0001478 in a second with a target and proper priority.