Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDCard corruption on RPI2 #397

Closed
NitroG42 opened this issue Mar 19, 2015 · 363 comments

Comments

@NitroG42
Copy link

commented Mar 19, 2015

Lots of people seems to be affected by an issue with sdcard.
I'm using a Samsung Evo 16 Gb micro SDCard, and using raspbian, I encounter every time corruption on the sd card.
It's easy to reproduce :

  • Get the raspbian image 2015_02_16 from the website
  • I dd it from my mac to the sd card (using sudo dd bs=1m if=2015-02-16-raspbian-wheezy.img of=/dev/rdisk4)
  • Boot the pi with the freshly installed micro sd card
  • Install Raspbian, and when I have the console, I do sudo touch /forcefsck
  • On next reboot, lots of error are found and it after few minutes, it ends by the screen dying

I need to check on my linux system (I'm at work) if I can fix the card at this step or not.
I flashed the raspbian img multiple times and it doesn't work.

It also can be reproduce just by making the RPI reboot multiple times through the terminal (using sudo reboot)

I have 3 of them so I hope it's just a firmware bug (I'll try with another one to be sure it' sno the sdcard itself)

Here's two threaeds that gathered this issue (without creating a post in here though :/ ) :
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=101183&p=703772&hilit=error+110#p703772
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=98935

One post is interesting :

I am using Transcend UHS-I 1U 16GB Class 10 i have tried 4 of this card and same error with all four, i have also tried with 3 different Rpi2 and i could reproduce this error on all of them.

If you want card info, I can give them but you need to tell what to run on which system, because I didn't find a way to print sdcard charateristics from Mac OS X.

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2015

@ghollingworth does have a Samsung EVO sdcard that he can provoke into corrupting data.
He's built an fpga based sdcard analyser that can produce a log of all commands and responses and he's caught an error coming back from the sdcard.
He's just got to work out what exactly it is the card is unhappy about and how to avoid it.

For now, Transcend and Samsung EVO cards are best avoided. Other cards don't seem to suffer in the same way.
We're pretty sure that a future kernel update will make these cards reliable again and we'll post here when there is something to test.

@NitroG42

This comment has been minimized.

Copy link
Author

commented Mar 19, 2015

Holy **** that was a freaking fast answer.
Thank you for the update, I'll wach the topic for future updates.

@lurch

This comment has been minimized.

Copy link

commented Mar 19, 2015

Duplicate of #372 ?

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

If your failure is 100% reproducible then it would be interesting to see, currently I'm having trouble reproducing the problem (only seen it twice in the last week) and it makes it very difficult to understand what's going wrong

Gordon

@NitroG42

This comment has been minimized.

Copy link
Author

commented Apr 2, 2015

In my first post, I explain how to reproduce it on my card. Basically, after a fresh install of Raspbian, I create a file ( sudo touch /forcefsck ) to run fsck on next boot, I reboot and then lots of errors are found (and it crashes in a very beautiful way).

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

My question is: is it 100% reproducible? Does it happen without fail every time you boot in this way?

@NitroG42

This comment has been minimized.

Copy link
Author

commented Apr 2, 2015

Well I tried 3 or 4 times in row (with a fresh install each time) at the time I created the issue.
I'll try again tonight if it does the same, but I didn't see a "no-error" install.

@CyrussM

This comment has been minimized.

Copy link

commented Apr 3, 2015

Hi,(and sry bad english) ;)
I have a Transcend UHS-I 1U 16GB Class 10, and a Sandisk 16GB. I have install raspbian image 2-3 weeks ago and it works fine 24/7. But after 1-2 sometimes 3 reboots the Rpi2 makes a lots of (filesystem) erros and can't boot up. Remove the power and the Rpi2 boot without errors. After this happen again and again i clone the System on the Transcend with dd to a Sandisk 16GB class 10. All problems a solve, reboots no problems anymore (with the same system only a clone/copy from one to another sd card).

@johalareewi

This comment has been minimized.

Copy link

commented Apr 10, 2015

I have RPi2 and Openelec and got similar problem with Kingston 32GB class 10.
After a successful install and setup, a reboot of the Pi2 failed with.

*** Error in mount_storage: mount_common: could not mount /dev/mmcblk0p2 ***

Starting debugging shell... type exit to quit

sh: can't access tty; job control turned off

Now using a different card.

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2015

Are you using NOOBS to install the software or an image?

Are you updating the image before rebooting?

Gordon

