I/O errors when connecting SD (secure digital) flash cards

Bug #27852 reported by Andy Bovett
8
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Medium
Ben Collins

Bug Description

When connecting SD (secure digital) flash cards via USB, I/O errors
are reported by the kernel via dmesg. In some cases these prevent the
device from being mounted. The errors observed vary depending on the
method of connection (USB card reader or USB lead to the camera
holding the card), and also vary between Ubuntu version tested (Breezy
or Dapper). The problem has been observed with at least three
different PCs of varying specifications.

The four cases are summarised below:

--- BREEZY
USB card reader: Card will not mount
Camera: Card mounts only when clicking icon in Nautilus

--- DAPPER (flight 2 plus updates as of 2006-01-01)
USB card reader: Card mounts only when clicking icon in Nautilus
Camera: Card mounts automatically (ie. correct behaviour)

Dumps from dmesg are attached after connecting a device in each of
the four cases above.

Hardware:
Camera: Samsung Digimax 202
Card Reader: PNY Technologies (model unknown - small SD card reader
                               which plugs directly into USB port).
SD card 1: PNY Technologies 256 MB
SD card 2: Kingston Technology 512 MB

Revision history for this message
Andy Bovett (abovett) wrote :

Created an attachment (id=5537)
dmesg output - card reader connected to breezy

Revision history for this message
Andy Bovett (abovett) wrote :

Created an attachment (id=5538)
dmesg output - camera connected to breezy

Revision history for this message
Andy Bovett (abovett) wrote :

Created an attachment (id=5539)
dmesg output - card reader connected to dapper

Revision history for this message
Andy Bovett (abovett) wrote :

Created an attachment (id=5540)
dmesg output - camera connected to dapper

Revision history for this message
Ben Collins (ben-collins) wrote :

I've heard from other bug reports that reformatting the drive has fixed such
issues. Can you try this?

Revision history for this message
Andy Bovett (abovett) wrote :

Wasn't quite sure how you intended me to format it. I tried reformatting in the camera, and also using mkfs.msdos on a Mandriva system (which doesn't have any problems with the device). Neither made any difference. Any other suggestions as to how I should reformat it?

Revision history for this message
Ben Collins (ben-collins) wrote :

Please read http://wiki.ubuntu.com/DebuggingUSBStorage and let me know if any of it helps.

Revision history for this message
Andy Bovett (abovett) wrote :

sudo rmmod ehci_hcd didn't work - it's not loaded anyway (I guess it's because this box is too old for USB2).

I'm a bit confused about the bit about changing /sys/block/sda/queue/max_sectors_kb - when should I do it? The command fails before the device is plugged in because /sys/block/sda doesn't exist (I take it it's created by udev or something like that?) If I do it after plugging in the USB device, it seems to make no difference what value I write to the max_sectors_kb file - I still can't mount the device.

I haven't (yet) tried building a custom kernel - I've never tried before so I'm not too sure what I'm doing, and I haven't got a lot of spare time at the moment. If it's possible for someone else to do it it would be good.

(By the way - I checked all this lot on Breezy, as Dapper still has other, bigger problems on that box).

Revision history for this message
Ben Collins (ben-collins) wrote :

> (By the way - I checked all this lot on Breezy, as
> Dapper still has other, bigger problems on that box).

Let's see if we can get you fixed up on dapper. Going through all of this on breezy is somewhat pointless.

Can you point me to the bug reports of the issues you are having on dapper?

Revision history for this message
Andy Bovett (abovett) wrote :

> Can you point me to the bug reports
> of the issues you are having on dapper?

The main ones are Bug #27842 and Bug #27846 - particularly the latter, which affects several of my systems. It's basically unusable because the screen goes blank as soon as you try to do anything - it took me ages to get the info on Dapper in the original bug report!

Revision history for this message
Andy Bovett (abovett) wrote :

Dapper is now working a bit better on my machine (recent updates have improved things somewhat, though not totally solved the problems) so I've just tried the card reader again with it.

It's worse than before. It now behaves like Breezy - it won't mount the thing at all. Before it would mount it if I clicked on the icon in Nautilus, but now there isn't even an icon to click - it flashes up then vanishes. Lots of I/O errors etc. in dmesg output.

So - any suggestions for debugging this under Dapper?

Revision history for this message
Andy Bovett (abovett) wrote :

This bug is still present.

The bug is still marked "Needs info" - is there any more information I can provide? I'll do what I can to help resolve it, as I'd really like to be able to use my camera with Dapper when it is released. If this doesn't get resolved I'm going to have a bit of a problem :(

Andy B

Revision history for this message
Stefan Hinker (stefan-hinker) wrote :

is this a duplicate of bug #17881 ?

stefan

Revision history for this message
Andy Bovett (abovett) wrote :

I'm now finding that as long as I partition and format my cards on the PC before using them in the camera, it seems to be OK. I have had to use fdisk as cfdisk complains that the partition table is invalid and aborts, so it's slightly non-trivial, but I have a solution in my case. It may be that my camera is formatting the cards incorrectly in the first place - I can't remember the exact error but it was something like a partition ending beyond the physical end of the "disk" or something like that.

So I'm happy to close this bug now unless others are still having problems. With regards to Stefan's comment, his symptoms don't match mine so I don't think this is a duplicate.

Andy B

Revision history for this message
Stefan Hinker (stefan-hinker) wrote :

After some experiments, I have some new details, although not exactly hard facts.
I have absolutly no problem accessing the SD-card when reading or writing
with commandline tools (cp). This works as it should. However, when using
Konqueror to drag and drop files to the device, the card disapears spontaniously.
This even caused severe file system corruption (FAT32) on the card!!
Not much to go on, I'll continue to investigate this. However, I thought I would update everyone here.

stefan

Revision history for this message
Stefan Hinker (stefan-hinker) wrote :

As time goes by....

It seems *my* problems were hardware related. I don't have any issues with an
external card reader, only the built-in one I used has problems. So this seems
to be defective hardware. Sorry for the confusion. Please be aware that this is only
related to my own postings and does not imply that others don't have further issues.

stefan

Revision history for this message
Nanley Chery (nanoman) wrote :

Does this bug still occur with all updates?

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this linux-source-2.6.15 kernel bug to the new "linux" package. We appreciate your patience and understanding as we make this transition. Also, if you would be interested in testing the upcoming Intrepid Ibex 8.10 release, it is available at http://www.ubuntu.com/testing . Please let us know your results. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Ralph Janke (txwikinger) wrote :

Unfortunately this bug report is being closed because we received no response to the last inquiry for information. However, the Intrepid Ibex 8.10 Beta release was most recently announced - http://www.ubuntu.com/testing/intrepid/beta . If you are able to confirm this is still an issue with this most recent release please feel free to reopen this report. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks.

Changed in linux:
status: Incomplete → Invalid
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.