bind-9.4.0b2 exits unexpected...

JINMEI Tatuya / 神明達哉 jinmei at isl.rdc.toshiba.co.jp
Mon Oct 16 09:26:44 UTC 2006


>>>>> On Fri, 13 Oct 2006 10:02:06 +0200, 
>>>>> Marco Schumann <schumann at strato-rz.de> said:

> Again named terminated with signal 6 right after starting (~3s), here
> the logs and backtraces:

> 13-Oct-2006 09:45:26.472 general: rbtdb.c:1128: INSIST(((unsigned
> int)((&rbtdb->node_locks[node->locknum].references)->refs)) > 0) failed
> 13-Oct-2006 09:45:26.472 general: exiting (due to assertion failure)

Okay, then how about this one?  (the patch is not incremental; it's
for pure 9.4.0b2)

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei at isl.rdc.toshiba.co.jp

--- rbtdb.c.orig	Tue Oct 10 23:35:40 2006
+++ rbtdb.c	Mon Oct 16 18:22:59 2006
@@ -837,8 +837,8 @@
 	REQUIRE(version->writer);
 
 	if (changed != NULL) {
-		dns_rbtnode_refincrement0(node, &refs);
-		INSIST(refs > 0);
+		dns_rbtnode_refincrement(node, &refs);
+		INSIST(refs != 0);
 		changed->node = node;
 		changed->dirty = ISC_FALSE;
 		ISC_LIST_INITANDAPPEND(version->changed_list, changed, link);
@@ -1125,6 +1125,8 @@
 		isc_refcount_increment0(lockref, &lockrefs);
 		INSIST(lockrefs != 0);
 	}
+	INSIST(noderefs > 1 ||
+	       isc_refcount_current(&rbtdb->node_locks[node->locknum].references) > 0);
 	INSIST(noderefs != 0);
 }
 
@@ -3824,8 +3826,8 @@
 	REQUIRE(targetp != NULL && *targetp == NULL);
 
 	NODE_STRONGLOCK(&rbtdb->node_locks[node->locknum].lock);
-	dns_rbtnode_refincrement0(node, &refs);
-	INSIST(refs > 1);
+	dns_rbtnode_refincrement(node, &refs);
+	INSIST(refs != 0);
 	NODE_STRONGUNLOCK(&rbtdb->node_locks[node->locknum].lock);
 
 	*targetp = source;
@@ -4285,8 +4287,8 @@
 
 	NODE_STRONGLOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
 
-	dns_rbtnode_refincrement0(rbtnode, &refs);
-	INSIST(refs > 0);
+	dns_rbtnode_refincrement(rbtnode, &refs);
+	INSIST(refs != 0);
 
 	iterator->current = NULL;
 
@@ -6332,9 +6334,12 @@
 		 * expirenode() currently always returns success.
 		 */
 		if (expire_result == ISC_R_SUCCESS && node->down == NULL) {
+			unsigned int refs;
+
 			rbtdbiter->deletions[rbtdbiter->delete++] = node;
 			NODE_STRONGLOCK(&rbtdb->node_locks[node->locknum].lock);
-			dns_rbtnode_refincrement0(node, NULL);
+			dns_rbtnode_refincrement(node, &refs);
+			INSIST(refs != 0);
 			NODE_STRONGUNLOCK(&rbtdb->node_locks[node->locknum].lock);
 		}
 	}



More information about the bind-users mailing list