Subject: kern/36873: boot takes a long time when there are offline "disks"
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Arne H. Juul <arnej@pvv.ntnu.no>
List: netbsd-bugs
Date: 08/31/2007 14:30:00
>Number:         36873
>Category:       kern
>Synopsis:       boot takes a long time when there are offline "disks"
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 31 14:30:00 +0000 2007
>Originator:     Arne H Juul
>Release:        NetBSD 4.99.30
>Organization:
 	disorganized
>Environment:


System: NetBSD inngang 4.99.30 NetBSD 4.99.30 (GENERIC.MP) #6: Fri Aug 31 01:22:50 CEST 2007 root@inngang:/usr/obj/sys/arch/i386/compile/GENERIC.MP i386
Architecture: i386
Machine: i386
>Description:
 	My machine takes a looong time (> 5 minutes) to boot currently,
 	and I think I've found the reason:

 	I've got a standard new desktop machine with memory card
 	readers in front.  These appear as SCSI disks attached via
 	USB, and since I don't have memory cards in them they show
 	up as "offline".  But still, it takes a very long time
 	during boot - probably in findroot for the kernel to figure
 	out that these aren't the root disk it's looking for.  It
 	should notice the "offline" and continue at once, I guess...

 	The workaround is simply to disconnect the cable that goes
 	to the card-readers and front USB connector.
>How-To-Repeat:

 	Actually, any offline SCSI disks might produce the same symptoms, I guess:

[...]
umass0 at uhub1 port 8 configuration 1 interface 0
umass0: Genesys Logic USB Storage, rev 2.00/96.02, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, STORAGE DEVICE, 9602> disk removable
sd0: drive offline
sd1 at scsibus0 target 0 lun 1: <Generic, STORAGE DEVICE, 9602> disk removable
sd1: drive offline
sd2 at scsibus0 target 0 lun 2: <Generic, STORAGE DEVICE, 9602> disk removable
sd2: drive offline
[... at this point to boot process seems to hang ...]
findroot: unable to read block 266245176
opendisk: can't open dev sd0 (5)
opendisk: can't open dev sd1 (5)
opendisk: can't open dev sd2 (5)
opendisk: can't open dev sd0 (5)
opendisk: can't open dev sd1 (5)
opendisk: can't open dev sd2 (5)
opendisk: can't open dev sd0 (5)
opendisk: can't open dev sd1 (5)
opendisk: can't open dev sd2 (5)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

>Fix:

 	unknown.

>Unformatted: