View Issue Details

IDProjectCategoryView StatusLast Update
0002174SOGoPackaging (RedHat)public2014-12-30 18:21
Reporterryacketta Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionsuspended 
Product Version2.0.3a 
Summary0002174: [Red Hat Based OS] init script does not properly shutdown SOGo
Description

Current init script only kills one PID when setting PREFORK greater then 1

PIDFILE=/var/run/$NAME/$NAME.pid

stop() {
echo $"Stopping $DESC: "
pid="cat $PIDFILE 2> /dev/null"
if [ -n "$pid" ]
then
pid="ps --pid ${pid} -o pid="
if [ -n "$pid" ]
then
kill $pid >& /dev/null
RETVAL=$?
echo " $NAME stopped"
else
echo " $NAME not running"
RETVAL=0
fi
else
echo " $NAME not running"
RETVAL=0
fi
return $RETVAL
}

maybe use something like

stop() {
echo -n $"Stopping $name: "
killproc -p ${PIDFILE} $DAEMON
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${LOGFILE} ${PIDFILE}
}

Additional Information

OS: Running Scientific Linux release 6.2 (Carbon)

TagsNo tags attached.

Activities

jraby

jraby

2013-01-10 20:11

viewer   ~0005126

Under normal circumstances, this is the expected behaviour: the init script signals the sogo master process which in turn will signal the childs.

This assumes that the childs will process the signal and that they are not stuck in a tight loop.
If we are to deal correctly with hung children, it should probably be done in the master, not in the init script.

ryacketta

ryacketta

2013-01-10 20:22

reporter   ~0005128

Ran into the 'hung' process scenario earlier today which lead me down this rabbit whole.

Parent was 100% CPU, did a service sogod stop and it only killed the parent while the children remained hanging around. Was forced to killall -u sogo -9.

ludovic

ludovic

2014-12-30 18:21

reporter   ~0007959

No change required here. This is the normal behavior.

Issue History

Date Modified Username Field Change
2013-01-10 15:03 ryacketta New Issue
2013-01-10 20:11 jraby Note Added: 0005126
2013-01-10 20:22 ryacketta Note Added: 0005128
2014-12-30 18:21 ludovic Note Added: 0007959
2014-12-30 18:21 ludovic Status new => resolved
2014-12-30 18:21 ludovic Resolution open => suspended
2014-12-30 18:21 ludovic Assigned To => ludovic