Bug#690505: linux-image-3.2.0-3-amd64: broken usb device breaks direct i/o even to non-usb drives
Package: src:linux
Version: 3.2.23-1
Severity: important
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***
* What led up to the situation?
plugging in a fake (128 that later turned out to be just 2Gb) flashdrive
in the usb port, dd it to /dev/null, ctrl-c, dd zeroes to it, ctrl-c,
dd unresponsive to ctrl-c
kernel dmesg at connect:
Oct 15 00:27:38 homerouter kernel: [87964.904034] usb 8-4: new high-speed USB device number 3 using ehci_hcd
Oct 15 00:27:38 homerouter kernel: [87965.203846] usb 8-4: New USB device found, idVendor=0011, idProduct=7788
Oct 15 00:27:38 homerouter kernel: [87965.203894] usb 8-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 15 00:27:38 homerouter kernel: [87965.203941] usb 8-4: Product: Mass Storage
Oct 15 00:27:38 homerouter kernel: [87965.203981] usb 8-4: Manufacturer: Generic
Oct 15 00:27:38 homerouter kernel: [87965.204031] usb 8-4: SerialNumber: BEF961F3
Oct 15 00:27:39 homerouter kernel: [87965.330025] usbcore: registered new interface driver uas
Oct 15 00:27:39 homerouter kernel: [87965.343501] Initializing USB Mass Storage driver...
Oct 15 00:27:39 homerouter kernel: [87965.343628] scsi4 : usb-storage 8-4:1.0
Oct 15 00:27:39 homerouter kernel: [87965.343733] usbcore: registered new interface driver usb-storage
Oct 15 00:27:39 homerouter kernel: [87965.343777] USB Mass Storage support registered.
Oct 15 00:27:40 homerouter kernel: [87966.342129] scsi 4:0:0:0: Direct-Access Generic Flash Disk 8.00 PQ: 0 ANSI: 2
Oct 15 00:27:40 homerouter kernel: [87966.342817] sd 4:0:0:0: Attached scsi generic sg3 type 0
Oct 15 00:27:40 homerouter kernel: [87966.344361] sd 4:0:0:0: [sdc] 270336000 512-byte logical blocks: (138 GB/128 GiB)
Oct 15 00:27:40 homerouter kernel: [87966.345477] sd 4:0:0:0: [sdc] Write Protect is off
Oct 15 00:27:40 homerouter kernel: [87966.345527] sd 4:0:0:0: [sdc] Mode Sense: 03 00 00 00
Oct 15 00:27:40 homerouter kernel: [87966.345980] sd 4:0:0:0: [sdc] No Caching mode page present
Oct 15 00:27:40 homerouter kernel: [87966.346028] sd 4:0:0:0: [sdc] Assuming drive cache: write through
Oct 15 00:27:40 homerouter kernel: [87966.348736] sd 4:0:0:0: [sdc] No Caching mode page present
Oct 15 00:27:40 homerouter kernel: [87966.348782] sd 4:0:0:0: [sdc] Assuming drive cache: write through
Oct 15 00:27:40 homerouter kernel: [87966.673992] sdc: unknown partition table
Oct 15 00:27:40 homerouter kernel: [87966.676613] sd 4:0:0:0: [sdc] No Caching mode page present
Oct 15 00:27:40 homerouter kernel: [87966.676659] sd 4:0:0:0: [sdc] Assuming drive cache: write through
Oct 15 00:27:40 homerouter kernel: [87966.676703] sd 4:0:0:0: [sdc] Attached SCSI removable disk
* What exactly did you do (or not do) that was effective (or
ineffective)?
modprobe -r usb-storage, which proved ineffective
then
rmmod -f usb-storage
then
unplug the flashdrive
* What was the outcome of this action?
forced removal of usb-storage produced the following kernel dmesg
(ignore the tainted message, it is from the zfs/spl modules):
udev entered in unusable state:
* spawned processes that remained in D state
26785 ? D 0:00 /lib/udev/ata_id --export /dev/sdb
26786 ? D 0:00 /lib/udev/ata_id --export /dev/sda
26874 ? D 0:00 /sbin/mdadm --detail --export /dev/md0
* spammed the system logs with lines like this:
Oct 14 11:56:07 homerouter udevd[27438]: timeout: killing '/sbin/mdadm
--detail --export /dev/md0' [27631]
processes requesting direct i/o access to local hard drives attached to
onboard pci sata ahci controller failed to complete
(hdparm, smartd, lshw, hwinfo)
for example,
"root@homerouter:~# strace -f fdisk -l /dev/sda
execve("/sbin/fdisk", ["fdisk", "-l", "/dev/sda"], [/* 24 vars */]) = 0
brk(0) = 0x16f0000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa6c3d71000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=69342, ...}) = 0
mmap(NULL, 69342, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fa6c3d60000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libblkid.so.1", O_RDONLY) = 3
read(3, "177ELF211 3 >