Subject: problems writing to USB stick
To: None <>
From: Jukka Salmi <>
List: current-users
Date: 04/21/2005 01:24:40

on a current (3.99.3) i386 system, while extracting binary sets to FFS
on a USB flash drive, the write process (I used tar and pax) often hangs
for several minutes (sometimes up to ten) at random places; ps reports
state `D'. The system in use:

ehci0 at pci0 dev 16 function 3: VIA Technologies VT8237 EHCI USB Controller (rev. 0x82)
ehci0: interrupting at irq 3
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: VIA Technologie EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: single transaction translator
uhub3: 6 ports with 6 removable, self powered
umass0 at uhub3 port 4 configuration 1 interface 0
umass0: vendor 0x1005 USB Flash Drive, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <USB, Flash Drive, 2.04> disk removable
sd0: 247 MB, 6349 cyl, 16 head, 5 sec, 512 bytes/sect x 507901 sectors

Nothing is printed to the console, and finally the write process continues.

This is quite reproducible so far: while extracting base.tgz, it happens
almost ever exactly once.

If I disable ehci with userconf, this problem does not exist.

While writing this, I issued a 'ktrace tar -x ...', and the problem
happened again. But this time I got

	umass0: at uhub3 port 4 (addr 2) disconnected
	sd0(umass0:0:0:0): generic HBA error

and it hangs now since definitely more than ten minutes... The trace
file is 160 MB and doesn't change in size anymore.

Any hints?

Regards, Jukka

bashian roulette:
$ ((RANDOM%6)) || rm -rf ~