Subject: kern/25068: writing a disklabel on a cgd(4) device results in panic on sparc64
To: None <gnats-bugs@gnats.netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-bugs
Date: 04/06/2004 01:03:39
>Number: 25068
>Category: kern
>Synopsis: writing a disklabel on a cgd(4) device results in a kernel panic on sparc64
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 05 23:04:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Lubomir Sedlacik
>Release: NetBSD 2.0B Sat Apr 3 19:50:46 CEST 2004
>Organization:
>Environment:
System: NetBSD 2.0B
Architecture: sparc64
Machine: sparc64
Model: Ultra 1
>Description:
# disklabel -i -I -r cgd1
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]:
Partition size ('$' for all remaining) [0c, 0s, 0M]: $
a: 143374000 0 4.2BSD 0 0 0 # (Cyl. 0 - 70006*)
partition> W
Label disk [n]? y
cgd1: error 30
panic: biodone already
kdb breakpoint at 11c0e98
Stopped in pid 316.1 (disklabel) at netbsd:cpu_Debugger+0x4: nop
db> bt
biodone(1ef4000, 110391c, 552ef20, 552ef00, 0, 552ec68) at netbsd:biodone+0x100
spec_strategy(0, 552ef50, 80, 552edc0, 2, 0) at netbsd:spec_strategy+0x184
VOP_STRATEGY(58b58d0, 1ef4000, 59e3528, 0, 10, 58b58d0) at netbsd:VOP_STRATEGY+0x28
cgdstart(1e42188, 1ed6b60, 0, 0, 0, f) at netbsd:cgdstart+0x108
dk_start(180ae88, 1e42188, 0, 552f128, 0, 5) at netbsd:dk_start+0x2c
cgdiodone(1ef4000, 1ef4000, 0, 1e6f800, 2000, 0) at netbsd:cgdiodone+0x11c
biodone(1ef4000, 110391c, 552f3e0, 552f3c0, 0, 552f128) at netbsd:biodone+0xd0
spec_strategy(0, 552f410, 80, 552f280, 2, 8000000010fb2732) at netbsd:spec_strategy+0x184
VOP_STRATEGY(58b58d0, 1ef4000, 59e3528, 0, 10, 58b58d0) at netbsd:VOP_STRATEGY+0x28
cgdstart(1e42188, 1ed6b60, 8000000010fb3436, 8000000010fb3436, 1, 0) at netbsd:cgdstart+0x108
dk_start(180ae88, 1e42188, 20000, ffffffffffffffff, 0, 0) at netbsd:dk_start+0x2c
dk_strategy(0, 1e42188, 1ed6b60, 1, 40730af4, 40730af8) at netbsd:dk_strategy+0xd0
physio(0, 1ed6b60, 7f0a, 552fb80, 111fb24, 552fb90) at netbsd:physio+0x288
spec_write(552f9b0, 0, 59119f0, 0, 0, 0) at netbsd:spec_write+0x5c
ufsspec_write(552f9b0, 30002, 11ef408, 0, 59119f0, 0) at netbsd:ufsspec_write+0x48
VOP_WRITE(59119f0, 552fb90, 1, 1dd0b80, 4071440f, 40704928) at netbsd:VOP_WRITE+0x30
vn_write(3, 5522a88, 552fb90, 2000, 1, 403007c0) at netbsd:vn_write+0xd4
dofilewrite(16, 6, 5522a50, 20b528, 2000, 5522a88) at netbsd:dofilewrite+0x78
sys_write(9, 552fdd0, 552fdc0, 0, 552fdd0, 0) at netbsd:sys_write+0x60
syscall(552fed0, 4, 40730af4, 552fdd0, 40730af4, 40730af8) at netbsd:syscall+0xd0
?(6, 20b528, 2000, 0, 0, 0) at 0x1008cb8
leading into another panic when trying to create a kernel dump:
db> sync
syncing disks... 1 1 done
Frame pointer is at 0x552db11
Call traceback:
11b63b0(11f2400, ffffffffffffffff, 0, 0, 0, d, 552dbd1) fp = 552dbd1
10f7764(100, 0, 0, 0, 0, 552e738, 552dc91) fp = 552dc91
10f707c(11c0e9c, 0, ffffffffffffffff, 552e620, 0, 4, 552dd51) fp = 552dd51
10f6d64(182d3f8, 0, 0, 0, 0, 1d, 552deb1) fp = 552deb1
10fab30(11c0ea0, 0, 1, 54db321, 0, 0, 552df91) fp = 552df91
11c0c3c(0, 0, 0, 0, 0, 1000000, 552e061) fp = 552e061
dumping to dev 7,1 offset 851965
dump starting dump, blkno 851968
panic: dma0: cannot allocate DVMA address
kdb breakpoint at 11c0e98
Stopped in pid 316.1 (disklabel) at netbsd:cpu_Debugger+0x4: nop
i didn't have this problem with the first device, being a part of sd0 drive,
which works as expected.
>How-To-Repeat:
on a sparc64 machine
- create a cgd(4) device: cgdconfig -g -o /etc/cgd/sd1a aes-cbc 128
- attach cgd(4) device: cgdconfig -V re-enter cgd1 /dev/sd1a
- try to label the device: disklabel -i -I -r cgd1
- see it panic
>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: