This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new ef0e703e6c Add action & mutex check before triggering pending dns
(#12341)
ef0e703e6c is described below
commit ef0e703e6c32f4b529d7e7ef62664a4694793919
Author: Masaori Koshiba <[email protected]>
AuthorDate: Tue Jul 22 08:17:26 2025 +0900
Add action & mutex check before triggering pending dns (#12341)
---
src/iocore/hostdb/HostDB.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/iocore/hostdb/HostDB.cc b/src/iocore/hostdb/HostDB.cc
index 12f24fefa9..ccc15d85d9 100644
--- a/src/iocore/hostdb/HostDB.cc
+++ b/src/iocore/hostdb/HostDB.cc
@@ -1165,6 +1165,10 @@ HostDBContinuation::remove_and_trigger_pending_dns()
}
EThread *thread = this_ethread();
while ((c = qq.dequeue())) {
+ if (c->action.cancelled || c->mutex == nullptr) {
+ continue;
+ }
+
// resume all queued HostDBCont in the thread associated with the netvc to
avoid nethandler locking issues.
EThread *affinity_thread = c->getThreadAffinity();
SCOPED_MUTEX_LOCK(lock, c->mutex, this_ethread());