NetBSD Problem Report #36684

From pelle@morth.org  Mon Jul 23 18:33:01 2007
Return-Path: <pelle@morth.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 5C92063B874
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 23 Jul 2007 18:33:01 +0000 (UTC)
Message-Id: <20070723183216.DA20F2D27E@mail.morth.org>
Date: Mon, 23 Jul 2007 20:32:16 +0200 (CEST)
From: morth@morth.org
Reply-To: morth@morth.org
To: gnats-bugs@NetBSD.org
Subject: named crashes with INSIST failure
X-Send-Pr-Version: 3.95

>Number:         36684
>Category:       bin
>Synopsis:       named crashes soon after start with a INSIST failure.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 23 18:35:01 +0000 2007
>Closed-Date:    Mon May 30 23:14:57 +0000 2016
>Last-Modified:  Mon May 30 23:14:57 +0000 2016
>Originator:     Pelle Johansson
>Release:        NetBSD 3.1.1_PATCH
>Organization:

>Environment:


System: NetBSD kaninen.morth.org 3.1.1_PATCH NetBSD 3.1.1_PATCH (kaninen) #0: Mon Jul 23 11:24:37 CEST 2007 pelle@kaninen.morth.org:/mnt/netbsd/netbsd-3.1/obj.kaninen/sys/arch/macppc/compile/kaninen macppc
Architecture: powerpc
Machine: macppc
>Description:
I today upgraded to the latest sources on the 3.1-branch.
After the upgrade, bind failed to start:
Jul 23 19:18:34 kaninen named[364]: 23-Jul-2007 19:18:34.245/mnt/netbsd/netbsd-3
.1/src/dist/bind/lib/dns/rbt.c:1581: INSIST(child != (void *)0) failed
Jul 23 19:18:34 kaninen named[364]: 23-Jul-2007 19:18:34.413exiting (due to asse
rtion failure)

>How-To-Repeat:

	Unsure about exact procedures, but it's completely repeatable on my maching, even if only caching queries.
>Fix:

As suggested at http://mail-index.netbsd.org/port-macppc/2005/02/22/0003.html
removing inline from rotate_left() and rotate_right() in rbt.c fixes the problem.
Likely newer versions of gcc behaves better as well, so might not affect -current.
Diff for netbsd-3.1 branch:
Index: src/dist/bind/lib/dns/rbt.c
===================================================================
RCS file: /cvsroot/src/dist/bind/lib/dns/rbt.c,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 rbt.c
--- src/dist/bind/lib/dns/rbt.c	13 Jul 2006 22:02:18 -0000	1.2.2.1
+++ src/dist/bind/lib/dns/rbt.c	23 Jul 2007 18:28:20 -0000
@@ -197,9 +197,9 @@
 #define unhash_node(rbt, node)
 #endif

-static inline void
+static void
 rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp);
-static inline void
+static void
 rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp);

 static void
@@ -1570,7 +1570,7 @@
 }
 #endif /* DNS_RBT_USEHASH */

-static inline void
+static void
 rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp) {
 	dns_rbtnode_t *child;

@@ -1603,7 +1603,7 @@
 	PARENT(node) = child;
 }

-static inline void
+static void
 rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp) {
 	dns_rbtnode_t *child;


>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: reed@NetBSD.org
State-Changed-When: Mon, 30 May 2016 23:14:57 +0000
State-Changed-Why:
Sorry this was never handled, but I assume the problem no longer exists.
The 2005 bug at ISC was #13507 and it was also closed due to lack
of feedback. Other bugs that may be the same are 13025 (closed lack of
feedback) and 20416 (still open but no feedback in years).


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.