On 10/04/2015 15:08, "johalareewi" notifications@github.com wrote:

I have RPi2 and Openelec and got similar problem with Kingston 32GB class
10.
After a successful install and setup, a reboot of the Pi2 failed with.
*** Error in mount_storage: mount_common: could not mount /dev/mmcblk0p2


Starting debugging shell... type exit to quitsh: can't access tty; job
control turned off

Now using a different card.

Reply to this email directly or
view it on GitHub
#397 (comment)
.

@johalareewi

This comment has been minimized.

Copy link

commented Apr 12, 2015

Using an image. Openelec image (for RPi2) from http://openelec.tv/get-openelec
Write to Kingston 16GB class 10 U-1 card using win32diskimager.exe on Windows7
After initial Pi2 startup, Openelec goes through the set up.
I installed a few Kodi options then did a reboot and that is when the error message appeared.

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2015

Whats the minimal steps required to guarantee it will fail... Include versions of software and links do you actually need to install stuff or will it corrupt without this?

Thanks
Gordon

@moskichi

This comment has been minimized.

Copy link

commented Apr 13, 2015

The minimal steps are install official Openelec or Raspbian image on a Samsung evo 16 U-1, it doesnt matter the way you install it, and switch off the pi while writting on the sd.

I saw a posible solution in other forum, but I haven´t test it yet http://openelec.tv/forum/124-raspberry-pi/75281-openelec-5-0-3-still-corrupts-sd-card-on-pi2?start=15#132032

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2015

@moskichi Switching the Pi off while writing to the sdcard is expected to cause corruption (with any memory device on any platform). Always shut down before removing power.
We're interested here in repeatable causes of corruption that involve shutting down cleanly.

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2015

@NitroG42
I wonder if you could test this kernel: https://dl.dropboxusercontent.com/u/3669512/temp/kernel7.img
By default it should be the same as the current "rpi-update" kernel, but supports some debug options that can be enabled through cmdline.txt.
Can you add to cmdline.txt

bcm2835_mmc.mmc_debug=0x1fff

You should see: "mmc_debug:1fff" and "Forcing PIO mode" in dmesg log, and see a reduction in performance. I'd like to know if you still see corruption.

@marks5459

This comment has been minimized.

Copy link

commented Apr 16, 2015

integral ultima pro 8gb class 10 upto 20mb/s are a brilliant card hardly have any issues been using for 2 years , was out of stock one time so bought 2 different batches from different suppliers of kingston cards ,one of the suppliers was scan computers in bolton so not like they was clone cards , and had almost everyone back over 3months and 50% of them cant be recognised by any device i put them in

@Cy4n1d3

This comment has been minimized.

Copy link

commented Apr 17, 2015

I've bought a 16GB Samsung Evo MicSD when I first got my RPi2 (was still running my good old RPi1 /w normal SD) and experienced the same issues as NitroG42 and johalareewi - after a certain (few, 1 to 3 were sufficient) amount of reboots, the system wouldn't boot up any longer due to mounting errors.

I was able to reproduce the issue pretty much reliably any time back then: install an image (doesn't matter if I used a fresh OE image or my 'old' backuped RPi1 image with RPi2 kernel replacing the Pi1 kernel), do the usual setup stuff like config, addon installations, reboot. I even tried manual 'sync'ing and rebooting over SSH to be safe but after one to three reboots I encountered corruption anyways. As long as the Pi stayed powered on I was able to watch movies, tv shows, youtube and amazon prime without a hitch though... problems arose after the nightly power down or the aforementioned reboots.
Didn't matter if I just did a fresh install from image and simply rebooted a few times afterwards or if I did a fresh install and updated to Milhouse's testbuilds using the tar-file - sooner or later I ended up with a corrupted SD card. I was in fact even backing up the whole system to an USB hard drive before rebooting due to the sheer reliability of system corruption occuring ;)
After the dreaded card corruption I would then restore my backup which brought the system back to work until the next (or the one following that..) reboot.

I fixed the problem for now by buying a fresh Sandisk card which works without a sign of any flaws until today... got nearly mad at my RPi2 until I tried a 64GB Sandisk MicSD which worked flawlessly right from the first image install. At first I thought it might be power related but after testing 4 different power adapters (Nexus 10, Galaxy S5, generic 5V 2A adapter and a known brand adapter from a local electronics store) I kinda ruled that one out.

