From owner-freebsd-current Wed Oct 24 11:56:44 2001 Delivered-To: freebsd-current@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 45F8437B405 for ; Wed, 24 Oct 2001 11:56:40 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f9OIt3f05152; Wed, 24 Oct 2001 13:55:03 -0500 (CDT) (envelope-from jlemon) Date: Wed, 24 Oct 2001 13:55:03 -0500 From: Jonathan Lemon To: Matthew Dillon Cc: Jun Kuriyama , David Wolfskill , Jonathan Lemon , Current Subject: Re: panic: vrele: missed vn_close Message-ID: <20011024135503.C75389@prism.flugsvamp.com> References: <200110230121.f9N1LTa24181@freefall.freebsd.org> <7mg089l1bn.wl@waterblue.imgsrc.co.jp> <200110241838.f9OIcCR96868@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <200110241838.f9OIcCR96868@apollo.backplane.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hmm. The way the revamped console code works is this: cn_devopen() calls vn_open() to open the device. If this is not a VCHR device, then it is closed. Otherwise, the vnode is stashed in cnd->cnd_vp. When the device is closed though cnclose(), it walks through a list of console devices, and if cnd_vp != NULL, calls vn_close() for that vnode, and then NULLs out cnd_vp. (drops the reference.) My understanding is that vn_open/vn_close will track the count of outstanding references to the vnode, so this should be safe to do. -- Jonathan On Wed, Oct 24, 2001 at 11:38:12AM -0700, Matthew Dillon wrote: > > :... > :Sttopped at Debugger+0x44: pushl %ebx > :db> trace > :Debugger() > :panic() > :vrele() > :vn_close() > :cnclose() > :spec_close() > :spec_vnoperate() > :vclean() > :vgonel() > :vgone() > :vop_revoke() > :devfs_revoke() > :exit1() > :... > > In looking at a diff in the last few days, a huge number of changes have been > made kern/tty_cons.c by jlemon. Since the area of the panic is around the same > block of code there's a good chance that these changes are the cause, though I > have not tested this. If so, Jonathan can locate the bug much more quickly then > I can. > > -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message