Mailing List Archive

n900 and sd card IO errors
Nokia N900 with SanDisk 32GB class 10 micro SD card.

I have been using this micro SD card with kernel-power v50 for several
months. Suddenly the N900 reset one day, during or after a phone call
I think. I thought that was strange, but then noticed that, starting
then, *every* time I tried running unison (triggers lots of IO on SD
card), the N900 would reset. There was also some strange filesystem
behavior with the Debian chroot on the SD card. dmesg contains
messages like these (some line breaks added):

mmcblk1: error -110 sending read/write command, \
response 0x0, card status 0x400b00
mmcblk1: error -110 transferring data, sector 15210519, \
nr 1, card status 0x400b00
end_request: I/O error, dev mmcblk1, sector 15210519

(For some reason, it was sometimes 'mmcblk0' instead of 'mmcblk1', but
either way the messages happened only when there is external SD card
IO.)

e2fsck (using N900 as reader) returns errors like this (line breaks
added again):

Error reading block 1376258 (Attempt to read block from filesystem \
resulted in short read) while getting next inode from scan. Ignore \
error<y>?

But everything works great with a SD card reader on a regular Linux
system.

So I tried upgrading to kernel-power v52, tried the stock kernel, and
tried reflashing to stock everything. Same errors.

It seems like from
<http://maemo.org/community/maemo-users/n900_microsd_card_i-o_errors_and_corruption/>
and <http://www.gossamer-threads.com/lists/maemo/users/65584#65591>
that this error happens with the higher speed class SD cards, but has
been worked around starting with v49 of kernel-power. Does anyone
have any idea why I suddenly began to experience these IO errors?

Thanks.
Re: n900 and sd card IO errors [ In reply to ]
On Fri 13 September 2013 05:16:36 green wrote:
> Nokia N900 with SanDisk 32GB class 10 micro SD card.
>
> I have been using this micro SD card with kernel-power v50 for several
> months. Suddenly the N900 reset one day, during or after a phone call
> I think. I thought that was strange, but then noticed that, starting
> then, *every* time I tried running unison (triggers lots of IO on SD
> card), the N900 would reset. There was also some strange filesystem
> behavior with the Debian chroot on the SD card. dmesg contains
> messages like these (some line breaks added):
>
> mmcblk1: error -110 sending read/write command, \
> response 0x0, card status 0x400b00
> mmcblk1: error -110 transferring data, sector 15210519, \
> nr 1, card status 0x400b00
> end_request: I/O error, dev mmcblk1, sector 15210519
>
> (For some reason, it was sometimes 'mmcblk0' instead of 'mmcblk1', but
> either way the messages happened only when there is external SD card
> IO.)

mmc0 when you booted with uSD in, mmc1 when you inserted it after booting


> e2fsck (using N900 as reader) returns errors like this (line breaks
> added again):
>
> Error reading block 1376258 (Attempt to read block from filesystem \
> resulted in short read) while getting next inode from scan. Ignore \
> error<y>?
>
> But everything works great with a SD card reader on a regular Linux
> system.
>
> So I tried upgrading to kernel-power v52, tried the stock kernel, and
> tried reflashing to stock everything. Same errors.
>
> It seems like from
> <http://maemo.org/community/maemo-users/n900_microsd_card_i-o_errors_and_co
> rruption/> and
> <http://www.gossamer-threads.com/lists/maemo/users/65584#65591> that this
> error happens with the higher speed class SD cards, but has been worked
> around starting with v49 of kernel-power. Does anyone have any idea why I
> suddenly began to experience these IO errors?


Electrical properties of MMC interfaces are not all the same. A card that
seems to work in one reader may fail in another.
And a card that once worked fine may start to act up when the card's electrical
properties change due to aging.
The N900 also might age, try a new card of roughly same type in N900 and see
what results you get.

/j

--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
(alas the above page got scrapped due to resignation(!!), so here some
supplementary links:)
http://www.georgedillon.com/web/html_email_is_evil.shtml
http://www.nonhtmlmail.org/campaign.html
http://www.georgedillon.com/web/html_email_is_evil_still.shtml
http://www.gerstbach.at/2004/ascii/ (German)
Re: n900 and sd card IO errors [ In reply to ]
joerg Reisenweber wrote at 2013-09-13 06:45 -0500:
> On Fri 13 September 2013 05:16:36 green wrote:
> > (For some reason, it was sometimes 'mmcblk0' instead of 'mmcblk1', but
> > either way the messages happened only when there is external SD card
> > IO.)
>
> mmc0 when you booted with uSD in, mmc1 when you inserted it after booting

I always shut down the device when inserting or removing the card, but
maybe I forgot once this time.

> > e2fsck (using N900 as reader) returns errors like this (line breaks
> > added again):
> >
> > Error reading block 1376258 (Attempt to read block from filesystem \
> > resulted in short read) while getting next inode from scan. Ignore \
> > error<y>?
> >
> > But everything works great with a SD card reader on a regular Linux
> > system.
> >
> > So I tried upgrading to kernel-power v52, tried the stock kernel, and
> > tried reflashing to stock everything. Same errors.
> >
> > It seems like from
> > <http://maemo.org/community/maemo-users/n900_microsd_card_i-o_errors_and_co
> > rruption/> and
> > <http://www.gossamer-threads.com/lists/maemo/users/65584#65591> that this
> > error happens with the higher speed class SD cards, but has been worked
> > around starting with v49 of kernel-power. Does anyone have any idea why I
> > suddenly began to experience these IO errors?
>
> Electrical properties of MMC interfaces are not all the same. A card that
> seems to work in one reader may fail in another.
> And a card that once worked fine may start to act up when the card's electrical
> properties change due to aging.
> The N900 also might age, try a new card of roughly same type in N900 and see
> what results you get.

