From owner-freebsd-current@FreeBSD.ORG Sat Jan 24 18:47:37 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FAE1106566B; Sat, 24 Jan 2009 18:47:37 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id 04F858FC0A; Sat, 24 Jan 2009 18:47:36 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so5352356rvf.43 for ; Sat, 24 Jan 2009 10:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+UFE9/w15MlOJwyJRhcwJa+oWdOBGOcm2yLxHCg9QKk=; b=ICdnu2v00Y926MIPH4PJRGccfQXqRvNg4jFDoAcwwDAg0oZaYY2MtWJbA0Diraj7Bp pVZ4WDZ8EA4xtINhKZ6J5n1xpMKVSc5FSxBSDpjm7ftHBUGhUcXuJZEWHTtKiD7pWg/a 1LvoL6gmNwNfCiZUFW9bFi8YctS7Li+g7lf4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RCjEP3SRxFZGs/+mBo0U7lrGFRjL7X4dJZt2J4xyN0vtvhir2P/zb2wICr12ygGse8 iLdnOi1LGBTyw6ayebfMsywogFG+rxTZyxW9hbfnt1Z+DsOUgqmKlDKVmg47RvvA1QlK 2ydE8HX4PXSRMu6bXFxDOhbl+JzvO5ZP3td6Y= MIME-Version: 1.0 Received: by 10.141.175.5 with SMTP id c5mr1005711rvp.243.1232822856786; Sat, 24 Jan 2009 10:47:36 -0800 (PST) In-Reply-To: <200901241120.46889.hselasky@c2i.net> References: <20090123154336.GJ60948@e.0x20.net> <200901240952.21670.hselasky@c2i.net> <200901241120.46889.hselasky@c2i.net> Date: Sat, 24 Jan 2009 10:47:36 -0800 Message-ID: From: Maksim Yevmenkin To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, current@freebsd.org, Alfred Perlstein Subject: Re: panic: mutex Giant not owned at /usr/src/sys/kern/tty_ttydisc.c:1127 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2009 18:47:37 -0000 >> > Yes, but you are already dropping an extra reference in ubt_shutdown(). >> > What about that? >> >> shutdown method is called as part of ng_rmnode_self() and drop the >> reference that node was born with. the extra reference before >> ng_rmnode_self() is to ensure that node pointer is still valid after >> ng_rmnode_self() returns. otherwise there is a change that node >> pointer becomes invalid while after ng_rmnode_self() calls shutdown >> method. > > I've now explicitly tested this and found that if I drop the node reference in > shutdown I end up with a zero node reference in detach! So the > NG_NODE_UNREF() should not be in the ubt_shutdown !!! > > This is maybe the reason why Lars was getting a panic! > > http://perforce.freebsd.org/chv.cgi?CH=156600 i think those changes are not correct. Lars's panic has nothing to do with detach(), imo. i beg you to stop posing your private ng_ubt2 patches for just one sec and let me work on this. right now, i'm confused because i do not know what code Lars is running and it makes it very hard to troubleshoot problems. thanks, max