Bugzilla – Bug 840
infinite loop in unbound_munin_ plugin
Last modified: 2016-09-29 13:50:32 CEST
Description of problem: unbound_munin_ plugin loops infinitely when unable to get lock Version-Release number of selected component (if applicable): unbound-1.4.20-26.el7.x86_64 munin-node-2.0.25-11.el7.noarch plugin downloaded from http://unbound.nlnetlabs.nl/svn/trunk/contrib/unbound_munin_ How reproducible: Execute munin-run unbound_munin_queue when plugin is not configured to run as root Steps to Reproduce: 1. comment user root in plugin config file 2. execute munin-run unbound_munin_queue Actual results: a lot of /etc/munin/plugins/unbound_munin_queue: line 153: /var/lib/munin/plugin-state/unbound-state.lock: Permission denied /etc/munin/plugins/unbound_munin_queue: line 153: /var/lib/munin/plugin-state/unbound-state.lock: Permission denied ... , cpu overloaded, munin-node unresponsive Expected results: some fine error message and munin-node not locked in that plugin
Hi Vaclav, Here is a patch! Thanks for the report, the patch is also integrated into the code repository. Index: contrib/unbound_munin_ =================================================================== --- contrib/unbound_munin_ (revision 3872) +++ contrib/unbound_munin_ (working copy) @@ -150,7 +150,7 @@ fi done # try to get it - echo $$ >$lock + if echo $$ >$lock ; then : ; else break; fi done # do not refetch if the file exists and only LEE seconds old if test -f $state; then Best regards, Wouter