If there's anything I can do to maybe help debugging this one please don't hesitate to ask. I'd gladly use the Samsung Evo for my Pi, as it shows nearly doubled 4k writes in comparison to the Sandisk while retaining good 4k reads - I'd really like to run some real world usage scenario performance comparisons on the RPi2 using those cards :)

@ernstblaauw

This comment has been minimized.

Copy link

commented Apr 17, 2015

Hi Cy4n1d3 ,

If I understand correctly, you can help by testing the kernel that popcornmix posted in this thread or that is posted on OpenELEC's forum: http://openelec.tv/forum/124-raspberry-pi/75281-openelec-5-0-3-still-corrupts-sd-card-on-pi2?start=210#137875

I hope to test this kernel this weekend.

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2015

Yes, if anyone who is suffering corruption issues can test the kernel linked earlier, or try the OpenELEC test build, that would be very helpful.

@Cy4n1d3

This comment has been minimized.

Copy link

commented Apr 17, 2015

I'll try and see if I can still reproduce the error tomorrow.

@AlecEdworthy

This comment has been minimized.

Copy link

commented Apr 17, 2015

For what it's worth I've installed the patched version of OpenElec 5.0.8 with bcm2835_mmc.mmc_debug=0x1fff set and have had the RasPi 2 go through 17 reboots (remotely triggered using SSH and a loop) without any issues (after 17 I stopped it because I thought that wasn't bad at all and wanted to get on with something else). I have a Transcend 16GB card (described as "Transcend Ultimate 16GB Micro SD (SDHC) Card - Class 10" at purchase, useful IDs from it are man:0x000074 oem:0x4a45 name:USD hwrev:0x0 fwrev:0x2) which previously would corrupt and refuse to boot after 3 or so boot ups (sometimes shutting it down overnight, others just shutting it down long enough to move the PSU to another socket).

OpenELEC:~ # cat /flash/cmdline.txt
boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet bcm2835_mmc.mmc_debug=0x1fff
OpenELEC:~ # dmesg | grep mmc-bcm
[    1.273284] mmc-bcm2835 3f300000.mmc: mmc_debug:1fff
[    1.273295] mmc-bcm2835 3f300000.mmc: Forcing PIO mode
OpenELEC:~ # 

Tomorrow or Sunday I'll disable the debug option and send it back through some reboots and see how many I get before corruption occurs...

Thank you to everyone who is working to fix this! :)

Alec

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2015

If you are happy with
bcm2835_mmc.mmc_debug=0x1fff
Then I'd be interested if
bcm2835_mmc.mmc_debug=0xfff
is also good.

@AlecEdworthy

This comment has been minimized.

Copy link

commented Apr 17, 2015

Sadly I am not happy with bcm2835_mmc.mmc_debug=0xfff as I got four reboots before the RasPi froze at the initial OpenElec screen. Another power cycle and I get dropped to the debugging shell and an fsck is needed to fix it (lots of things it had to fix).

Don't get me wrong, it could be pure luck that 17 reboots passed without issue with 0x1fff and the 18th might have killed it just the same, but 17 compared to 4 is a big difference!

Since switching back to 0x1fff I have just survived a further 10 reboots without issue. Now bed beckons (early start in the morning). If there's any further testing you would like doing then let me know, not sure I'll be able to do any until Sunday now but fire away nevertheless and I'll do my best to oblige.

@ernstblaauw

This comment has been minimized.

Copy link

commented Apr 18, 2015

Hi AlecEdworthy, do you got your script to remotely reboot the RPi2 for me? That would save me a lot of time. Thanks!

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2015

Okay if bcm2835_mmc.mmc_debug=0xfff doesn't work, can you confirm if bcm2835_mmc.mmc_debug=0x1000 is okay.

@Cy4n1d3

This comment has been minimized.

Copy link

commented Apr 18, 2015

I can still confirm the corruption issues I encountered when I first tried the Samsung EVO card.

Results so far:

  • no cmdline: corrupted file system after first reboot, didn't even install any addons or stuff like that

OpenELEC:/var/log # dmesg | grep -i mmc-bcm2835 [ 1.421993] mmc-bcm2835 3f300000.mmc: mmc_debug:1fff [ 1.425168] mmc-bcm2835 3f300000.mmc: Forcing PIO mode

  • no corruption after 10 reboots

OpenELEC:~ # dmesg | grep -i mmc-bcm2835 [ 1.301944] mmc-bcm2835 3f300000.mmc: mmc_debug:fff [ 1.301956] mmc-bcm2835 3f300000.mmc: DMA channels allocated

  • corrupted after the 4th reboot

