Bug 1568549

Summary: radvd reports different PIDs in log, pidfile and ps
Product: Red Hat Enterprise Linux 7 Reporter: Ondrej Mejzlik <omejzlik>
Component: radvdAssignee: Pavel Zhukov <pzhukov>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.5   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 10:11:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ondrej Mejzlik 2018-04-17 18:09:38 UTC
Description of problem:
radvd reports a set of different PIDs in /var/log/messages, pidfile and "ps aux | grep radvd"

Version-Release number of selected component (if applicable):
Found on RHEL 7.5
$ uname -r

# rpm -qa | grep radvd

How reproducible:
Easy to reproduce.

Steps to Reproduce:
1. Start radvd with minimal functional config file
   radvd -p /tmp/pidfile.pid 
2. Compare pids in
   cat /tmp/pidfile.pid
   tail /var/log/messages 
   ps aux | grep radvd 

Actual results:
# cat pidfile.pid 

# tail /var/log/messages 
Apr 17 14:02:47 host-172-16-36-36 radvd[17813]: version 1.9.2 started

# ps aux | grep radvd
root     17814  0.0  0.0   8612   272 pts/0    S    14:02   0:00 radvd -p /tmp/pidfile.pid
root     17816  0.0  0.0   8612   360 ?        S    14:02   0:00 radvd -p /tmp/pidfile.pid

Expected results:
/var/log/messages should probably contain one of the pids seen in either the pidfile or ps.

Additional info:

Comment 2 Pavel Zhukov 2018-04-18 10:11:38 UTC
"radvd[17813]: version 1.9.2 started" printed on *stdout* prior to fork (and written to logs by systemd) so it contains pid file of parent process.  Daemon doesn't have stdout opened.