From 18d662f4d2cddd78b1cb28055bef8b9235a3fe15 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 16 May 2023 17:33:42 +0300 Subject: [PATCH 1/4] Pass the right worker into isc__nm_async_sockstop() The intention behind 'isc__nmsocket_stop()' was that the function sends notifications on every worker thread, making them synchronise on the barrier, then the initiating thread waits on it, too. This way we ensure than no other operation will start when we shutting down the listener. However, it seems that due to mistake we have been passing the wrong worker pointer into isc__nm_async_sockstop() from within the context of an worker thread which has initiated shutting down. While effectively we have not been using the pointer in this case, it could cause maintenance issues later. This commit fixes that. --- lib/isc/netmgr/netmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 74d326aa0a..00a7945edb 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -2756,7 +2756,7 @@ isc__nmsocket_stop(isc_nmsocket_t *listener) { } if (isc__nm_in_netthread()) { - isc__nm_async_sockstop(&listener->mgr->workers[0], + isc__nm_async_sockstop(&listener->mgr->workers[isc_nm_tid()], (isc__netievent_t *)&ievent); } } From 9ab6c3a5b17f462309c46b0e3ec8ba67b2d631f6 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 16 May 2023 18:44:04 +0300 Subject: [PATCH 2/4] Make sockstop netievent a high-priority one Seemingly by omission, sockstop netievent used by multi-layer sockets was not a high priority event, like it should be (similarly to other socket types). In particular, that could make BIND stuck on reconfiguration after a DoH-listener is removed from the configuration. This commit fixes that. --- lib/isc/netmgr/netmgr-int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 50528af480..6e233e20fb 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -333,7 +333,6 @@ typedef enum isc__netievent_type { netievent_privilegedtask, netievent_settlsctx, - netievent_sockstop, /* for multilayer sockets */ /* * event type values higher than this will be treated @@ -350,6 +349,7 @@ typedef enum isc__netievent_type { netievent_tcpdnsstop, netievent_tlsdnslisten, netievent_tlsdnsstop, + netievent_sockstop, /* for multilayer sockets */ netievent_resume, netievent_detach, From 8eeafbc6a79c8e05f292ae62c3e811378d4ceb80 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 16 May 2023 18:56:58 +0300 Subject: [PATCH 3/4] Update CHANGES [GL #4071] Mention that BIND getting stuck during reconfiguration when DoH-enabled listen statement is removed on re-configuration has been fixed. --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 64a0dfc9e1..b97fd04585 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +6174. [bug] BIND could get stuck on reconfiguration when a + 'listen' statement for HTTP is removed from the + configuration. That has been fixed. [GL #4071] + 6173. [bug] Properly process extra "nameserver" lines in resolv.conf otherwise the next line is not properly processed. [GL #4066] From d7a60427b95f0dece44803a75678b99818d7f51f Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Wed, 17 May 2023 13:55:25 +0300 Subject: [PATCH 4/4] Update release notes [GL #4071] Mention that BIND getting stuck during reconfiguration when DoH-enabled listen statement is removed on re-configuration has been fixed. --- doc/notes/notes-current.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index 4bf86cd3db..e57a5a6c8c 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -35,7 +35,9 @@ Feature Changes Bug Fixes ~~~~~~~~~ -- None. +- BIND could get stuck on reconfiguration when a `listen` statement + for HTTP is removed from the configuration. That has been fixed. + :gl:`#4071` Known Issues ~~~~~~~~~~~~