Unbound Restarting every 2 hours after upgrade to 22.7

Started by andrema2, July 29, 2022, 10:01:52 PM

Previous topic - Next topic
Just joining in here as I'm seeing the same.

Using DHCP on the WAN which has a lease time of 5 mins meaning Unbound restarts every 2.5 mins :)

2022-08-02T15:27:06   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:24:36   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:22:07   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:19:36   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:17:06   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:14:36   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:12:06   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:09:37   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:07:06   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.   
2022-08-02T15:04:36   Notice   unbound   [62126:0] notice: Restart of unbound 1.16.1.

So there is two issues here:

1. New 22.7 behaviour surfaced spurious Unbound HUP reloads through hosts regeneration (which was the case forever)

https://github.com/opnsense/core/commit/7aaa6a263b1

2. Actual regression in 22.7 causing the new behaviour

https://github.com/opnsense/core/commit/bb4743a7322

I'd recommend trying both in tandem:

# opnsense-patch 7aaa6a263b1 bb4743a7322

...and report back the results. :)


Thanks,
Franco

I applied the patch and rebooted the machine to get a reference point.

2022-08-02T10:12:12 Notice shutdown reboot by root:

I don't have any instance of [Restart of Unbound 1.16.1] after 10:05:26
Nor do I have any instance of [IPv4 renewal is starting on 'igb0'] after 10:14:35

However, the 30 min IP renewal seems to continue normally

2022-08-02T13:11:28 Notice dhclient Creating resolv.conf
2022-08-02T12:43:18 Notice dhclient Creating resolv.conf
2022-08-02T12:13:18 Notice dhclient Creating resolv.conf
2022-08-02T11:43:18 Notice dhclient Creating resolv.conf
2022-08-02T11:13:18 Notice dhclient Creating resolv.conf
2022-08-02T10:43:17 Notice dhclient Creating resolv.conf
2022-08-02T10:13:17 Notice dhclient Creating resolv.conf
2022-08-02T10:05:24 Notice dhclient Creating resolv.conf

Sure, dhclient needs to react and invokes dhclient-script, but the script no longer calls rc.newwanip as was the case on 22.1.


Cheers,
Franco

I applied the patches earlier today, rebooted for good measure, and I'm happy to report that unbound hasn't been restarted since. Thanks!
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

So I applied the patches as well on my Protecli FW2B and it has resolved the issue for me.

Thanks Franco!

... will there be a hotfix here again? :)
I have the same problem.

Quote from: mueller on August 02, 2022, 06:42:03 PM
... will there be a hotfix here again? :)
I have the same problem.

I read in another topic it's scheduled for 22.7.1 which will probably be released next week.
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.


Quote from: mueller on August 02, 2022, 07:35:19 PM
Very good, because that is quite annoying :)

You can apply the patch manually as described earlier in this topic, it won't mess up the official releases.
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

Yes, I think that's where it starts to stop for me ;)

I installed the patch and it has resolved the issue for me also. thnx
Deciso DEC850v2

Added both patches and looks resolved! Thanks @franco

# opnsense-patch 7aaa6a263b1 bb4743a7322

Unbound is no longer restarting when then WAN DHCP lease renews
No more "Error opnsense/usr/local/etc/rc.newwanip" in system logs

Thanks again!

9 h later and Unbound is till behaving.  :) Thank you Franco.

It took me a while to realize that you have to enter the above command (# opnsense-patch 7aaa6a263b1 bb4743a7322) via the Secure Shell :-/

I thought I had to download any patches and copy them to certain places etc..

Now everything runs great, many, many thanks