Subject: port-amd64/36846: dk broken on amd64/-current
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 08/26/2007 18:35:00
>Number:         36846
>Category:       port-amd64
>Synopsis:       Using dk on amd64/-current casesu trap at boot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 26 18:35:00 +0000 2007
>Originator:     Scott Ellis
>Release:        NetBSD 4.99.29
>Organization:
	
>Environment:
	
	
System: NetBSD intrepid 4.99.24 NetBSD 4.99.24 (INTREPID.AMD64) #0: Thu Jul 19 12:31:30 PDT 2007 scotte@intrepid:/nbu/source/netbsd/src/obj.amd64/nbu/source/netbsd/src/sys/arch/amd64/compile/INTREPID.AMD64 amd64
Architecture: x86_64
Machine: amd64

(Really -current from Aug 26, 2007)
>Description:
	
On a system with three disks, each of which has a valid MBR, the boot disk
having a disklabel and some 4.2BSD partitions, the other two being RAID1,
booting a kernel with:
options DKWEDGE_AUTODISCOVER
options DKWEDGE_METHOD_BSDLABEL
options DKWEDGE_METHOD_GPT
options DKWEDGE_METHOD_MBR

Results in a kernel that doesn't boot.  It looks like the MBR and disklabels
get read/converted okay, but then the system prints:

Searching for RAID components...
ubm_fault(0xffffffff904d9f60, 0x0, 1) -> e
kernel: page fault trap, code=0
Stopped in pid 0.1 (system) at netbsd:dkstart+0xbd: movq 0xb8(%rax),%rax
db>

A backtrace yields:

dkstart() at netbsd:dkstart+0xbd
dkstrategy() at netbsd:dkstrategy+0xaf
raidread_component_label() at netbsd:raidread_component_label+0x74
rf_get_component() at netbsd:rf_get_component+0x5c
rf_fine_raid_components() at netbsd:rf_find_raid_components+0x295
rf_autoconfig() at netbsd:rf_autoconfig+0x41
config_finalize() at netbsd:config_finalize+0x1d
main() at netbsd:main+0x253

(Copied by hand, so may be some minor errors).

Having DKWEDGE_* in the kernel but not the MBR and DISKLABEL methods (i.e.,
doesn't find anything) works fine (duh).

>How-To-Repeat:
	
See above.
>Fix:
	

>Unformatted: