Subject: kern/25240: cgd+vnd+NFS panic
To: None <gnats-bugs@gnats.NetBSD.org>
From: Piotr Stolc <socrtp@soclab.eu.org>
List: netbsd-bugs
Date: 04/19/2004 14:36:24
>Number:         25240
>Category:       kern
>Synopsis:       cgd+vnd+NFS panic
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 19 12:37:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Piotr Stolc
>Release:        NetBSD 2.0_BETA
>Organization:
soclab
>Environment:
	
	
System: NetBSD s 2.0_BETA NetBSD 2.0_BETA (S) #4: Mon Apr 19 11:10:22 CEST 2004 pkgadm@s:/home/pkgadm/sys/arch/i386/compile/S i386
Architecture: i386
Machine: i386
>Description:

	Configuring cgd on vnode attached to file on NFS crashes the
kernel. Everything works ok with vnode on local drive. On 1.6ZK kernel
this NFS combination works OK.

root@s:/var/crash# gdb /netbsd
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...(no debugging symbols
found)...
(gdb) target kcore netbsd.2.core
panic: biodone already
#0  0x00000001 in ?? ()
(gdb) bt
#0  0x00000001 in ?? ()
#1  0xc026400b in cpu_reboot ()
#2  0xc01c27cc in db_sync_cmd ()
#3  0xc01c221f in db_command ()
#4  0xc01c1f3a in db_command_loop ()
#5  0xc01c4ff8 in db_trap ()
#6  0xc02618ba in kdb_trap ()
#7  0xc026b44c in trap ()
#8  0xc0102c73 in calltrap ()
#9  0xc020090d in panic ()
#10 0xc021c8b7 in biodone ()
#11 0xc01d16d7 in vndstrategy ()
#12 0xc022f559 in spec_strategy ()
#13 0xc022a1cc in VOP_STRATEGY ()
#14 0xc01cae67 in cgdstart ()
#15 0xc01cc463 in dk_start ()
#16 0xc01cafb2 in cgdiodone ()
#17 0xc021c884 in biodone ()
#18 0xc01d16d7 in vndstrategy ()
#19 0xc022f559 in spec_strategy ()
#20 0xc022a1cc in VOP_STRATEGY ()
#21 0xc01cae67 in cgdstart ()
#22 0xc01cc463 in dk_start ()
#23 0xc01cc3d6 in dk_strategy ()
#24 0xc01cac9e in cgdstrategy ()
#25 0xc0262448 in read_sector ()
#26 0xc0262492 in scan_mbr ()
#27 0xc0262644 in readdisklabel ()
#28 0xc01cca92 in dk_getdisklabel ()
#29 0xc01cb431 in cgd_ioctl_set ()
#30 0xc01cb18e in cgdioctl ()
#31 0xc022f2f2 in spec_ioctl ()
#32 0xc0229d2c in VOP_IOCTL ()
#33 0xc0229516 in vn_ioctl ()
#34 0xc02047f2 in sys_ioctl ()
#35 0xc026ae42 in syscall_plain ()
(gdb)


>How-To-Repeat:

# mount soclab:/home/exports/disk1 /disk1
# ls -l /disk1
-rw-r--r--  1 root  wheel  2147483648 Apr 16 01:25 /disk1
# vnconfig vnd0 /disk1
[ this may be also a file on NFS directory, here I mount only a file
like /swap on diskless machines ]
# cgdconfig -V none cgd0 /dev/vnd0d /etc/cgd/vnd0d
/dev/vnd0d's passphrase:

and after entering the password kernel panics.

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: