Bind 9.7.0-P2 Bus Error - Solaris 9
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Tue Jun 15 00:57:43 UTC 2010
At Mon, 14 Jun 2010 09:06:50 -0500 (CDT),
b19141 at anl.gov wrote:
> This morning on a Solaris 9 system, I issued these comands:
I believe I found the cause of the bug. Please try the patch copied
below.
---
JINMEI, Tatuya
Internet Systems Consortium, Inc.
Index: dighost.c
===================================================================
RCS file: /proj/cvs/prod/bind9/bin/dig/dighost.c,v
retrieving revision 1.330
diff -u -r1.330 dighost.c
--- dighost.c 18 May 2010 02:38:10 -0000 1.330
+++ dighost.c 15 Jun 2010 00:49:24 -0000
@@ -2401,6 +2401,15 @@
isc_result_totext(ISC_R_NOMEMORY));
}
isc_task_send(global_task, &event);
+
+ /*
+ * The timer may have expired if, for example, get_address() takes
+ * long time and the timer was running on a different thread.
+ * We need to cancel the possible timeout event not to confuse
+ * ourselves due to the duplicate events.
+ */
+ if (l->timer != NULL)
+ isc_timer_detach(&l->timer);
}
@@ -2424,7 +2433,7 @@
query->waiting_connect = ISC_TRUE;
query->lookup->current_query = query;
result = get_address(query->servname, port, &query->sockaddr);
- if (result == ISC_R_NOTFOUND) {
+ if (result != ISC_R_SUCCESS) {
/*
* This servname doesn't have an address. Try the next server
* by triggering an immediate 'timeout' (we lie, but the effect
@@ -2506,7 +2515,7 @@
/* XXX Check the sense of this, need assertion? */
query->waiting_connect = ISC_FALSE;
result = get_address(query->servname, port, &query->sockaddr);
- if (result == ISC_R_NOTFOUND) {
+ if (result != ISC_R_SUCCESS) {
/* This servname doesn't have an address. */
force_timeout(l, query);
return;
More information about the bind-users
mailing list