USB storage device capacity is incorrect and device is not writeable

Bug #997021 reported by Sturm Flut
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Fix Released
High
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Description: Ubuntu quantal (development branch)
Release: 12.10
Kernel Package Version: linux-image-3.4.0-1-generic 3.4.0-1.3

I am having serious problems with an Intenso Rainbow Line 16 GB USB storage device on my Hewlett-Packard HP Compaq 6710b (Intel Centrino) notebook with kernel 3.4.0-1-generic x86_64.

On kernel 3.2.0-24-generic x86_64 the device works as expected, the capacity is reported correct and the raw speed is within manufacturer specifications (~30 Mbyte/s read, 8 Mbyte/s write).

On kernel 3.4.0-1-generic x86_64 the device capacity is reported as 18 Exabytes instead of 16 Gigabytes, and I can only read the device, but not write to it. Every write attempt ends in "Device not seekable" and/or "No space left on device":

sturmflut@cloud:~/tmp/bug$ sudo dd_rescue /dev/zero /dev/sdb
dd_rescue: (warning): output file is not seekable!
dd_rescue: (warning): Invalid argument
dd_rescue: (warning): Don't use sparse writes for non-seekable output
dd_rescue: (info): ipos: 0.0k, opos: 0.0k, xferd: 0.0k
                   errs: 0, errxfer: 0.0k, succxfer: 0.0k
             +curr.rate: 0kB/s, avg.rate: 0kB/s, avg.load: 0.0%

dd_rescue: (warning): write /dev/sdb (0.0k): No space left on device
dd_rescue: (warning): assumption rd(65536) == wr(0) failed!
dd_rescue: (fatal): write /dev/sdb (64.0k): No space left on device!

dd_rescue: (info): Summary for /dev/zero -> /dev/sdb:
dd_rescue: (info): ipos: 64.0k, opos: 64.0k, xferd: 64.0k
                   errs: 1, errxfer: 0.0k, succxfer: 0.0k
             +curr.rate: 178273kB/s, avg.rate: 153846kB/s, avg.load: 0.0%

sturmflut@cloud:~/tmp/bug$ sudo fdisk /dev/sdb
fdisk: unable to seek on /dev/sdb: Invalid argument

This clearly is a regression introduced by kernel 3.4 itself. Other USB storage devices work as expected, on both kernels.

Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Revision history for this message
Sturm Flut (sturmflut) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: quantal
Revision history for this message
Sturm Flut (sturmflut) wrote :

Still present in package linux-image-3.4.0-2-generic, version 3.4.0-2.6

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.4kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc7-precise/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
tags: added: needs-upstream-testing regression-release
Revision history for this message
Sturm Flut (sturmflut) wrote :

@Joseph Salisbury:
AFAICS from [1], the linux-image package for v3.4-rc7-precise never got built because of a build error. I could test v3.4-rc6-precise, but that one is already 11 days old.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc7-precise/BUILD.LOG

Revision history for this message
Sturm Flut (sturmflut) wrote :

I tried linux-image 3.4.0-030400rc6-generic from the PPA: Same problem. So this is an upstream bug?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Correct, this appears to be an upstream bug.

Would it be possible for you to open an upstream bug report at bugzilla.kernel.org [1]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

If you are comfortable with opening a bug upstream, It would be great if you can report back the upstream bug number in this bug report. That will allow us to link this bug to the upstream report.

[1] https://wiki.ubuntu.com/Bugs/Upstream/kernel

Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Sturm Flut (sturmflut) wrote :

Sure, upstream bug report can be found on https://bugzilla.kernel.org/show_bug.cgi?id=43265 .

Changed in linux:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
Sturm Flut (sturmflut) wrote :

I confirmed this bug on all kernel versions after 3.4.0-rc6, including the "stable" kernels 3.4.0 and 3.4.1 and the development kernels for 3.5. If you are affected by this bug, please consider reporting on https://bugzilla.kernel.org/show_bug.cgi?id=43265 .

tags: added: kernel-bug-exists-upstream
removed: needs-upstream-testing
Revision history for this message
Sturm Flut (sturmflut) wrote :

The bug was introduced by commit 09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 and a working patch is available as of today, see http://marc.info/?l=linux-usb&m=133958087430103&w=2 .

Revision history for this message
Sturm Flut (sturmflut) wrote :

The patch has been pulled into git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git as commit afff07e61a5243e14ee3f0a272a0380cd744a8a3 and should land in linux-next within a short time frame, finally fixing the problem in development kernel 3.5-rc3 or 3.5.-rc4. This bug report may be closed now. Thanks for your cooperation!

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Sturm

It would be great if you could test the latest mainline kernel once that patch lands, and report back in this bug if it fixes your issue or not. I'll wait until this bug lands in Quantal to mark it as "Fix Released"

Thanks for all your help!

Changed in linux (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Sturm Flut (sturmflut) wrote :

The kernel developers are currently discussing a workaround which would make all quirks obsolete and effectively reinstate the old behaviour, see http://marc.info/?l=linux-usb&m=133978464008410&w=2. Let's wait how it turns out.

Changed in linux:
status: Confirmed → Fix Released
Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

The patch that closed the upstream bug report [0] landed in Quantal with 3.5-rc5 - so please confirm that this issue is fixed.

[0]
commit 6a0bdffa0073857870a4ed1b4489762146359eb4
Author: Alan Stern <email address hidden>
Date: Wed Jun 20 16:04:19 2012 -0400

    SCSI & usb-storage: add try_rc_10_first flag

Changed in linux (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Sturm Flut (sturmflut) wrote :

I never ran into the problem again on any of my machines, so I think this bug can be closed.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.