Bug#640665: linux-image-2.6.32-5-amd64: USB block device write error with images > 4 GB
Package: linux-2.6
Version: 2.6.32-35
Severity: normal
I've partitioned a USB stick with parted into two partitions. The first one is set to be slightly larger
than an image files which is copied over onto with dd, followed by a bootloader installation into the MBR.
Now, this setup works fine for image files up to around 4 GB. Recently, the file has grown to 4329570304
bytes which is slightly larger than this boundary. Suddenly, the dd invocation locks up at around the
boundary and the kernel spits out some sort of "device blocked for too long" panic.
The call trace can be found in the log below.
Since the system is all amd64, this looks like a strange issue to me. Also, it affects not just one USB
stick but even a newly bought one (costly bug reporting...). Just copying the image to another file on
an ext4 partition also works without any issues.
Here's the command line used for the copy to the device:
sudo dd if=foo.img of=/dev/sdb1 bs=1048576
-- Package-specific info:
** Version:
Linux version 2.6.32-5-amd64 (Debian 2.6.32-35) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue Jun 14 09:42:28 UTC 2011
** Kernel log:
[ 1641.568094] groups: 2 (cpu_power = 589) 3 (cpu_power = 589)
[ 1641.568105] domain 1: span 0-3 level MC
[ 1641.568110] groups: 2-3 (cpu_power = 1178) 0-1 (cpu_power = 1178)
[ 1641.568123] CPU3 attaching sched-domain:
[ 1641.568127] domain 0: span 2-3 level SIBLING
[ 1641.568132] groups: 3 (cpu_power = 589) 2 (cpu_power = 589)
[ 1641.568144] domain 1: span 0-3 level MC
[ 1641.568149] groups: 2-3 (cpu_power = 1178) 0-1 (cpu_power = 1178)
[ 1641.678982] usb 1-1.4: new full speed USB device using ehci_hcd and address 8
[ 1641.774061] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=217f
[ 1641.774064] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1641.774067] usb 1-1.4: Product: Broadcom Bluetooth Device
[ 1641.774068] usb 1-1.4: Manufacturer: Broadcom Corp
[ 1641.774069] usb 1-1.4: SerialNumber: 5CAC4CCCA816
[ 1641.774169] usb 1-1.4: configuration #1 chosen from 1 choice
[ 4430.050179] usb 1-1.1: new high speed USB device using ehci_hcd and address 9
[ 4430.151155] usb 1-1.1: New USB device found, idVendor=18a5, idProduct=0302
[ 4430.151159] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4430.151163] usb 1-1.1: Product: STORE N GO
[ 4430.151165] usb 1-1.1: Manufacturer: Verbatim
[ 4430.151167] usb 1-1.1: SerialNumber: 07B40807497A8A05
[ 4430.151299] usb 1-1.1: configuration #1 chosen from 1 choice
[ 4430.151776] scsi7 : SCSI emulation for USB Mass Storage devices
[ 4430.151956] usb-storage: device found at 9
[ 4430.151959] usb-storage: waiting for device to settle before scanning
[ 4435.150411] usb-storage: device scan complete
[ 4435.335136] scsi 7:0:0:0: Direct-Access Verbatim STORE N GO 5.00 PQ: 0 ANSI: 0 CCS
[ 4435.335553] sd 7:0:0:0: Attached scsi generic sg2 type 0
[ 4436.038227] sd 7:0:0:0: [sdb] 15645120 512-byte logical blocks: (8.01 GB/7.45 GiB)
[ 4436.038865] sd 7:0:0:0: [sdb] Write Protect is off
[ 4436.038871] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 4436.038875] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 4436.042171] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 4436.042176] sdb: sdb1
[ 4436.071557] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[ 4436.071563] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[ 4572.598727] e1000e 0000:00:19.0: irq 29 for MSI/MSI-X
[ 4572.653595] e1000e 0000:00:19.0: irq 29 for MSI/MSI-X
[ 4572.654945] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4574.227071] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[ 4574.227074] 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[ 4574.229210] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 4585.164741] eth0: no IPv6 routers present
[ 5880.800476] INFO: task blkid:4527 blocked for more than 120 seconds.
[ 5880.800481] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5880.800484] blkid D 0000000000000000 0 4527 4032 0x00000000
[ 5880.800490] ffffffff814611f0 0000000000000082 0000000000000000 ffffea0004f8b1c0
[ 5880.800495] 00000000000008a2 ffff880000011d00 000000000000f9e0 ffff88016b84bfd8
[ 5880.800500] 0000000000015780 0000000000015780 ffff880237323f90 ffff880237324288
[ 5880.800505] Call Trace:
[ 5880.800516] [<ffffffff8118f973>] ? kobject_get+0x12/0x17
[ 5880.800523] [<ffffffff812fb99b>] ? __mutex_lock_common+0x122/0x192
[ 5880.800527] [<ffffffff812fbac3>] ? mutex_lock+0x1a/0x31
[ 5880.800535] [<ffffffff8111282e>] ? __blkdev_get+0x75/0x342
[ 5880.800539] [<ffffffff81112b02>] ? blkdev_open+0x0/0x96
[ 5880.800543] [<ffffffff81112b69>] ? blkdev_open+0x67/0x96
[ 5880.800549] [<ffffffff810ed45a>] ? __dentry_open+0x19d/0x2bf
[ 5880.800555] [<ffffffff810f8cbb>] ? do_filp_open+0x4e4/0x94b
[ 5880.800561] [<ffffffff810d0b1e>] ? vma_link+0x74/0x9a
[ 5880.800566] [<ffffffff81101d0d>] ? alloc_fd+0x67/0x10c
[ 5880.800570] [<ffffffff810ed1eb>] ? do_sys_open+0x55/0xfc
[ 5880.800575] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
[ 6000.793397] INFO: task blkid:4527 blocked for more than 120 seconds.
[ 6000.793401] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 6000.793404] blkid D 0000000000000000 0 4527 1 0x00000000
[ 6000.793410] ffffffff814611f0 0000000000000082 0000000000000000 ffffea0004f8b1c0
[ 6000.793416] 00000000000008a2 ffff880000011d00 000000000000f9e0 ffff88016b84bfd8
[ 6000.793420] 0000000000015780 0000000000015780 ffff880237323f90 ffff880237324288
[ 6000.793425] Call Trace:
[ 6000.793436] [<ffffffff8118f973>] ? kobject_get+0x12/0x17
[ 6000.793444] [<ffffffff812fb99b>] ? __mutex_lock_common+0x122/0x192
[ 6000.793448] [<ffffffff812fbac3>] ? mutex_lock+0x1a/0x31
[ 6000.793456] [<ffffffff8111282e>] ? __blkdev_get+0x75/0x342
[ 6000.793460] [<ffffffff81112b02>] ? blkdev_open+0x0/0x96
[ 6000.793464] [<ffffffff81112b69>] ? blkdev_open+0x67/0x96
[ 6000.793470] [<ffffffff810ed45a>] ? __dentry_open+0x19d/0x2bf
[ 6000.793476] [<ffffffff810f8cbb>] ? do_filp_open+0x4e4/0x94b
[ 6000.793481] [<ffffffff810d0b1e>] ? vma_link+0x74/0x9a
[ 6000.793487] [<ffffffff81101d0d>] ? alloc_fd+0x67/0x10c
[ 6000.793491] [<ffffffff810ed1eb>] ? do_sys_open+0x55/0xfc
[ 6000.793496] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
[ 6120.786329] INFO: task blkid:4527 blocked for more than 120 seconds.
[ 6120.786333] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 6120.786336] blkid D 0000000000000000 0 4527 1 0x00000000
[ 6120.786343] ffffffff814611f0 0000000000000082 0000000000000000 ffffea0004f8b1c0
[ 6120.786348] 00000000000008a2 ffff880000011d00 000000000000f9e0 ffff88016b84bfd8
[ 6120.786353] 0000000000015780 0000000000015780 ffff880237323f90 ffff880237324288
[ 6120.786357] Call Trace:
[ 6120.786369] [<ffffffff8118f973>] ? kobject_get+0x12/0x17
[ 6120.786376] [<ffffffff812fb99b>] ? __mutex_lock_common+0x122/0x192
[ 6120.786381] [<ffffffff812fbac3>] ? mutex_lock+0x1a/0x31
[ 6120.786388] [<ffffffff8111282e>] ? __blkdev_get+0x75/0x342
[ 6120.786392] [<ffffffff81112b02>] ? blkdev_open+0x0/0x96
[ 6120.786397] [<ffffffff81112b69>] ? blkdev_open+0x67/0x96
[ 6120.786402] [<ffffffff810ed45a>] ? __dentry_open+0x19d/0x2bf
[ 6120.786408] [<ffffffff810f8cbb>] ? do_filp_open+0x4e4/0x94b
[ 6120.786414] [<ffffffff810d0b1e>] ? vma_link+0x74/0x9a
[ 6120.786419] [<ffffffff81101d0d>] ? alloc_fd+0x67/0x10c
[ 6120.786423] [<ffffffff810ed1eb>] ? do_sys_open+0x55/0xfc
[ 6120.786428] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
** Model information
sys_vendor: LENOVO
product_name: 43494KG
product_version: ThinkPad T510
chassis_vendor: LENOVO
chassis_version: Not Available
bios_vendor: LENOVO
bios_version: 6MET75WW (1.35 )
board_vendor: LENOVO
board_name: 43494KG
board_version: Not Available
** USB devices:
Bus 002 Device 003: ID 05c6:9204 Qualcomm, Inc.
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 18a5:0302 Verbatim, Ltd
Bus 001 Device 008: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 001 Device 007: ID 17ef:100a Lenovo
Bus 001 Device 005: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages linux-image-2.6.32-5-amd64 depends on:
ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy
ii initramfs-tools [linux-initra 0.98.8 tools for generating an initramfs
ii linux-base 2.6.32-35 Linux image base package
ii module-init-tools 3.12-1 tools for managing Linux kernel mo
Versions of packages linux-image-2.6.32-5-amd64 recommends:
pn firmware-linux-free <none> (no description available)
Versions of packages linux-image-2.6.32-5-amd64 suggests:
pn grub | lilo <none> (no description available)
pn linux-doc-2.6.32 <none> (no description available)
Versions of packages linux-image-2.6.32-5-amd64 is related to:
pn firmware-bnx2 <none> (no description available)
pn firmware-bnx2x <none> (no description available)
pn firmware-ipw2x00 <none> (no description available)
pn firmware-ivtv <none> (no description available)
ii firmware-iwlwifi 0.28 Binary firmware for Intel Wireless
pn firmware-linux <none> (no description available)
pn firmware-linux-nonfree <none> (no description available)
pn firmware-qlogic <none> (no description available)
pn firmware-ralink <none> (no description available)
pn xen-hypervisor <none> (no description available)
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110906112407.4589.29050.reportbug@localhost">htt p://lists.debian.org/20110906112407.4589.29050.reportbug@localhost
09-06-2011, 02:07 PM
Ben Hutchings
Bug#640665: linux-image-2.6.32-5-amd64: USB block device write error with images > 4 GB
On Tue, 2011-09-06 at 13:24 +0200, Josef Spillner wrote:
> Package: linux-2.6
> Version: 2.6.32-35
> Severity: normal
>
> I've partitioned a USB stick with parted into two partitions. The
> first one is set to be slightly larger
> than an image files which is copied over onto with dd, followed by a
> bootloader installation into the MBR.
> Now, this setup works fine for image files up to around 4 GB.
> Recently, the file has grown to 4329570304
> bytes which is slightly larger than this boundary. Suddenly, the dd
> invocation locks up at around the
> boundary and the kernel spits out some sort of "device blocked for too
> long" panic.
> The call trace can be found in the log below.
> Since the system is all amd64, this looks like a strange issue to me.
I don't know what the architecture has to do with anything. Linux on
any architecture can work with very large files and devices.
It's conceivable that there is a bug in the USB drive's firmware that
affects writes crossing the 4 GB boundary.
The warning actually doesn't refer to the blocked write, but to a task
that is trying to open the device. That is presumably blocked by the
first task, but it shouldn't be. This might indicate a locking bug.
> Also, it affects not just one USB
> stick but even a newly bought one (costly bug reporting...). Just
> copying the image to another file on
> an ext4 partition also works without any issues.
> Here's the command line used for the copy to the device:
>
> sudo dd if=foo.img of=/dev/sdb1 bs=1048576
[...]
Here is how you could test whether the 4 GB boundary is a problem for
the device: