To reproduce:* Set Unbound log level to 1* Enable "Flush DNS Cache during reload"* Run as root: sh -c 'while :; do pluginctl unbound_start; sleep 20; done'After a few iterations the startup problem should be triggered.
while true; do echo "$(date) $(stat -x /var/run/unbound.pid | grep Change:) file: $(cat /var/run/unbound.pid) pid: $(pgrep unbound) mount: $(mount | grep -c /var/unbound/dev)"; sleep 0.1 ; done
pluginctl unbound_start & pluginctl unbound_start & pluginctl unbound_start & pluginctl unbound_start & pluginctl unbound_start &
On my master/slave opnsense setup with a configuration synchronisation per minute (cron command: HA update and reconfigure backup) I've tried to debug further:
Quote from: zentoo on November 20, 2023, 02:47:22 pmOn my master/slave opnsense setup with a configuration synchronisation per minute (cron command: HA update and reconfigure backup) I've tried to debug further:Do not do this.Each config sync will restart the services on the slave firewalls, e.g. an ntp service will never finish its synchronisation and so on.This will cause more trouble than it is worth.Increase the interval to at least one hour.
#!/bin/cshset UnboundCPU=`ps auwwx | grep /usr/local/sbin/unbound | grep -v grep | awk '{print $3}' | awk -F. '{print $1}' | grep 100`exit $UnboundCPU
#!/bin/cshpgrep "unbound" | grep -v "$$" | xargs kill -9
/usr/local/sbin/pluginctl -c unbound_start