mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Merge branch '3079-assertion-failure-on-TCP-read' into 'main'
Use ISC_R_SHUTTINGDOWN to detect netmgr shutting down Closes #3079 See merge request isc-projects/bind9!5710
This commit is contained in:
11
CHANGES
11
CHANGES
@@ -1,7 +1,10 @@
|
|||||||
5790. [bug] Enforce enqueuing TCP resumeread to prevent the
|
5790. [bug] The control channel was incorrectly looking for
|
||||||
next read callback from being executed before the
|
ISC_R_CANCELED as a signal that the named is
|
||||||
current read callback has finished, and the worker
|
shutting down. In the dispatch refactoring,
|
||||||
receive buffer has been marked as "freed". [GL #3079]
|
the result code returned from network manager
|
||||||
|
is now ISC_R_SHUTTINGDOWN. Change the control
|
||||||
|
channel code to use ISC_R_SHUTTINGDOWN result
|
||||||
|
code to detect named being shut down. [GL #3079]
|
||||||
|
|
||||||
5789. [bug] Allow replacing expired zone signatures with
|
5789. [bug] Allow replacing expired zone signatures with
|
||||||
signatures created by the KSK. [GL #3049]
|
signatures created by the KSK. [GL #3049]
|
||||||
|
@@ -231,7 +231,7 @@ control_senddone(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (atomic_load_acquire(&listener->controls->shuttingdown) ||
|
if (atomic_load_acquire(&listener->controls->shuttingdown) ||
|
||||||
result == ISC_R_CANCELED)
|
result == ISC_R_SHUTTINGDOWN)
|
||||||
{
|
{
|
||||||
goto cleanup_sendhandle;
|
goto cleanup_sendhandle;
|
||||||
} else if (result != ISC_R_SUCCESS) {
|
} else if (result != ISC_R_SUCCESS) {
|
||||||
@@ -414,7 +414,7 @@ control_recvmessage(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
if (result == ISC_R_SHUTTINGDOWN || result == ISC_R_CANCELED) {
|
if (result == ISC_R_SHUTTINGDOWN) {
|
||||||
atomic_store_release(&listener->controls->shuttingdown,
|
atomic_store_release(&listener->controls->shuttingdown,
|
||||||
true);
|
true);
|
||||||
} else if (result != ISC_R_EOF) {
|
} else if (result != ISC_R_EOF) {
|
||||||
@@ -630,7 +630,7 @@ control_newconn(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
|
|||||||
isc_sockaddr_t peeraddr;
|
isc_sockaddr_t peeraddr;
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
if (result == ISC_R_CANCELED) {
|
if (result == ISC_R_SHUTTINGDOWN) {
|
||||||
shutdown_listener(listener);
|
shutdown_listener(listener);
|
||||||
}
|
}
|
||||||
return (result);
|
return (result);
|
||||||
|
@@ -55,6 +55,5 @@ Bug Fixes
|
|||||||
after ``named`` restart in case the unsigned zone file gets modified
|
after ``named`` restart in case the unsigned zone file gets modified
|
||||||
while ``named`` is not running. This has been fixed. :gl:`#3071`
|
while ``named`` is not running. This has been fixed. :gl:`#3071`
|
||||||
|
|
||||||
- Under certain circumstances, reading from the raw TCP channels used
|
- Using ``rndc`` on a busy recursive server could cause the ``named`` to abort
|
||||||
for rndc and statistics could cause assertion failure. This has been
|
with assertion failure. This has been fixed. :gl:`#3079`
|
||||||
fixed. :gl:`#3079`
|
|
||||||
|
@@ -51,17 +51,22 @@ recv_data(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
|
|||||||
|
|
||||||
INSIST(VALID_CCMSG(ccmsg));
|
INSIST(VALID_CCMSG(ccmsg));
|
||||||
|
|
||||||
if (eresult == ISC_R_CANCELED || eresult == ISC_R_EOF) {
|
switch (eresult) {
|
||||||
|
case ISC_R_SHUTTINGDOWN:
|
||||||
|
case ISC_R_CANCELED:
|
||||||
|
case ISC_R_EOF:
|
||||||
ccmsg->result = eresult;
|
ccmsg->result = eresult;
|
||||||
goto done;
|
goto done;
|
||||||
} else if (region == NULL && eresult == ISC_R_SUCCESS) {
|
case ISC_R_SUCCESS:
|
||||||
ccmsg->result = ISC_R_EOF;
|
if (region == NULL) {
|
||||||
goto done;
|
ccmsg->result = ISC_R_EOF;
|
||||||
} else if (eresult != ISC_R_SUCCESS) {
|
goto done;
|
||||||
|
}
|
||||||
|
ccmsg->result = ISC_R_SUCCESS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
ccmsg->result = eresult;
|
ccmsg->result = eresult;
|
||||||
goto done;
|
goto done;
|
||||||
} else {
|
|
||||||
ccmsg->result = eresult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ccmsg->length_received) {
|
if (!ccmsg->length_received) {
|
||||||
|
Reference in New Issue
Block a user