NetBSD Problem Report #39052

From bouyer@antioche.lip6.fr  Fri Jun 27 10:01:21 2008
Return-Path: <bouyer@antioche.lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 8626F63B89F
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 27 Jun 2008 10:01:21 +0000 (UTC)
Message-Id: <20080627100117.GB25760@asim.lip6.fr>
Date: Fri, 27 Jun 2008 12:01:18 +0200
From: Manuel Bouyer <bouyer@antioche.eu.org>
Reply-To: bouyer@antioche.eu.org
To: gnats-bugs@gnats.NetBSD.org
Subject: assertion "!ISSET(bp->b_cflags, BC_BUSY)" failed
X-Send-Pr-Version: 3.95

>Number:         39052
>Category:       kern
>Synopsis:       assertion "!ISSET(bp->b_cflags, BC_BUSY)" failed
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bouyer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 27 10:05:00 +0000 2008
>Closed-Date:    Sun Jul 06 15:14:02 +0000 2008
>Last-Modified:  Sun Jul 06 15:14:31 +0000 2008
>Originator:     Manuel Bouyer
>Release:        NetBSD 4.99.66
>Organization:
>Environment:
System: NetBSD admin3-dom0.lip6.fr 4.99.66 NetBSD 4.99.66 (XEN3_DOM0) #206: Thu Jun 26 12:20:20 CEST 2008 bouyer@rock:/dsk/l1/misc/bouyer/tmp/amd64/obj/dsk/l1/misc/bouyer/current/src/sys/arch/amd64/compile/XEN3_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:
	This is a Xen dom0, with 2 linux domUs. The domU's virtual disks
	are backed by files in a FFS.
	The system reliably panics when running the daily scripts with:
panic: kernel diagnostic assertion "!ISSET(bp->b_cflags, BC_BUSY)" failed: file
/dsk/l1/misc/bouyer/current/src/sys/kern/vfs_bio.c", line 1320
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff804abc0d cs e030 rflags 246 cr2  7f7ffdfec000 cp0
Stopped in pid 2726.1 (find) at netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
panic() at netbsd:panic+0x255
__kernassert() at netbsd:__kernassert+0x2d
getnewbuf() at netbsd:getnewbuf+0x2c4
getblk() at netbsd:getblk+0x91
bio_doread() at netbsd:bio_doread+0x24
bread() at netbsd:bread+0x22
ffs_read() at netbsd:ffs_read+0x372
VOP_READ() at netbsd:VOP_READ+0x2d
ufs_readdir() at netbsd:ufs_readdir+0x10b
VOP_READDIR() at netbsd:VOP_READDIR+0x39
vn_readdir() at netbsd:vn_readdir+0x10e
sys___getdents30() at netbsd:sys___getdents30+0x89
syscall() at netbsd:syscall+0x98
(I've seen different variations of the stack trace, but it's always FFS doing
getblk()).
Michael van Elst suggested it could be related to locking issues in vnd,
but I don't have more details. Note that the xen backend block device
calls bdev_strategy() from interrupt context, I don't know if it
can have a bad effect. AFAIK, this will cal vndstrategy() which will
enqueue the buffer and wakeup a kernel thread to handle it. This shouldn't
interract at all with the buffer cache.

>How-To-Repeat:
	Run a dom0 with some (linux ?) domUs. Wait for the daily scripts		to fire.
>Fix:

>Release-Note:

>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Cc: 
Subject: Re: kern/39052: assertion "!ISSET(bp->b_cflags, BC_BUSY)" failed
Date: Sat, 28 Jun 2008 14:32:29 +0200

 For some reasons followups didn't make it in gnats. See
 http://mail-index.netbsd.org/tech-kern/2008/06/27/msg001866.html
 and followups for an updated "how to repeat" (I could also reproduce it
 with a native AMD64 kernel), and possible fix.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: bouyer@NetBSD.org
Responsible-Changed-When: Sun, 06 Jul 2008 15:14:02 +0000
Responsible-Changed-Why:
I commited my patch proposed on tech-kern


State-Changed-From-To: open->closed
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sun, 06 Jul 2008 15:14:02 +0000
State-Changed-Why:
broken assertion fixed in vfs_bio.c 1.206


>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.