NetBSD Problem Report #2657
From gnats Thu Jul 25 17:59:21 1996
Received: from Collatz.McRCIM.McGill.EDU by pain.lcs.mit.edu (8.7.5/8.7.3) with SMTP id RAA04451 for <gnats-bugs@gnats.netbsd.org>; Thu, 25 Jul 1996 17:54:41 -0400 (EDT)
Message-Id: <199607252154.RAA14787@Collatz.McRCIM.McGill.EDU>
Date: Thu, 25 Jul 1996 17:54:35 -0400
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Reply-To: mouse@Collatz.McRCIM.McGill.EDU
To: gnats-bugs@NetBSD.ORG
Subject: [dM] vnd can disk_unbusy without disk_busy
X-Send-Pr-Version: 3.2
>Number: 2657
>Category: kern
>Synopsis: [dM] vnd can disk_unbusy without disk_busy
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 25 18:05:00 +0000 1996
>Closed-Date: Sun May 25 19:37:56 +0000 1997
>Last-Modified: Sun May 25 19:40:47 +0000 1997
>Originator: der Mouse
>Release: $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $
>Organization:
Dos-
>Environment:
Any (found on a SPARC IPC)
>Description:
If VOP_BMAP() fails, vndstrategy will call biodone(), which
will call vndiodone(), which will call disk_unbusy(), on a
buffer that has never had a disk_busy() call done on it. This
typically tickles the panic in disk_unbusy():
panic("disk_unbusy: %s: dk_busy < 0", diskp->dk_name);
>How-To-Repeat:
Arrange for VOP_BMAP to fail, then try to access that part of
the vnd. I'm not sure what's causing VOP_BMAP to fail; I
currently suspect the cause is that the file has holes in it.
>Fix:
Unknown. _Something_ needs to be done; even if the vnd chooses
to not support files with holes (which should be documented if
it's the case - the manpage makes no mention of any such
restriction), panicking with an unclear error is _not_ the
right way to handle it. :-)
der Mouse
mouse@collatz.mcrcim.mcgill.edu
01 EE 31 F6 BB 0C 34 36 00 F3 7C 5A C1 A0 67 1D
>Release-Note:
>Audit-Trail:
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
To: gnats-bugs@NetBSD.ORG
Cc: netbsd-bugs@NetBSD.ORG
Subject: Re: kern/2657: [dM] vnd can disk_unbusy without disk_busy
Date: Thu, 25 Jul 1996 18:25:03 -0400
Addendum to kern/2657 ([dM] vnd can disk_unbusy without disk_busy): I
just now experimented, by making a copy of /netbsd that was as full of
holes as possible, then trying first one and then the other with vnd.
dd read the entire vnd when it was configured to the non-holey file and
crashed as described when configured to the holey file. So I think a
file with holes is a good test case for making VOP_BMAP fail.
Is there any reason why vnd doesn't fall back on VOP_READ/VOP_WRITE
when VOP_BMAP fails? Sure, as the comment at the top of the file
indicates, it may interact badly with the buffer cache...but I'd rather
double-buffer some data and have it work than have it error out, or
(worse) crash. The vnd is one case where I'd much prefer to take a
performance hit if necessary to make it work, rather than erroring out.
Especially since it seems to me that doing that would make it work with
NFS-remote files, which the man page indicates it doesn't at present.
der Mouse
mouse@collatz.mcrcim.mcgill.edu
01 EE 31 F6 BB 0C 34 36 00 F3 7C 5A C1 A0 67 1D
State-Changed-From-To: open->closed
State-Changed-By: pk
State-Changed-When: Sun May 25 12:37:56 PDT 1997
State-Changed-Why:
buffer chain handling has been improved to prevent the busy/unbusy disparity.
>Unformatted:
(this is the latest, as of this morning's sup, on the -current
sup, which is the 1.2 release branch)
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.