Author Topic: Corrupt filesystem  (Read 5922 times)

howie_k (OP)

  • *
  • Posts: 154
Corrupt filesystem
« on: February 15, 2014, 08:27:22 pm »
Hi,

I have had my KS Zero since late October and have played on it in total of no more than 20 hours, spread across sessions of 30 mins or less, and have had to re-flash my Zero at least 6 times.

Is this a typical experience of other Zero users?

Example for today : Played Cave Story for 10 mins (loving it BTW), 10 mins of Free Doom, select Shut Down app icon, machine freezes.  I give it a minute, then hit reset button and filesytem is now corrupt.

All OPK's are on the internal SD.

I have already replaced the internal SD with a 64GB Sandisk Ultra Class 10 card as the supplied 16GB card would no longer re-flash, but I still get occasional crashes resulting in a corrupt filesystem (although not as frequent), or simply turn on after a successful shut-down and the filesystem is corrupt.

Could this be ;

a) Hardware issue (meaning I should attempt to return to Justin)
b) the dodgy SD card driver that I know is on the To-Do list of the Dev team
c) something else?

Just trying to work out if I should be returning the unit before the 1year factory warranty expires (as Justin got the units many months before shipping).

And advice would be much appreciated.

mth

  • *
  • Posts: 298
Re: Corrupt filesystem
« Reply #1 on: February 16, 2014, 05:15:13 am »
Neither the corruption nor the freeze at shutdown is expected behavior.

The problem with the SD driver is that it will hog the CPU, particularly when writing. So when you transfer a lot of data, you will notice that the Zero is less responsive until the write cache has been flushed. But it doesn't corrupt any data, that I'm aware of, and I've had a Zero since the earliest prototypes.

Since you already replaced the card, that is probably not the issue. You could log in with telnet or SSH and run the "dmesg" command, that will show the kernel log. If the hardware is misbehaving, there might be errors listed there.

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #2 on: February 16, 2014, 08:04:01 am »
Thanks mth, I will telnet in and look at the kernel log.

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #3 on: February 16, 2014, 10:11:47 am »
Well I turned on the unit this morning and it appears to boot up fine again - weird.

I ran "dmesg" which just shows the standard boot up log from the most this morning's boot.

I have pasted below and highlighted in bold the lines that may be a problem (or they may be totally expected) - please note I have a FAT32 card in the external slot;


[    0.748000] radio-rda5807 0-0011: Found FM radio receiver
[    0.776000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.780000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.788000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.792000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.816000] jz-msc jz-msc.0: JZ SD/MMC card driver registered
[    0.852000] jz-msc jz-msc.1: JZ SD/MMC card driver registered
[    0.856000] mmc0: SD Status: Invalid Allocation Unit size.
[    0.864000] mmc0: host does not support reading read-only switch. assuming wr                                                                                        ite-enable.
[    1.568000] mmc0: new high speed SDXC card at address 0007



[    1.688000] FAT-fs (mmcblk0p2): bogus number of reserved sectors
[    1.692000] FAT-fs (mmcblk0p2): Can't find a valid FAT filesystem
[    1.700000] SQUASHFS error: Can't find a SQUASHFS superblock on mmcblk0p2

