Hi Manuel, On Sun, Jun 22, 2008 at 12:43:37PM +0200, Manuel Bouyer wrote: > I got this panic on a -current amd64 XEN3_DOM0 system: > login: panic: kernel diagnostic assertion "!ISSET(bp->b_cflags, BC_BUSY)" > failed: file "/dsk/l1/misc/bouyer/current/src/sys/kern/vfs_bio.c", line 1316 > fatal breakpoint trap in supervisor mode > trap type 1 code 0 rip ffffffff804ab50d cs e030 rflags 246 cr2 7f7ffdfec000 > cpl 0 rsp ffffa0002c69b710 > Stopped in pid 2649.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+0x2b4 > 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 > > kernel is > NetBSD 4.99.66 (XEN3_DOM0) #199: Thu Jun 19 11:09:00 CEST 2008 > > Does someone have an idea about it ? I think the fix code for XEN wasn't comitted when the other vfs_bio's panics were fixed. The fixes that should fix this are: Index: xen/xbdback.c =================================================================== RCS file: /cvsroot/src/sys/arch/xen/xen/xbdback.c,v retrieving revision 1.32 diff -u -p -r1.32 xbdback.c --- xen/xbdback.c 16 Apr 2008 18:41:48 -0000 1.32 +++ xen/xbdback.c 22 Jun 2008 17:34:01 -0000 @@ -905,6 +905,8 @@ xbdback_co_io_loop(struct xbdback_instan xbdi->cont = xbdback_co_io_gotio; xio = xbdback_pool_get(&xbdback_io_pool, xbdi); buf_init(&xio->xio_buf); + /* mark buffer busy */ + SET(xio->xio_buf.b_cflags, BC_BUSY); return xio; } else { xbdi->cont = xbdback_co_io_gotio2; @@ -1166,6 +1168,8 @@ xbdback_co_probe(struct xbdback_instance xbdi->cont = xbdback_co_probe_gotio; xio = xbdback_pool_get(&xbdback_io_pool, xbdi); buf_init(&xio->xio_buf); + /* mark buffer busy */ + SET(xio->xio_buf.b_cflags, BC_BUSY); return xio; } Index: xen/xbdback_xenbus.c =================================================================== RCS file: /cvsroot/src/sys/arch/xen/xen/xbdback_xenbus.c,v retrieving revision 1.17 diff -u -p -r1.17 xbdback_xenbus.c --- xen/xbdback_xenbus.c 13 Jun 2008 22:59:03 -0000 1.17 +++ xen/xbdback_xenbus.c 22 Jun 2008 17:34:02 -0000 @@ -1041,6 +1041,8 @@ xbdback_co_io_loop(struct xbdback_instan xbdi->xbdi_cont = xbdback_co_io_gotio; xio = xbdback_pool_get(&xbdback_io_pool, xbdi); buf_init(&xio->xio_buf); + /* mark buffer busy */ + SET(xio->xio_buf.b_cflags, BC_BUSY); return xio; } else { xbdi->xbdi_cont = xbdback_co_io_gotio2; ---------------- but i haven't comitted them yet since i can't test XEN here... would you like to test and commit them? With regards, Reinoud
Attachment:
pgpBvziH6jUPz.pgp
Description: PGP signature