Date: Sat, 16 Aug 2003 14:37:38 +0200 From: Tilman Linneweh <tilman@arved.de> To: freebsd-current@FreeBSD.org Subject: Panic on my NFS server: Consumer with zero access count in g_dev_strategy Message-ID: <1061037457.23643.53.camel@sauna.arved.de>
next in thread | raw e-mail | index | archive | help
Hi, Today I did something stupid. I umount'ed a filesystem of my NFS Server, while an NFS client was writing to it. My NFS Server is: polly# uname -a FreeBSD polly.arved.de 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Aug 16 10:11:52 CEST 2003 =20 tilman@sauna.arved.de:/usr/obj/usr/source/CURRENT/sys/POLLY i386 To my surprise I didn't got a "Device busy" error or something like that, but the following panic. I rebooted, and tried again, and this panic is reproducable. panic(c03b359c,c1973b00,c403a600,c1948ab0,c1ce35b4) at panic+0xb7 g_dev_strategy(c403a600) at g_dev_strategy+0x118 spec_xstrategy(c1ce35b4,c403a600,0,cd001960,c0201253) at spec_xstrategy+0x20f spec_specstrategy(cd001988,cd0019a4,c026d8f4,cd001988,0) at spec_specstrategy+0x4e spec_vnoperate(cd001988) at spec_vnoperate+0x13 breadn(c1ce35b4,b7c4e0,0,4000,0) at breadn+0xf4 bread(c1ce35b4,b7c4e0,0,4000,0) at bread+0x20 ffs_update(c1dc0b68,1,ba,0,0) at ffs_update+0x1eb ffs_fsync(cd001ae0,c02ade94,c0473d20,0,c0229c8d) at ffs_fsync+0x397 nfsrv_commit(c1b0d700,c1a24b00,c1948ab0,cd001c78,0) at nfsrv_commit+0x3b6 nfssvc_nfsd(c1948ab0,c19479e0,1,c03b7606,167) at nfssvc_nfsd+0x372 nfssvc(c1948ab0,cd001d14,2,0,292) at nfssvc+0x12c syscall(2f,2f,2f,bfbffdc4,4) at syscall+0x1ed Xint0x80_syscall() at Xint0x80_syscall+0x1d (kgdb) bt #0 doadump () at /usr/source/CURRENT/sys/kern/kern_shutdown.c:240 #1 0xc014ea78 in db_fncall (dummy1=3D0, dummy2=3D0, dummy3=3D-1069042912, dummy4=3D0xc8967750 "lw\226=C8h\234\"=C0 =B3G=C0\001") at /usr/source/CURRENT/sys/ddb/db_command.c:548 #2 0xc014e85e in db_command (last_cmdp=3D0xc03e3210, cmd_table=3D0x0, aux_cmd_tablep=3D0xc03db3e8, aux_cmd_tablep_end=3D0xc03db3ec) at /usr/source/CURRENT/sys/ddb/db_command.c:346 #3 0xc014e94b in db_command_loop () at /usr/source/CURRENT/sys/ddb/db_command.c:472 #4 0xc01512ea in db_trap (type=3D3, code=3D0) at /usr/source/CURRENT/sys/ddb/db_trap.c:73 #5 0xc0363910 in kdb_trap (type=3D3, code=3D0, regs=3D0xc896787c) at /usr/source/CURRENT/sys/i386/i386/db_interface.c:172 #6 0xc03731cf in trap (frame=3D {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 1, tf_esi =3D -1069861476, tf_ebp =3D -929662784, tf_isp =3D -929662808, tf_ebx =3D 0, tf_edx =3D 0, tf_ecx =3D 1, tf_eax =3D 18, tf_trapno =3D 3, tf_err =3D 0, t= f_eip =3D -1070187611, tf_cs =3D 8, tf_eflags =3D 642, tf_esp =3D -929662740, tf_ss = =3D -929662752}) at /usr/source/CURRENT/sys/i386/i386/trap.c:580 #7 0xc0364f58 in calltrap () at {standard input}:96 #8 0xc0231c97 in panic ( fmt=3D0xc03b359c "Consumer with zero access count in g_dev_strategy") at /usr/source/CURRENT/sys/kern/kern_shutdown.c:534 #9 0xc0203ad8 in g_dev_strategy (bp=3D0xc4017920) at /usr/source/CURRENT/sys/geom/geom_dev.c:422 #10 0xc0201eaf in spec_xstrategy (vp=3D0xc1ce5db0, bp=3D0xc4017920) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:512 #11 0xc0201f0e in spec_specstrategy (ap=3D0xc896795c) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:529 #12 0xc0201253 in spec_vnoperate (ap=3D0x0) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:122 #13 0xc026d8f4 in breadn (vp=3D0xc1ce5db0, blkno=3D5269152, size=3D16384, rablkno=3D0x0, rabsize=3D0x0, cnt=3D0, cred=3D0x0, bpp=3D0x0) at vnode_if.h:1116 #14 0xc026d7e0 in bread (vp=3D0xc1ce5db0, blkno=3D5269152, size=3D16384, cred=3D0x0, bpp=3D0xc89679fc) at /usr/source/CURRENT/sys/kern/vfs_bio.c:679 #15 0xc030ddcb in ffs_update (vp=3D0xc1a05a44, waitfor=3D0) at /usr/source/CURRENT/sys/ufs/ffs/ffs_inode.c:104 #16 0xc0325907 in ufs_inactive (ap=3D0x0) at /usr/source/CURRENT/sys/ufs/ufs/ufs_inode.c:125 #17 0xc032c993 in ufs_vnoperate (ap=3D0x0) at /usr/source/CURRENT/sys/ufs/ufs/ufs_vnops.c:2792 #18 0xc027e32e in vput (vp=3D0xc1a05a44) at vnode_if.h:953 #19 0xc1a34c19 in nfsrv_write (nfsd=3D0xc1dab900, slp=3D0xc19de580, td=3D0xc0b90390, mrq=3D0xc8967c78) at /usr/source/CURRENT/sys/nfsserver/nfs_serv.c:1018 #20 0xc1a40752 in nfssvc_nfsd (td=3D0x0) at /usr/source/CURRENT/sys/nfsserver/nfs_syscalls.c:445 #21 0xc1a401cc in nfssvc (td=3D0xc0b90390, uap=3D0xc8967d14) at /usr/source/CURRENT/sys/nfsserver/nfs_syscalls.c:180 #22 0xc037394d in syscall (frame=3D {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D -1077936700, tf= _esi =3D 4, tf_ebp =3D ---Type <return> to continue, or q <return> to quit--- -1077937592, tf_isp =3D -929661580, tf_ebx =3D 0, tf_edx =3D 672335864, tf_= ecx =3D 25, tf_eax =3D 155, tf_trapno =3D 12, tf_err =3D 2, tf_eip =3D 67185177= 5, tf_cs =3D 31, tf_eflags =3D 658, tf_esp =3D -1077937620, tf_ss =3D 47}) at /usr/source/CURRENT/sys/i386/i386/trap.c:1008 #23 0xc0364fad in Xint0x80_syscall () at {standard input}:138 ---Can't read userspace from dump, or kernel process--- (kgdb) fr 9 #9 0xc0203ad8 in g_dev_strategy (bp=3D0xc4017920) at /usr/source/CURRENT/sys/geom/geom_dev.c:422 422 ("g_dev_strategy raced with g_dev_close and lost")); (kgdb) list 417 "g_dev_strategy(%p/%p) offset %jd length %jd data %p cmd %d", 418 bp, bp2, (intmax_t)bp->bio_offset, (intmax_t)bp2->bio_length, 419 bp2->bio_data, bp2->bio_cmd); 420 g_io_request(bp2, cp); 421 KASSERT(cp->acr || cp->acw, 422 ("g_dev_strategy raced with g_dev_close and lost")); 423 424 } 425 426 /* (kgdb) fr 10 #10 0xc0201eaf in spec_xstrategy (vp=3D0xc1ce5db0, bp=3D0xc4017920) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:512 512 DEV_STRATEGY(bp); (kgdb) list 507 if (dsw->d_flags & D_NOGIANT) { 508 /* XXX: notyet DROP_GIANT(); */ 509 DEV_STRATEGY(bp); 510 /* XXX: notyet PICKUP_GIANT(); */ 511 } else 512 DEV_STRATEGY(bp); 513 514 return (0); 515 } 516 (kgdb) fr 11 #11 0xc0201f0e in spec_specstrategy (ap=3D0xc896795c) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:529 529 return spec_xstrategy(ap->a_vp, ap->a_bp); (kgdb) list 524 525 KASSERT(ap->a_vp->v_rdev =3D=3D ap->a_bp->b_dev, 526 ("%s, dev %s !=3D %s", __func__, 527 devtoname(ap->a_vp->v_rdev), 528 devtoname(ap->a_bp->b_dev))); 529 return spec_xstrategy(ap->a_vp, ap->a_bp); 530 } 531 532 static int 533 spec_freeblks(ap) (kgdb) fr 12 #12 0xc0201253 in spec_vnoperate (ap=3D0x0) at /usr/source/CURRENT/sys/fs/specfs/spec_vnops.c:122 122 return (VOCALL(spec_vnodeop_p, ap->a_desc->vdesc_offset, ap)); (kgdb) list 117 struct vop_generic_args /* { 118 struct vnodeop_desc *a_desc; 119 <other random data follows, presumably> 120 } */ *ap; 121 { 122 return (VOCALL(spec_vnodeop_p, ap->a_desc->vdesc_offset, ap)); 123 } 124 125 /* 126 * Open a special file.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1061037457.23643.53.camel>