This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 162516 - "Suddenly" FC4 refuses to recognize 1GB SD card (Buffer I/O error)
"Suddenly" FC4 refuses to recognize 1GB SD card (Buffer I/O error)
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
5
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
NeedsRetesting
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-05 15:22 EDT by Luis A. Florit
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-25 14:06:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
content of /var/log/messages, dmesg, /proc/bus/usb/devices and /proc/scsi/usb-storage/x (13.22 KB, text/plain)
2005-07-05 15:22 EDT, Luis A. Florit
no flags Details
/var/log/messages output (8.35 KB, text/plain)
2005-08-16 21:43 EDT, Luis A. Florit
no flags Details

  None (edit)
Description Luis A. Florit 2005-07-05 15:22:40 EDT
Description of problem:
I have FC4 installed, fully updated.
I am unable to use a 1GB SDcard. It gives lots of Buffer I/O errors (see below).
After several tries, the card reader shows the green light off.

However, the digital camera, FC2, Windows, and even FC4 with "single" in boot
line, can mount and use the card with no problems (that's why I assume is a udev
problem). 

It was working fine (yum update problem?). All this also gives a I/O error with
gphoto2, not when plugging, but when downloading.

Version-Release number of selected component (if applicable):
kernel-2.6.11-1.1369_FC4
kernel-2.6.12-1.1387_FC4
udev-058-1

How reproducible:
(now) always.

Steps to Reproduce:
Just plugging the card reader with the SDcard, or even plugging the SDcard
after plugging the card reader.
  
Actual results:
Card reader dead.

Expected results:
Smooth recognition of the card.

Additional info:
See attached /var/log/messages, dmesg, /proc/bus/usb/devices,
/proc/scsi/usb-storage/x
Comment 1 Luis A. Florit 2005-07-05 15:22:40 EDT
Created attachment 116375 [details]
content of /var/log/messages, dmesg, /proc/bus/usb/devices and /proc/scsi/usb-storage/x
Comment 2 Luis A. Florit 2005-07-05 20:08:02 EDT
Some (perhaps) important stuff.
I am having the same problem with two computers, 
although they have almost the same installation and hardware.
And I tried with the same reader, but a 32MB SDcard, and it works fine.
So, it appears to have something to do with the size of the card (?).
I formated the card with the in-camera format feature, and later with a 

$ mkfs.vfat -c /dev/sda

(it gave me 35 bad blocks) and the problem persists.
I am now able to use gphoto2 (PTP).
L.
Comment 3 Pete Zaitcev 2005-07-11 02:06:52 EDT
I'd like to see /proc/partitions, and also the output of
"parted /dev/sda print" (this prints start offsets as well as sizes)
Comment 4 Luis A. Florit 2005-07-12 21:22:18 EDT
Pete,

   Ok, here you are (after plugging the card, 
with a lot of errors to the console):

$ cat /proc/partitions
major minor  #blocks  name

   3     0   80043264 hda
   3     1     321300 hda1
   3     2   14458468 hda2
   3     3     562275 hda3
   3     4          1 hda4
   3     5   14378143 hda5
   3     6   10442218 hda6
   3     7   20884468 hda7
   3     8   18980766 hda8
   3    64   19941264 hdb
   3    65     120487 hdb1
   3    66   12643155 hdb2
   3    67    6707106 hdb3
   3    68          1 hdb4
   3    69     265041 hdb5
   3    70     200781 hdb6

$ parted /dev/sda print
Error: Error opening /dev/sda: No medium found
Retry/Cancel? R                                                           
Error: Error opening /dev/sda: No medium found                            
Retry/Cancel? C

(no surprise about the last... Device /dev/sda was created).
Comment 5 Pete Zaitcev 2005-07-13 01:17:59 EDT
/dev/sda missing from /proc/partitions is not consistent with the original
attachment from comment #1, quote:

12:29:07 Antares kernel: sda: assuming drive cache: write through
12:29:07 Antares kernel:  sda: sda1

