Bug 2802 - N810 USB connection to Linux PC gives 'attempt to access beyond end of device' error
: N810 USB connection to Linux PC gives 'attempt to access beyond end of device...
Status: RESOLVED DUPLICATE of bug 2940
Product: Utilities
File manager
: unspecified
: N810 Linux
: Low normal (vote)
: ---
Assigned To: unassigned
: file-manager-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2008-01-19 18:26 UTC by Richard Booth
Modified: 2008-12-06 14:57 UTC (History)
1 user (show)

See Also:


Attachments


Note

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


Description Richard Booth (reporter) 2008-01-19 18:26:03 UTC
STEPS TO REPRODUCE THE PROBLEM:
Using Ubuntu Gutsy. Connect N810 to Linux PC. Internal Memory card recognised,
but several errors with the internal memory card reported if you run dmesg on
the Linux PC

EXPECTED OUTCOME:
No errors on the internal card

ACTUAL OUTCOME:
-- snip --
[ 2598.348000] Buffer I/O error on device sda1, logical block 501757
[ 2598.348000] attempt to access beyond end of device
[ 2598.348000] sda: rw=0, want=4014080, limit=3932160
[ 2598.348000] attempt to access beyond end of device
----------

REPRODUCIBILITY:
Always - see thread here
http://www.internettablettalk.com/forums/showthread.php?p=121535

EXTRA SOFTWARE INSTALLED:
None

OTHER COMMENTS:
This is fixed by copying the maps to the PC, then using the N810 filemanager to
format the internal memory, then copying the maps back. The N810's internal
memory then connects over USB without any errors.

I thought Nokia should be aware for correcting on the hardware/ production
line.

'System Management->File Manager' is not the 100% the right area to report this
in this bugzilla, but as there is no 'hardware' component, I thought this is
the best fit to feedback.
Comment 1 Marius Gedminas 2008-03-21 23:48:51 UTC
Just got my N810.  The bug is real:

[584959.868000] usb-storage: device scan complete
[584959.868000] scsi 3:0:0:0: Direct-Access     Nokia    N810              031
PQ: 0 ANSI: 2
[584959.868000] scsi 3:0:0:1: Direct-Access     Nokia    N810              031
PQ: 0 ANSI: 2
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.872000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.872000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.872000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.876000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.876000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.876000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.876000]  sdb: sdb1
[584959.880000]  sdb: p1 exceeds device capacity
[584959.884000] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[584959.884000] sd 3:0:0:0: Attached scsi generic sg2 type 0
[584959.884000] sd 3:0:0:1: [sdc] Attached SCSI removable disk
[584959.884000] sd 3:0:0:1: Attached scsi generic sg3 type 0
[584960.240000] attempt to access beyond end of device
[584960.240000] sdb: rw=0, want=4013848, limit=3932160
[584960.240000] Buffer I/O error on device sdb1, logical block 501728
Comment 2 Marius Gedminas 2008-03-30 12:37:27 UTC
I'm not sure the workaround is working.  After I reformatted the internal
memory card with the file manager and used it for a week, I lost all the data
copied to it.  It started with the filesystem on /media/mmc2 being remounted
read-only. dmesg had a bunch of "access beyond the end of the device" messages.
 I rebooted and discovered to my great joy that  the partition table and most
of the FAT got overwritten by the contents of some of the files.

I reformatted the card again and did an experiment:

  $ cd /media/mmc2 && dd if=/dev/zero of=bigfile bs=8K
  dd: writing 'bigfile': No space left on device
  490559+0 records in
  490558+0 records out

So far so good, but watch this:

  $ dmesg | tail
  ...
  [ 1793.835937] FAT: Filesystem panic (dev mmcblk0p1)
  [ 1793.835937]     fat_get_cluster: invalid cluster chain (i_pos 122753)
  [ 1793.835937]     File system has been set read-only

This time at least the partition table wasn't destroyed.  dosfsck complains in
the following way:

dosfsck 2.11, 12 Mar 2005, FAT32, LFN
FATs differ - using first FAT.
/bigfile
  Contains a free cluster (259328). Assuming EOF.
/bigfile
  File size is 2009325568 bytes, cluster chain length is 1062195200 bytes.
  Truncating file to 1062195200 bytes.
Reclaimed 133057 unused clusters (545001472 bytes).
Free cluster summary wrong (0 vs. really 231233)
1) Correct
2) Don't correct
? 2
Leaving file system unchanged.
/dev/sdb1: 1 files, 259326/490559 clusters

At this point I'm not sure if the card was formatted incorrectly, or if there's
a problem deeper down (hardware?).
Comment 3 Marius Gedminas 2008-03-30 13:09:20 UTC
FWIW it doesn't matter if I do the dd of=bigfile thing directly on the N810, or
by mounting its internal memory via USB: in both cases I get

[770989.424000] FAT: Filesystem panic (dev sdb1)
[770989.424000]     fat_get_cluster: invalid cluster chain (i_pos 122753)
[770989.424000]     File system has been set read-only

and the only difference seems to be the device name
Comment 4 Marius Gedminas 2008-03-30 13:29:39 UTC
I did another test: deleted and created a slightly smaller partition with
cfdisk (and left 0.13MB free space at the end), created a VFAT partition on it,
mounted and did the dd thing.  Again, got the same error, but this time the
partition table was cleared as well.
Comment 5 Marius Gedminas 2008-03-30 14:09:41 UTC
If I create a smaller filesystem with

  sudo mkdosfs -F 32 /dev/sdb1 1000000

I get no filesystem errors in dmesg.  With a more optimistic

  sudo mkdosfs -F 32 /dev/sdb1 1700000

I get the error.  I'm reluctant do do a full binary search, thinking about the
limited number of flash write cycles.  On the other hand it's not fun to get
just 1 working gig when the box promised two and I can't use my old full-size 4
gig SD card. :(
Comment 6 Eero Tamminen nokia 2008-04-08 14:02:44 UTC
> [ 2598.348000] attempt to access beyond end of device

Duplicate of bug 2940.

> I thought Nokia should be aware for correcting on the hardware/ production line.

The issue was fixed quite a while ago, but it's possible there are
still devices with internal FAT formatted larger than the internal memory
card in the shops.  On the devices with this issue, reformatting the internal
memory card (either with the device or from  Window/Linux/Mac after plugging
in the USB cable) solves it.


*** This bug has been marked as a duplicate of bug 2940 ***