[    1.744000] usb 1-1: new full-speed USB device number 2 using jz4740-ohci
[    1.788000] EXT4-fs (mmcblk0p2): recovery complete
[    1.792000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O                                                                                        pts: (null)
[    1.804000] FAT-fs (loop0): invalid media value (0x00)
[    1.808000] FAT-fs (loop0): Can't find a valid FAT filesystem
[    1.820000] mmc1: host does not support reading read-only switch. assuming wr                                                                                        ite-enable.
[    1.828000] mmc1: new high speed SDXC card at address e624





This entry could be because the shut down app crashed, hence the system could not unmount the external SD;

[    5.124000] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data                                                                                         may be corrupt. Please run fsck.

mth

  • *
  • Posts: 298
Re: Corrupt filesystem
« Reply #4 on: February 16, 2014, 12:07:56 pm »
I have pasted below and highlighted in bold the lines that may be a problem (or they may be totally expected) - please note I have a FAT32 card in the external slot;
Do the problems also occur if the external SD slot is empty?

[    0.776000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.780000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.788000] musb_bus_suspend 2457: trying to suspend as b_idle while active
[    0.792000] musb_bus_suspend 2457: trying to suspend as b_idle while active
This is not right. Was there anything in the USB connector when the unit booted? And if so, what is logged if you boot with an empty USB connector?

[    0.856000] mmc0: SD Status: Invalid Allocation Unit size.
This is abnormal indeed. Is it there again if you reboot the unit? I'm wondering if it is a consistent error or a random I/O error.

It could be related to the replacement SD card, although I don't get this message with a 64 GB card.

[    1.688000] FAT-fs (mmcblk0p2): bogus number of reserved sectors
[    1.692000] FAT-fs (mmcblk0p2): Can't find a valid FAT filesystem
[    1.700000] SQUASHFS error: Can't find a SQUASHFS superblock on mmcblk0p2

This part is expected: Linux will try every file system it has to autodetect the file system type. Since mmcblk0p2 is an ext4 partition, the FAT and Squashfs drivers will consider it invalid.

This entry could be because the shut down app crashed, hence the system could not unmount the external SD;

[    5.124000] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Yes, this is exactly what a FAT partition that wasn't unmounted properly looks like.

pcercuei

  • ***
  • Posts: 1429
    • My devblog
Re: Corrupt filesystem
« Reply #5 on: February 16, 2014, 01:19:10 pm »
[    1.688000] FAT-fs (mmcblk0p2): bogus number of reserved sectors
[    1.692000] FAT-fs (mmcblk0p2): Can't find a valid FAT filesystem
[    1.700000] SQUASHFS error: Can't find a SQUASHFS superblock on mmcblk0p2

This part is expected: Linux will try every file system it has to autodetect the file system type. Since mmcblk0p2 is an ext4 partition, the FAT and Squashfs drivers will consider it invalid.
Actually those messages are printed by the kernel because mininit tries to mount the system partition using every type of filesystem the kernel understands. We could add a kernel command line option to instruct the FS type, as we know that the system partition is FAT32 and that's not going to change.

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #6 on: February 16, 2014, 02:10:52 pm »
Hi,

Yep I had USB connected when booting.

I ended up just re-flashing my device again, and some of the dmesg logs are quite interesting - the online resizing failed.
Could I be unlucky with my 64GB internal card or could this be something else?  Note : USB was connected during this, as this log is directly after flashing completes.  Also, I have no external SD inserted.

[    1.684000] FAT-fs (mmcblk0p2): bogus number of reserved sectors
[    1.688000] FAT-fs (mmcblk0p2): Can't find a valid FAT filesystem
[    1.696000] SQUASHFS error: Can't find a SQUASHFS superblock on mmcblk0p2
[    1.740000] usb 1-1: new full-speed USB device number 2 using jz4740-ohci
[    1.744000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.756000] FAT-fs (loop0): invalid media value (0x00)
[    1.760000] FAT-fs (loop0): Can't find a valid FAT filesystem
[    1.920000] usb 1-1: not running at top speed; connect to a high speed hub
[    2.068000] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[    2.864000] EXT4-fs (mmcblk0p2): resizing filesystem from 37376 to 15368192 blocks
[   38.672000] jz-msc0: MSC_STAT_CRC, cmd=13
[   38.676000] jz-msc0: MSC_STAT_CRC, cmd=25
[   38.696000] jz-msc0: MSC_STAT_CRC, cmd=13
[   38.704000] jz-msc0: MSC_STAT_CRC, cmd=25
[   38.708000] mmcblk0: r/w command failed, status = 0x80000480
[   38.712000] end_request: I/O error, dev mmcblk0, sector 1347816
[   38.716000] jz-msc0: MSC_STAT_CRC, cmd=25
[   38.720000] jz-msc0: MSC_STAT_CRC, cmd=13
[   38.724000] jz-msc0: MSC_STAT_CRC, cmd=13
[   38.732000] jz-msc0: MSC_STAT_CRC, cmd=13
[   39.980000] jz-msc0: MSC_STAT_CRC, cmd=13
[   39.984000] jz-msc0: MSC_STAT_CRC, cmd=13
[   39.988000] jz-msc0: MSC_STAT_CRC, cmd=13
[   39.992000] jz-msc0: MSC_STAT_CRC, cmd=25
[   39.996000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.000000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.004000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.008000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.012000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.016000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.020000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.024000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.028000] end_request: I/O error, dev mmcblk0, sector 1347912
[   40.032000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.040000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.044000] end_request: I/O error, dev mmcblk0, sector 1347920
[   40.048000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.052000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.056000] end_request: I/O error, dev mmcblk0, sector 1347928
[   40.060000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.064000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.068000] end_request: I/O error, dev mmcblk0, sector 1347936
[   40.072000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.080000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.084000] end_request: I/O error, dev mmcblk0, sector 1347944
[   40.088000] jz-msc0: MSC_STAT_CRC, cmd=13
[   40.092000] mmcblk0: timed out sending r/w cmd command, card status 0xc0300198
[   40.096000] end_request: I/O error, dev mmcblk0, sector 1347952
[   40.104000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.112000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.116000] end_request: I/O error, dev mmcblk0, sector 1347960
[   40.120000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.128000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.132000] end_request: I/O error, dev mmcblk0, sector 1347968
[   40.136000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.144000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.148000] end_request: I/O error, dev mmcblk0, sector 1347976
[   40.152000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.156000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.160000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.164000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.168000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.176000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.180000] jz-msc0: MSC_STAT_CRC, cmd=25
[   40.188000] mmcblk0: r/w command failed, status = 0xc0000330
[   40.192000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.408000] jz-msc0: MMC/SD/SDIO CRC error, MMC_STAT 0x3046, cmd=25
[   41.412000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.416000] mmcblk0: error -145 sending stop command, original cmd response 0xc0000330, card status 0xc00003c0
[   41.420000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.424000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.428000] mmcblk0: timed out sending r/w cmd command, card status 0x400980
[   41.432000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.436000] jz-msc0: MMC/SD/SDIO CRC error, MMC_STAT 0x3046, cmd=25
[   41.440000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.448000] mmcblk0: error -145 sending stop command, original cmd response 0xc0000240, card status 0xc00003c0
[   41.452000] mmcblk0: r/w command failed, status = 0xc0000240
[   41.456000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.460000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.464000] mmcblk0: error -145 sending status command, retrying
[   41.468000] mmcblk0: error -145 sending status command, retrying
[   41.472000] mmcblk0: error -145 sending status command, aborting
[   41.480000] mmcblk0: timed out sending r/w cmd command, card status 0x400d00
[   41.508000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.512000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.516000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.520000] jz-msc0: MSC_STAT_CRC, cmd=13
[   41.524000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.532000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.536000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.544000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.548000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.556000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.560000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.568000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.572000] jz-msc0: MSC_STAT_CRC, cmd=25
[   41.580000] mmcblk0: r/w command failed, status = 0xc0000330
[   41.584000] jz-msc0: MSC_STAT_CRC, cmd=25
[   42.812000] mmcblk0: r/w command failed, status = 0xc0000330
[   42.816000] mmcblk0: error -145 sending status command, retrying
[   42.820000] jz-msc0: MSC_STAT_CRC, cmd=13
[   42.824000] mmcblk0: timed out sending r/w cmd command, card status 0xc03001d0
[   42.832000] mmcblk0: timed out sending r/w cmd command, card status 0x400d00
[   42.836000] mmcblk0: error -145 sending status command, retrying
[   42.840000] mmcblk0: error -145 sending status command, retrying
[   42.844000] mmcblk0: error -145 sending status command, aborting
[   42.848000] jz-msc0: MSC_STAT_CRC, cmd=25
[   42.852000] mmcblk0: r/w command failed, status = 0xc0300198
[   42.856000] mmcblk0: error -145 sending status command, retrying
[   42.860000] mmcblk0: error -145 sending status command, retrying
[   42.864000] mmcblk0: error -145 sending status command, aborting
[   42.868000] mmcblk0: error -145 sending status command, retrying
[   42.876000] mmcblk0: error -145 sending status command, retrying
[   42.880000] mmcblk0: error -145 sending status command, aborting
[   42.884000] mmcblk0: error -145 sending status command, retrying
[   42.888000] mmcblk0: error -145 sending status command, retrying
[   42.892000] mmcblk0: error -145 sending status command, aborting
[   42.896000] mmcblk0: error -145 sending status command, retrying
[   42.900000] jz-msc0: MSC_STAT_CRC, cmd=13
[   42.904000] mmcblk0: timed out sending r/w cmd command, card status 0xc01801d8
[   42.908000] jz-msc0: MSC_STAT_CRC, cmd=13
[   42.912000] mmcblk0: timed out sending r/w cmd command, card status 0xc01801d8
[   42.916000] jz-msc0: MSC_STAT_CRC, cmd=13
[   42.920000] mmcblk0: timed out sending r/w cmd command, card status 0x803003b0
[   42.924000] jz-msc0: MSC_STAT_CRC, cmd=13
[   42.928000] mmcblk0: timed out sending r/w cmd command, card status 0x400e80
[   42.932000] mmcblk0: timed out sending r/w cmd command, card status 0x400d00
[   42.936000] jz-msc0: MSC_STAT_CRC, cmd=25
[   42.944000] mmcblk0: r/w command failed, status = 0xc0000330
[   44.248000] EXT4-fs (mmcblk0p2): resized filesystem to 15368192
[   44.488000] udevd[69]: starting version 182
[   58.616000] jz4760fb_interrupt_handler, InFiFo0 underrun
[   58.616000] jz4760fb_interrupt_handler, InFiFo1 underrun
[   58.716000] Console: switching to colour dummy device 80x25
[   58.752000] input: OpenDingux mouse daemon as /devices/virtual/input/input3
[   59.276000] jz4760fb_interrupt_handler, InFiFo0 underrun
[   59.276000] jz4760fb_interrupt_handler, InFiFo1 underrun
[   59.384000] jz4760fb_interrupt_handler, InFiFo0 underrun
[   59.384000] jz4760fb_interrupt_handler, InFiFo1 underrun
[   88.512000] I2S: enter jz4770_i2s_hw_params, substream = playback
[   88.576000] I2S: enter jz4770_i2s_hw_params, substream = playback
[   88.588000] I2S: enter jz4770_i2s_trigger, substream = playback cmd = 1
[   88.588000] I2S: enter jz4770_snd_tx_ctrl, on = 1
[   88.680000] jz4760fb_interrupt_handler, InFiFo0 underrun
[   88.680000] jz4760fb_interrupt_handler, InFiFo1 underrun
[   93.944000] I2S: enter jz4770_i2s_trigger, substream = playback cmd = 0
[   93.944000] I2S: enter jz4770_snd_tx_ctrl, on = 0
[   94.076000] jz4760fb_interrupt_handler, InFiFo0 underrun

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #7 on: February 17, 2014, 07:17:34 pm »
Just bumping this to get an opinion on whether I should get another internal SD or if it may be a hardware issue?

glimmer

  • *
  • Posts: 119
Re: Corrupt filesystem
« Reply #8 on: February 18, 2014, 03:00:44 am »
Just bumping this to get an opinion on whether I should get another internal SD or if it may be a hardware issue?
Some SanDisk cards manufactured about a year ago had problems that caused them to detach from the SD bus on a depressingly regular basis. I just identified one that I had in use and exchanged it. SanDisk called the defective cards "a small number" and did not provide serial number ranges or other information you could use to identify them. Depending how recently you bought the card and from what source, you might want to test it under heavy load in other systems.

There's also a possibility that you simply have a defective SanDisk card. These things happen.

Finally, there's the problem of the "ghost shift."

EDIT: To be clear, I had a 64GB SanDisk "ultra" micro SD card that was affected.

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #9 on: February 18, 2014, 06:57:36 am »
@glimmer thanks for the advice, I only recently purchased the card from Amazon.

I will buy another brand card  today and see how I get on.

howie_k (OP)

  • *
  • Posts: 154
Corrupt filesystem
« Reply #10 on: February 21, 2014, 08:14:11 pm »
Hi,

So I tried with a brand new 16GB Class 10 card and whilst the flashing process to squirt the data to the Zero works, when the Zero boots up immediately afterwards and tries to do the online partition re-sizing it failed with timeouts/resource busy messages.

So I tried putting my original 16GB card back in to give that one another go, and the re-flashing did work, but before the on-line re-sizing it had this message;

Successfully wrote the new partition table

Re-reading the partition table...
BLKRRPART: Device or resource busy
sfdisk: The command to re-read the partition table failed.
Run partprobe( 8 ), kpartx( 8 ) or reboot your system now, before using mkfs

Are the above messages expected?

Then it went on to do the online partition re-sizing successfully.

After I did a re-boot with no USB lead attached (and also no external SD inserted), when I telnet into it and do a 'dmesg' it no longer has the entry : "[    0.856000] mmc0: SD Status: Invalid Allocation Unit size", so maybe for now all is well?

I will have to keep an eye on it over the next few days to see if it crashes again.

Thanks for all your help so far.
« Last Edit: February 22, 2014, 05:55:27 am by howie_k »

pcercuei

  • ***
  • Posts: 1429
    • My devblog
Re: Corrupt filesystem
« Reply #11 on: February 22, 2014, 08:39:08 am »
Is it an UHS card?

howie_k (OP)

  • *
  • Posts: 154
Corrupt filesystem
« Reply #12 on: February 22, 2014, 09:32:22 am »
It is a class 10 SDHC card, the original one that was supplied with the KS Zero.

Is there any guidance on cards that are compatible / not compatible with the Zero?
« Last Edit: February 22, 2014, 09:33:54 am by howie_k »

glimmer

  • *
  • Posts: 119
Re: Corrupt filesystem
« Reply #13 on: February 22, 2014, 10:07:36 pm »
It is a class 10 SDHC card, the original one that was supplied with the KS Zero.

Is there any guidance on cards that are compatible / not compatible with the Zero?
The SanDisk "Ultra" UHS-I / C10 cards are completely compatible, at least in the external slot. Internal slot is most probably the same story. Starting to sound like a manufacturing defect at some stage.

SanDisk is its own major memory manufacturer. Same for Samsung. Micron seems to sell some of its own flash product in microSD format. If any of these three are incompatible--especially the first two--with the Zero, then either there's a problem with a batch of product, like I mentioned before, or it's 99.99% certain to be the Zero.

howie_k (OP)

  • *
  • Posts: 154
Re: Corrupt filesystem
« Reply #14 on: February 22, 2014, 10:27:59 pm »
Thanks glimmer for the advice / info - it appears to be behaving ok at the moment, so will keep a close eye on it - loving Cave Story at the moment!

MightyJAK

  • **
  • Posts: 538
    • My tumblr
Re: Corrupt filesystem
« Reply #15 on: February 25, 2014, 03:46:40 am »
I don't know if this issue is related, but my Zero has also exhibited some odd behavior when booted with a USB cable attached:

<a href="https://web.archive.org/web/20190315145139/https://www.youtube.com/watch?v=zDtSyIHR2BI" target="_blank">https://www.youtube.com/watch?v=zDtSyIHR2BI</a>
My machines:
GBC,GBA,GBA SP,NDS,NGPC,Panasonic FZ-10 3DO,NES,Sega Nomad,Sega CDX w/Power Base Converter,PS1,PS2,PS3,Saturn,Dreamcast,PC (Win 98, XP, 7),Dingoo A320,Dingoo A330,Gemei A330,LetCool N350JP,PAP-GAMETA,GCW-Zero SE,Kyocera Rise,2DS,GP2X-F100,GPD G7,JXD 100,JXD A1000,JXD A3300,JXD F3000,JXD V5000,JXD S7300B,Hyperkin SupaBoy

Currently playing: Theatrhythm Final Fantasy Curtain Call (2DS)

masteries

  • *
  • Posts: 34
Re: Corrupt filesystem
« Reply #16 on: March 03, 2014, 09:58:29 pm »

Yes, mine runs very slow if I boot it with USB cable attached.

 

Post a new topic
Post a new topic