Bug 442177

Summary: Read past end of device after plugging in (phone) memory card on usb
Product: [Fedora] Fedora Reporter: Bill Crawford <billcrawford1970>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: agk, bmarzins, bmr, dwysocha, kernel-maint, mbroz, prockai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 15:58:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Snippet of /var/log/messages after connecting phone via usb
none
Output of fsck.vfat -n -v /dev/sdi none

Description Bill Crawford 2008-04-12 14:24:10 UTC
Description of problem:
USB errors after attaching USB device (in this case a Sony Ericsson W880i
'phone, file transfer mode).

Version-Release number of selected component (if applicable):
2.6.25-0.218.rc8.git7.fc9.i686

How reproducible:
Plug in the 'phone.

Steps to Reproduce:
1. Plug usb cable for 'phone into usb port on PC.
2. Attach cable to 'phone.
3. See odd error messages in /var/log/messages.
  
Actual results:
Attached.

Expected results:
Not to have these.

Additional info:
Looks like maybe lvm scanning as they look eerily like the output I remember
seeing when lvm insisted on trying to scan my cdrom.

Comment 1 Bill Crawford 2008-04-12 14:24:11 UTC
Created attachment 302219 [details]
Snippet of /var/log/messages after connecting phone via usb

Comment 2 Chuck Ebbert 2008-04-14 22:26:44 UTC
The first partition extends beyond the end of the device. Is it possible to get
the output of "fdisk -l" for that disk?


Comment 3 Bill Crawford 2008-04-14 23:21:29 UTC
[root@pikachu ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 995 MB, 995958272 bytes
64 heads, 32 sectors/track, 949 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         950      972615+   6  FAT16


Comment 4 Bill Crawford 2008-04-14 23:27:37 UTC
[root@pikachu ~]# fdisk -l -u /dev/sdc

Disk /dev/sdc: 995 MB, 995958272 bytes
64 heads, 32 sectors/track, 949 cylinders, total 1945231 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *         369     1945599      972615+   6  FAT16


Comment 5 Bill Crawford 2008-04-14 23:30:02 UTC
So yes, but even allowing for the apparent off-by-one in the partition table,
we're reading 'way past the end. LVM + readahead?

Comment 6 Bill Crawford 2008-04-14 23:32:16 UTC
OK, disabling lvm for /dev/sdc stops the message spew, so it is lvm accessing
(or attempting to access) those sectors. Anything else I can do?

Comment 7 Bill Crawford 2008-04-18 09:23:39 UTC
Created attachment 302859 [details]
Output of fsck.vfat -n -v /dev/sdi

Looks like another Sony "mess with the details" trick, like their DVDs that
won't play in a PC due to missing sectors ...

Apologies for the noise, this isn't really a kernel bug. Although we could
perhaps detect and work around it?

Comment 8 Chuck Ebbert 2008-04-27 03:48:59 UTC
What is the problem with the fsck output?


Comment 9 Chuck Ebbert 2008-04-28 02:55:46 UTC
After some discussion on IRC I see that the partition is too big but the
filesystem doesn't use the whole partition. lvm appears to try forever to read
information at the end of the disk instead of giving up after failure and that's
what causes the problem.

Comment 10 Bug Zapper 2008-05-14 09:21:08 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Bug Zapper 2009-06-10 00:09:00 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Bug Zapper 2009-07-14 15:58:21 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.