OpenELEC:~ # dmesg | grep -i mmc-bcm2835 [ 1.301936] mmc-bcm2835 3f300000.mmc: mmc_debug:1000 [ 1.301947] mmc-bcm2835 3f300000.mmc: Forcing PIO mode

  • system froze after first reboot while displaying CEC Adapter notification (so different behaviour then before, where corruption did happen / was noticed while booting where it got stuck then), power cycling brought the system back through a second and third reboot without subsequent system freezes. I was unable to reproduce the freeze until the sixth reboot, where it got stuck while booting. Another hard power cycle however brought the system back up and allowed further reboots.
    I did 10 reboots here aswell without encountering corruption issues - just a few freezes it seems.

So 1fff seems best so far, If someone is willing to share a reboot loop script I will put those modes to further testing.

If you need further information or have more precise instructions please don't hesitate to ask @popcornmix !

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2015

For automatic rebooting (or running other command) with raspbian,
sudo nano /etc/rc.local
and add reboot just before the exit.

For openelec I would suggest looking here: http://wiki.openelec.tv/index.php/Autostart.sh

@ernstblaauw

This comment has been minimized.

Copy link

commented Apr 18, 2015

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2015

@ernstblaauw Can you run the script from a linux machine (which could be another pi)? That's a little easier than from windows.

@DrCord

This comment has been minimized.

Copy link

commented May 4, 2016

I just got this happening on a completely new samsung SDHC 32GB class 10 card.

@lylesvendsen

This comment has been minimized.

Copy link

commented May 15, 2016

I am able to produce this consistently on a RPI3 and Samsung 16 & 64gb mSD cards by trying to use NPM to install new node red nodes and they fail. GPIO Node for example ($sudo npm install node-red-contrib-gpio or $sudo npm install node-red-contrib-mpr121) I hope this helps debug this. I'm downloading the 2016-05-10 build of Raspbian, I hope it fixes the issue.

@pelwell

This comment has been minimized.

Copy link
Contributor

commented May 15, 2016

