Bug 34321 - uvmmd-check.sh uses "kill" instead of "kill -9"
uvmmd-check.sh uses "kill" instead of "kill -9"
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 3.2
All Linux
: P3 normal (vote)
: UCS 3.2-1-errata
Assigned To: Erik Damrose
Philipp Hahn
:
Depends on: 33741
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-12 11:21 CET by Tim Petersen
Modified: 2014-03-17 13:00 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Large environments, Troubleshooting, UCS Performance
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2014-03-12 11:21:04 CET
+++ This bug was initially created as a clone of Bug #33741 +++

The check tries to kill the process with "kill" - I watched this behavior in a big customer environment - unfortunately "kill" wasn't enought due to FUTEX.

I'd suggest to use "kill -9" here.
Comment 1 Philipp Hahn univentionstaff 2014-03-12 16:52:14 CET
Since "runit" is in between, perhaps "force-stop" and/or "force-restart" should be used. (man 8 sv)

FYI: non-runit-init-scripts use something like this:
  start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5
Comment 2 Erik Damrose univentionstaff 2014-03-13 11:25:55 CET
The 'kill' command mentioned in comment 0 refers to the script uvmmd-check.sh. The script tries to determine the uvmm_d_ status by executing an uvmm command and waiting for its output. As the uvmm command writes and reads from the uvmm_d_ socket, it can easily be 'kill'ed. Uvmm_d_ is then restarted by calling its initscript.

Here, the uvmm_d_ that does not terminate because of a blocking FUTEX.

The initscript now uses force-restart and force-stop:
univention-virtual-machine-manager-daemon 3.0.17-6.489.201403131114
2014-03-13-univention-virtual-machine-manager-daemon.yaml
Comment 3 Philipp Hahn univentionstaff 2014-03-13 16:24:28 CET
OK: Upgrade

OK:
sed -i '/signal.SIGTERM/s/signal_handler_terminate/signal.SIG_IGN/' /usr/sbin/univention-virtual-machine-manager-daemon
kill -STOP $(</etc/runit/univention-virtual-machine-manager-daemon/supervise/pid)
bash -x /etc/init.d/univention-virtual-machine-manager-daemon restart
# terminates with old and new version
kill -STOP $(</etc/runit/univention-virtual-machine-manager-daemon/supervise/pid)
bash -x /etc/init.d/univention-virtual-machine-manager-daemon restart
# only terminates with new version

OK:
$EDITOR /usr/lib/univention-virtual-machine-manager-daemon/uvmmd-check.sh
exec >>"$logfile" 2>&1
set -x

kill -STOP $(</etc/runit/univention-virtual-machine-manager-daemon/supervise/pid)
tail -f /var/log/univention/virtual-machine-manager-daemon-errors.log
+ echo 'uvmm-check.sh: uvmm does not response like expected. Restarting uvmmd now.'
+ invoke-rc.d univention-virtual-machine-manager-daemon restart
=== 21194 === Thu, 13 Mar 2014 16:18:24 +0100 ===

OK: r48485
RFA r48488: s/support blocked processes/handle blocked UVMMd processes./
OK: announce_errata -V 2014-03-13-univention-virtual-machine-manager-daemon.yaml
Comment 4 Erik Damrose univentionstaff 2014-03-14 10:18:11 CET
(In reply to Philipp Hahn from comment #3)
> RFA r48488: s/support blocked processes/handle blocked UVMMd processes./

r48548: yaml wording improved
Comment 5 Moritz Muehlenhoff univentionstaff 2014-03-17 13:00:09 CET
http://errata.univention.de/ucs/3.2/71.html