Back to the reliability of floppy disks. Maybe the N810 and N900 both
have poor quality readers. Until now, I have been able to recover
from problems with fsck and have assumed poor quality SD cards. But I
have not had any card reader other than via the N810 or N900. Note
that I always purchase cards of reputable brands from reputable
sellers. In this case, SanDisk from Radio Shack (if Radio Shack can
be considered reputable anymore).
Re: n900 and sd card IO errors [ In reply to ]
joerg Reisenweber wrote at 2013-09-13 06:45 -0500:
> Electrical properties of MMC interfaces are not all the same. A card that
> seems to work in one reader may fail in another.
> And a card that once worked fine may start to act up when the card's electrical
> properties change due to aging.
> The N900 also might age, try a new card of roughly same type in N900 and see
> what results you get.

I went back to an older RiData 16GB card, and it is working fine for
now. However, I experience filesystem corruption multiple times with
that card in the N810. Also, the SanDisk 32GB works fine in *other*
readers. Apparently, SD cards are inherently unreliable.
Re: n900 and sd card IO errors [ In reply to ]
On Thu Sep 26 17:18:32 2013 green <greenfreedom10@gmail.com> wrote:
> joerg Reisenweber wrote at 2013-09-13 06:45 -0500:
> > Electrical properties of MMC interfaces are not all the same. A card
> > that  seems to work in one reader may fail in another.
> > And a card that once worked fine may start to act up when the card's
> > electrical  properties change due to aging.
> > The N900 also might age, try a new card of roughly same type in N900
> > and see  what results you get.
>
> I went back to an older RiData 16GB card, and it is working fine for
> now.  However, I experience filesystem corruption multiple times with
> that card in the N810.  Also, the SanDisk 32GB works fine in *other*
> readers.  Apparently, SD cards are inherently unreliable.

Because opening back cover on n900 automatically disconnect sd card slot (which means that kernel cannot flush buffers back to card), filesystem on sd card is always corrupted.

So correct solution before opening back cover on n900 is to call sync and umount - to be sure that filesystem is consistent.

--
Pali Rohár
pali.rohar@gmail.com

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: n900 and sd card IO errors [ In reply to ]
Pali Rohár wrote at 2013-09-26 10:44 -0500:
> On Thu Sep 26 17:18:32 2013 green <greenfreedom10@gmail.com> wrote:
> > joerg Reisenweber wrote at 2013-09-13 06:45 -0500:
> > > Electrical properties of MMC interfaces are not all the same. A card
> > > that seems to work in one reader may fail in another.
> > > And a card that once worked fine may start to act up when the card's
> > > electrical properties change due to aging.
> > > The N900 also might age, try a new card of roughly same type in N900
> > > and see what results you get.
> >
> > I went back to an older RiData 16GB card, and it is working fine for
> > now. However, I experience filesystem corruption multiple times with
> > that card in the N810. Also, the SanDisk 32GB works fine in *other*
> > readers. Apparently, SD cards are inherently unreliable.
>
> Because opening back cover on n900 automatically disconnect sd card
> slot (which means that kernel cannot flush buffers back to card),
> filesystem on sd card is always corrupted.

1. Are you sure it does not initiate a filesystem umount?

2. I do not open the cover until the unit is *off* anyway.

3. An ext3/4 filesystem (with a journal!) is not "corrupted" when not
cleanly unmounted.

4. I have disabled automatic mounting of the SD card via
`/etc/default/osso-mmc-blacklist.sh` and run fsck before each mount
(with a custom script).
Re: n900 and sd card IO errors [ In reply to ]
On Thu Sep 26 20:31:17 2013 green <greenfreedom10@gmail.com> wrote:
> Pali Rohár wrote at 2013-09-26 10:44 -0500:
> > On Thu Sep 26 17:18:32 2013 green <greenfreedom10@gmail.com> wrote:
> > > joerg Reisenweber wrote at 2013-09-13 06:45 -0500:
> > > > Electrical properties of MMC interfaces are not all the same. A
> > > > card that seems to work in one reader may fail in another.
> > > > And a card that once worked fine may start to act up when the
> > > > card's electrical properties change due to aging.
> > > > The N900 also might age, try a new card of roughly same type in
> > > > N900 and see what results you get.
> > >
> > > I went back to an older RiData 16GB card, and it is working fine for
> > > now.  However, I experience filesystem corruption multiple times with
> > > that card in the N810.  Also, the SanDisk 32GB works fine in *other*
> > > readers.  Apparently, SD cards are inherently unreliable.
> >
> > Because opening back cover on n900 automatically disconnect sd card
> > slot (which means that kernel cannot flush buffers back to card),
> > filesystem on sd card is always corrupted.
>
> 1. Are you sure it does not initiate a filesystem umount?
>

Yes, already looked into kernel code and tried to at least auto remount readonly. But I was not able to patch kernel to do that.

Umount is called *after* cover is opened (by ke-recv).

> 2. I do not open the cover until the unit is *off* anyway.
>

But clean umount is still needed.

> 3. An ext3/4 filesystem (with a journal!) is not "corrupted" when not
>      cleanly unmounted.
>

Yes, reason why I'am using ext4. But lot of people have Fat32.

> 4. I have disabled automatic mounting of the SD card via
>      `/etc/default/osso-mmc-blacklist.sh` and run fsck before each mount
>      (with a custom script).

Calling fsck before every mount is also already implemented in cssu-devel. This is reason why we need it.

--
Pali Rohár
pali.rohar@gmail.com

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users