The Kingston SDC10G2/16GB cards seem to have a controller fault that makes the ERASE operation both slow and hazardous. The ext4 filesystem will attempt to use ERASE on nodes as they are deleted, and this can lead to corruption. The rpi-4.4.y tree contains a patch that disables erase on such cards (name="SD16G", manfid=0x41, oemid=0x3432") to improve performance and stop the corruption; a kernel including this patch is now available via rpi-update.

If you have a card that seems to have the advertised capacity (passes h2testw, etc.) but gets corrupted during an update then please post your card details here, as found using:

grep . /sys/class/mmc_host/mmc0/mmc0:*/* 2>/dev/null

For example, my failing card returns:

cid:4134325344313647307e3002af0102b5
csd:400e005a5b59000073677f800a400027
date:02/2016
erase_size:512
fwrev:0x0
hwrev:0x3
manfid:0x000041
name:SD16G
oemid:0x3432
preferred_erase_size:12582912
scr:0235800300000000
serial:0x7e3002af
type:SD

I imagine I'll need to enable the same "quirk" for additional capacities of the Kingston cards - it sounds like 32GB is affected, so perhaps "SD32G" - but other manufacturers could have the same controller.

popcornmix added a commit that referenced this issue May 19, 2016
kernel: bump to 4.4.11
kernel: mmc: Apply QUIRK_BROKEN_ERASE to other capacities
See: #397 (comment)

kernel: New driver for the AudioInjector audio input and output card
See: raspberrypi/linux#1476
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue May 19, 2016
kernel: bump to 4.4.11
kernel: mmc: Apply QUIRK_BROKEN_ERASE to other capacities
See: raspberrypi/firmware#397 (comment)

kernel: New driver for the AudioInjector audio input and output card
See: raspberrypi/linux#1476
@pelwell

This comment has been minimized.

Copy link
Contributor

commented May 19, 2016

There is a new rpi-update release that adds a quirk to disable ERASE commands on cards with:

name:SD16G or SD32G or SD64G
manfid:0x00000041
oemid:0x3432
@JocPelletier

This comment has been minimized.

Copy link

commented May 19, 2016

Thanks for the update, I'll try that now on a Pi 2 using a 32G Kingston:

uname -a
Linux raspberry 4.4.11-v7+ #887 SMP Thu May 19 16:24:03 BST 2016 armv7l GNU/Linux
cid:41343253443332473000238f1700fa05
csd:400e00325b590000ef1f7f800a4000cf
date:10/2015
erase_size:512
fwrev:0x0
hwrev:0x3
manfid:0x000041
name:SD32G
oemid:0x3432
preferred_erase_size:4194304
scr:0235800201000000
serial:0x00238f17
type:SD
uevent:DRIVER=mmcblk
uevent:MMC_TYPE=SD
uevent:MMC_NAME=SD32G
uevent:MODALIAS=mmc:block

But we also got corruptions on Sandisk Ultra 32G cards, if it's the same issue you should add:

cid:035344534c3332478043d82f1500f8e5
csd:400e00325b590000e6487f800a404095
date:08/2015
erase_size:512
fwrev:0x0
hwrev:0x8
manfid:0x000003
name:SL32G
oemid:0x5344
preferred_erase_size:4194304
scr:0235800300000000
serial:0x43d82f15
type:SD
uevent:DRIVER=mmcblk
uevent:MMC_TYPE=SD
uevent:MMC_NAME=SL32G
uevent:MODALIAS=mmc:block
@TheSin-

This comment has been minimized.

Copy link

commented May 19, 2016

I've been following this issue, and although I have not had any issues with my SanDisk Ultra 8G or Kingston 8G. I'm just curious as to why limit the patch for ERASE? Why not just patch it for everything, is there a benefit to keeping it at all? Wouldn't it be safer to just patch it out if it's an SD period and only enable it for eMMC/USB? Again I haven't had any issues I'm just curious as the include list might be harder then an exclude list is all.

@pelwell

This comment has been minimized.

Copy link
Contributor

commented May 19, 2016

When it works, ERASE should be a performance boost because it reduces any subsequent write time. I don't think this is a Pi-specific problem, therefore it can't be so widespread otherwise ERASE would be disabled in the kernel for all SD cards, so for now I'd rather be cautious.

@TheSin-

This comment has been minimized.

Copy link

commented May 19, 2016

makes sense, just thought I'd ask I know you guys work very hard on this and the last thing you want is a list with hundreds of cards on it that you have to maintain ;) So thought I'd bring it up to see if it made sense.

@pelwell

This comment has been minimized.

Copy link
Contributor

commented May 19, 2016

It's not a bad idea, just one I'd rather keep up my sleeve for now.

@JocPelletier

This comment has been minimized.

Copy link

commented May 27, 2016

Still have corruption issue with 4.4.11-v7+ and Kingston SD32G after 1 week using my test program.

@rookierks

This comment has been minimized.

Copy link

commented Aug 7, 2016

I've been running archlinux arm for a long time now and I've been using the following card with a Raspberry Pi Model B Rev 2 and I haven't seen any problems.

cid:4134325344333247300051861800e519
csd:400e00325b590000ef177f800a400059
date:05/2014
erase_size:512
fwrev:0x0
hwrev:0x3
manfid:0x000041
name:SD32G
oemid:0x3432
preferred_erase_size:4194304
scr:0235800001000000
serial:0x00518618
type:SD
uevent:DRIVER=mmcblk
uevent:MMC_TYPE=SD
uevent:MMC_NAME=SD32G
uevent:MODALIAS=mmc:block

I guess the difference might be that I've been using f2fs for the root fs for as long as it has been supported in the archlinux arm kernel. If I recall correctly mmc erase support was introduced after that.

As pelwell says, if mmc erase works it should be used as it helps increase write speed by avoiding an erase before a write and might also help with sd card longevity.

@SigiK

This comment has been minimized.

Copy link

commented Nov 9, 2016

@JocPelletier Could you please tell me what caused your corruptions of your SD-cards? I am having similar issues with Samsung MB-SS32SD, but dont know whats causing it.

@JocPelletier

This comment has been minimized.

Copy link

commented Nov 9, 2016

@SigiK We decided to stop using the RPi in our products because of this issue so I've not investigated further. I've sent a program to @pelwell that reproduce the issue without any reply/feedback so I'm not sure they used it. It seems to be "caused" by SQLite.

@SigiK

This comment has been minimized.

Copy link

commented Nov 9, 2016

@JocPelletier Thx for fast answer! Could it in your opionion have to do with mono and serial-communication (we are using RS485), because we are using both.

@JocPelletier

This comment has been minimized.

Copy link

commented Nov 9, 2016

@SigiK I don't think so, because we have 2 services running, one managing all RS485 communications and one running a webserver with data logging. We tried to disable the data-logging on some RPi and it seems to "fix" the corruption issue.

Also, my test program reproducing the issue is not using the RS485

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2016

@JocPelletier If you enable sqlite, does this give you 100% reliable corruption? I've seen this in the past and similarly put it down to something about SQLite hoping it would be fixed at some time in the future. When you say corruption, does this result in a non-booting system or just a system that needs to do a e2fsck at startup?

@JocPelletier

This comment has been minimized.

Copy link

commented Nov 9, 2016

@ghollingworth 99% Yes but it can take more than a week. But it can be NLog too because we are using it too. I've not tried to remove NLog in my test program that's why I can't say 100% yes.

By corruption I mean a non-booting system.

@SigiK

This comment has been minimized.

Copy link

commented Nov 9, 2016

@JocPelletier Thx for this useful information! We used swap before, which probably also corrupted SD-cards. Anyway, we didnt have such issues with smaller (4GB) SD-cards before (having swap and logging activated). In our case it seems to be a combination of SD-card type and heavy writes to SD-card.

@ghollingworth

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2016

When you say non-booting, how far does it get? Do you get:

  1. Nothing, no lights flashing etc
  2. Multicoloured splash screen
  3. Boot to kernel looking for filesystem but cannot find valid ext4 partition
  4. Found ext4 partition but failed e2fsck
  5. Tried to fix partition (using e2fsck) but failed and crashed...
@JocPelletier

This comment has been minimized.

Copy link

commented Nov 9, 2016

@ghollingworthI don't remember exactly, and I'm not sure it was always the same result, but it was not 1) or 2) it was kernel panic.

@greenoid

This comment has been minimized.

Copy link

commented Nov 10, 2016

@SigiK Yes "In our case it seems to be a combination of SD-card type and heavy writes to SD-card." This is true. SQLite ist not the cause, every process using many write operations will cause corruption over time. How long it'll take is a matter of SD-Card Model (actually hardware used for this model at the time of production) and RPi firmware version. This may take from 1 day to 3 months and longer. The RPi3 is able to boot without SD-Card and the RPi2 may boot from a read-only partition of a SD-Card and use an USB Stick oder harddrive.

@Ferroin

This comment has been minimized.

Copy link

commented Nov 10, 2016

It's worth noting that while SQLite isn't the direct cause, it and any other database files (including BerkDB, as well as many backends for most RDBMS software, and (rather significantly) systemd journal files) will tend to accelerate this process on many SD cards because they involve lots of internal rewrites, and most SD cards have really poorly designed FTL's that don't do a good job of wear-leveling.

@Ruffio

This comment has been minimized.

Copy link

commented Jan 7, 2017

@NitroG42 Can this issue be closed?

@NitroG42

This comment has been minimized.

Copy link
Author

commented Jan 7, 2017

Oh I didn't play with my Raspberry for a long time but since user don't seems to have the issue anymore (it was working for me after the first patch I think), it can be closed !
If anybody get this issue, don't be afraid to open another (I think)

@NitroG42 NitroG42 closed this Jan 7, 2017

neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: Bump to 3.18.12
kernel: alsa: Make interrupted close paths quieter
See: raspberrypi/linux#931

kernel: bcm2835-mmc: Add range of debug options for slowing things down
kernel: bcm2835-mmc: Default to disabling MMC_QUIRK_BLK_NO_CMD23
kernel: bcm2708-dmaengine: Add debug option for setting wait states
See: raspberrypi#397

firmware: arm_loader: Changes to support bcm2835_sdhost driver
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: Adding bcm2835-sdhost driver, and an overlay to enable it
See: raspberrypi#397

kernel: bcm2835-sdhost: Adding overclocking option
kernel: bcm2835-mmc: Adding overclocking option
See: http://forum.kodi.tv/showthread.php?tid=224025&pid=2005396#pid2005396

kernel: config: Add CONFIG_CIFS_UPCALL
See: raspberrypi/linux#968

kernel: config: Add CONFIG_FB_SSD1307=m
See: raspberrypi/linux#969

firmware: di_adv: Fix memory leak of converted buffers
See: raspberrypi#429

firmware: arm_display: Fix initialisation of framebuffer struct when framebuffer base is passed in

firmware: hdmi: Tweak hdmi_mai_thresh for 192kHz audio
See: https://discourse.osmc.tv/t/rp2-multichannel-flac-playback/2627/28

firmware: vcsm: Update to header from kernel side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.