Are you sure you have nailed down one failure scenario among many?
Comment 6 Luis A. Florit 2005-07-13 19:22:47 EDT
Yeap, it is inconsistent.
In all the error messages it appears "sda: sda1",
but no sda1 (nor sda#) is created. Only sda.
At the beginning, it appears it will be all just fine, 
but then... lots of I/O errors. With 3 different kernels.

L.
Comment 7 Luis A. Florit 2005-07-13 19:46:14 EDT
BTW, as I said above, all works fine outside hotplug
(single option at boot).

Here I discovered another hotplug inconsistency:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162799

Here, while hotplug says the device /dev/sda1 does not exist when
trying to mount the device through /etc/hotplug/usb/usb-storage,
you can mount it normally with the mount command!
Although this has nothing to do with this bug (same happens with 
any pen drive) I think it may indicate that the problem is in
udev/hotplug. All worked fine until I update the system...

L.
Comment 8 Dave Jones 2005-07-15 17:06:16 EDT
[This comment has been added as a mass update for all FC4 kernel bugs.
 If you have migrated this bug from an FC3 bug today, ignore this comment.]

Please retest your problem with todays 2.6.12-1.1398_FC4 update.

If your problem involved being unable to boot, or some hardware not being
detected correctly, please make sure your /etc/modprobe.conf is correct *BEFORE*
installing any kernel updates.
If in doubt, you can recreate this file using..

mv /etc/sysconfig/hwconf /etc/sysconfig/hwconf.bak
mv /etc/modprobe.conf /etc/modprobe.conf.bak
kudzu


Thank you.
Comment 9 Luis A. Florit 2005-07-15 19:36:05 EDT
(In reply to comment #8)
>
> Please retest your problem with todays 2.6.12-1.1398_FC4 update.

The problem persists with the new kernel.
Nothing seems to be changed.

L. 
Comment 10 Luis A. Florit 2005-08-16 21:43:02 EDT
Created attachment 117820 [details]
/var/log/messages output
Comment 11 Luis A. Florit 2005-08-16 21:44:44 EDT
This can be important. 
I have another SD card, this one is small: 32MB.
It always worked fine with FC4 and a card reader, 
but I reformated it with a digital camera. After that,
I am getting the SAME errors!! I reformated the card in Windows XP
(where all works smoothly), but the problem persists.
Now, I cannot access either SD card!
Again, file /dev/sda was created, but no /dev/sda#.
Again, there is no sda in /proc/partitions:

$ cat /proc/partitions
major minor  #blocks  name

   3     0   80043264 hda
   3     1     321300 hda1
   3     2   14458468 hda2
   3     3     562275 hda3
   3     4          1 hda4
   3     5   14378143 hda5
   3     6   10442218 hda6
   3     7   20884468 hda7
   3     8   18980766 hda8
   3    64   19941264 hdb
   3    65     120487 hdb1
   3    66   12643155 hdb2
   3    67    6707106 hdb3
   3    68          1 hdb4
   3    69     265041 hdb5
   3    70     200781 hdb6

However, I have this in /proc/bus/usb/devices:

T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=01 Dev#= 18 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0ea0 ProdID=2153 Rev= 2.00
S:  Manufacturer=USB     
S:  Product=Storage Device  
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=125us

   Ok, since this seems to be a hard bug and I really need to use
the cards, please, tell me how can I avoid hotplug/udev to start
or manage these cards, since they just don't work for me. 
I can use the cards normally in Linux single mode boot, but to 
reboot each time I need the card is very annoying.

Thanks!!

L. 
PS: above, the /var/log/messages output.
Comment 12 Pete Zaitcev 2005-08-16 21:58:50 EDT
Please try to recover old /var/log/messages back from the time the 32MB card
worked the last time. If you act quickly, they may be available.
Comment 13 Luis A. Florit 2005-08-16 22:30:46 EDT
Got it (miracle!). 
Here you are, two consecutive mounts of the card:


Jul 25 22:53:00 Orion kernel: usb 5-2: new full speed USB device using uhci_hcd
and address 2
Jul 25 22:53:01 Orion kernel: Initializing USB Mass Storage driver...
Jul 25 22:53:01 Orion kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jul 25 22:53:01 Orion kernel: usbcore: registered new driver usb-storage
Jul 25 22:53:01 Orion kernel: USB Mass Storage support registered.
Jul 25 22:53:06 Orion kernel:   Vendor:           Model:                   Rev:
Jul 25 22:53:06 Orion kernel:   Type:   Direct-Access                      ANSI
SCSI revision: 02
Jul 25 22:53:06 Orion kernel: SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
Jul 25 22:53:06 Orion kernel: sda: Write Protect is off
Jul 25 22:53:06 Orion kernel: sda: assuming drive cache: write through 
Jul 25 22:53:06 Orion kernel: SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
Jul 25 22:53:06 Orion kernel: sda: Write Protect is off
Jul 25 22:53:06 Orion kernel: sda: assuming drive cache: write through
Jul 25 22:53:06 Orion kernel:  sda: sda1
Jul 25 22:53:06 Orion kernel: Attached scsi removable disk sda at scsi2, channel
0, id 0, lun 0
Jul 25 22:53:07 Orion scsi.agent[15137]: disk at
/devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/host2/target2:0:0/2:0:0:0
Jul 25 22:54:50 Orion kernel: usb 5-2: USB disconnect, address 2
Jul 25 22:54:53 Orion kernel: usb 1-8: new high speed USB device using ehci_hcd
and address 6
Jul 25 22:54:53 Orion kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Jul 25 22:54:58 Orion kernel:   Vendor: USB       Model: Storage Device    Rev:     
Jul 25 22:54:58 Orion kernel:   Type:   Direct-Access                      ANSI
SCSI revision: 02
Jul 25 22:54:59 Orion kernel: SCSI device sda: 60800 512-byte hdwr sectors (31 MB)
Jul 25 22:54:59 Orion kernel: sda: Write Protect is off                    
Jul 25 22:54:59 Orion kernel: sda: assuming drive cache: write through
Jul 25 22:54:59 Orion kernel: SCSI device sda: 60800 512-byte hdwr sectors (31 MB)
Jul 25 22:54:59 Orion kernel: sda: Write Protect is off
Jul 25 22:54:59 Orion kernel: sda: assuming drive cache: write through
Jul 25 22:54:59 Orion kernel:  sda: sda1 
Jul 25 22:54:59 Orion kernel: Attached scsi removable disk sda at scsi3, channel
0, id 0, lun 0
Jul 25 22:54:59 Orion scsi.agent[15323]: disk at
/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/host3/target3:0:0/3:0:0:0

As I told you, I would like to know how to opperate the cards as 
in single user mode, since in that mode the card works perfectly. 
How can I do this? Which services are taking care of this card
management?

Thanks!!

Luis.
Comment 14 Luis A. Florit 2005-08-16 22:46:40 EDT
GOT IT!!
I run "top" while plugging the card to see the CPU activity, 
and discovered that haldaemon was running...
Now, doing a 'service haldaemon stop' before plugging the card, 
allows me to use it.

So, it seems a haldaemon service related problem.

L.
Comment 15 Rudolf Ulc 2005-08-17 16:10:26 EDT
I have similar problem.
I have two SD card - 128 MB and 512 MB, 
old digital camera Benq DC 2300, external card reader YAKUMO IC1210 (new).

I known that:
FC4, kernel 2.6.12-1.1398, SD 128 MB, Benq DC2300   - work ok
FC4, kernel 2.6.12-1.1398, SD 512 MB, Benq DC2300   - don't work
FC4, kernel 2.6.12-1.1398, SD 128 MB, YAKUMO IC1210 - work ok
FC4, kernel 2.6.12-1.1398, SD 512 MB, YAKUMO IC1210 - work ok
RH7.3 kernel 2.4.20-30.7,  SD 128 MB, Benq DC2300   - work ok 
RH7.3 kernel 2.4.20-30.7,  SD 512 MB, Benq DC2300   - work ok
RH7.3 kernel 2.4.20-30.7,  SD 128 MB, YAKUMO IC1210 - work ok
RH7.3 kernel 2.4.20-30.7,  SD 512 MB, YAKUMO IC1210 - work ok
WINXP                      SD 128 MB, Benq DC2300   - work ok
WINXP                      SD 512 MB, Benq DC2300   - work ok
WINXP                      SD 128 MB, YAKUMO IC1210 - work ok
WINXP                      SD 512 MB, YAKUMO IC1210 - work ok

-> new kernel (2.6) + old reader + new or big SD card = don't work usb starage

My friend have SD card 512 MB, card reader PQI Travel Flash 5in1 and he have
same problem. And same error with kernel 2.6.
Comment 16 Dave Jones 2005-09-30 02:07:05 EDT
Mass update to all FC4 bugs:

An update has been released (2.6.13-1.1526_FC4) which rebases to a new upstream
kernel (2.6.13.2). As there were ~3500 changes upstream between this and the
previous kernel, it's possible your bug has been fixed already.

Please retest with this update, and update this bug if necessary.

Thanks.
Comment 17 Rudolf Ulc 2005-09-30 13:29:48 EDT
(In reply to comment #15) With kernel 2.6.13-1.1526_FC4  SD card 512 MB and 
Benq DC2300 work ok !   
 
Comment 18 Luis A. Florit 2005-09-30 21:19:06 EDT
No, no improvement. 
With the new kernel 2.6.13-1.1526_FC4 the problems persist identically.
Stopping hald does solves the problem, so this seems to be a hal problem, not a
kernel problem.

L.
Comment 19 Luis A. Florit 2006-02-04 19:59:00 EST
New kernel has arrived!!!! kernel-2.6.15-1.1830_FC4 
And the bug.... it's WORSE! 
Now, stopping hald daemon does not work anymore. 
My SD card is only accessible in 'linux single' mode. 
 
I have to use Windows to read a stupid memory card!!!!!!!!! 
 
More than half a year and this bug remains ignored. 
For each new package release that appears, it introduces two bugs. 
More signs of Fedora's agony. A pitty. 
L. 
Comment 20 John (J5) Palmieri 2006-02-06 10:21:09 EST
David,

Have you heard of HAL preventing someone from mounting a drive?  Is this a known
issue?
Comment 21 Luis A. Florit 2006-02-09 21:13:08 EST
John, 
I have googled this bug.  
I found more than a hundred hits, with exactly the same issue. 
But I found no one that solved it. 
 
I still can mount in linux=single mode, and I discovered the workaround 
of stopping hald, although this does not work anymore. 
 
Although it seems a kernel problem, old kernels  
where mounting worked don't work anymore. 
 
No clue what it is... 
 
Thanks, 
 
L. 
Comment 22 David Zeuthen 2006-02-09 21:22:53 EST
So clearly this is an issue with the kernel driver. Papering it over with
assigning it to hal (an userspace component that simply polls the drive every
two seconds to catch media changes) certainly won't get it fixed any sooner.

Reassigning to kernel.
Comment 23 Luis A. Florit 2006-02-10 08:09:21 EST
Originally I assigned to hotplug, and don't know who changed it. 
What is strange about a kernel problem is that the same kernels  
worked, then stopped to work. 
Could this shed some light in the problem?: 
http://www.linux.net.nz/pipermail/nzlug/2005-September/001170.html 
Comment 24 Luis A. Florit 2006-04-10 20:55:41 EDT
With a fresh complete FC5 install and the new kernel 2.6.16-1.2080_FC5,  
it now works. But it still shows a lot of errors (see below, 
from /var/log/messages). Both 1GB and 32Mb cards give the same errros. 
Gphoto is not working, and perhaps this has something to do with this. 
 
The 32Mb cards is ok when 'sfdisk -l <device>' is run. 
But the partition table of the 1GB card seems broken, and 
wasn't able to fix it with 'sfdisk <device>'. 
 
Thanks,  L. 
 
 
Orion kernel: usb 5-3: USB disconnect, address 11 
Orion kernel: usb 5-3: new high speed USB device using ehci_hcd and address 12         
Orion kernel: usb 5-3: configuration #1 chosen from 1 choice 
Orion kernel: scsi5 : SCSI emulation for USB Mass Storage devices 
Orion kernel:   Vendor: USB       Model: Storage Device    Rev:      
Orion kernel:   Type:   Direct-Access                      ANSI SCSI revision: 
02 
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB)                 
Orion kernel: sda: Write Protect is off 
Orion kernel: sda: assuming drive cache: write through 
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB) 
Orion kernel: sda: Write Protect is off 
Orion kernel: sda: assuming drive cache: write through 
Orion kernel:  sda: sda1 
Orion kernel: sd 5:0:0:0: Attached scsi removable disk sda 
Orion kernel: sd 5:0:0:0: Attached scsi generic sg0 type 0 
Orion kernel: end_request: I/O error, dev sda, sector 1983993 
Orion kernel: Buffer I/O error on device sda1, logical block 1983744 
Orion kernel: Buffer I/O error on device sda1, logical block 1983745  
Orion kernel: Buffer I/O error on device sda1, logical block 1983746 
Orion kernel: Buffer I/O error on device sda1, logical block 1983747 
Orion kernel: Buffer I/O error on device sda1, logical block 1983748 
Orion kernel: Buffer I/O error on device sda1, logical block 1983749 
Orion kernel: Buffer I/O error on device sda1, logical block 1983750 
Orion kernel: Buffer I/O error on device sda1, logical block 1983744 
Orion kernel: Buffer I/O error on device sda1, logical block 1983745 
Orion kernel: Buffer I/O error on device sda1, logical block 1983746 
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB) 
Orion kernel: sda: Write Protect is off  
Orion kernel: sda: assuming drive cache: write through 
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB) 
Orion kernel: sda: Write Protect is off 
Orion kernel: sda: assuming drive cache: write through 
Orion kernel:  sda: sda1 
Orion kernel: end_request: I/O error, dev sda, sector 1983993  
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB) 
Orion kernel: sda: Write Protect is off 
Orion kernel: sda: assuming drive cache: write through 
Orion kernel: end_request: I/O error, dev sda, sector 1983993 
Orion kernel: SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB) 
Orion kernel: sda: Write Protect is off 
Orion kernel: sda: assuming drive cache: write through 
 
 
Comment 25 Dave Jones 2006-09-16 21:36:53 EDT
[This comment added as part of a mass-update to all open FC4 kernel bugs]

FC4 has now transitioned to the Fedora legacy project, which will continue to
release security related updates for the kernel.  As this bug is not security
related, it is unlikely to be fixed in an update for FC4, and has been migrated
to FC5.

Please retest with Fedora Core 5.

Thank you.
Comment 26 Dave Jones 2006-10-16 13:29:49 EDT
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.
Comment 27 Luis A. Florit 2006-11-25 14:06:14 EST
Working in FC5. Thanks.

Note You need to log in before you can comment on or make changes to this bug.