g1itcher
Posts: 8
Joined: Wed Feb 04, 2015 9:39 pm

Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 12:20 pm

I've had two projects now die because *something* in the image has failed.

First it was the wifi suddenly refused to connect to anything (RPi 1), dongle worked fine in another device, but the SD card didn't work when moved across.

Second project on a RPi 2 failed recently; the bluetooth service crashes when doing anything with ble HID devices. SD card moved to another RPi 2 and can see the same issue.

Both of these worked fine for a few months before dying. There's nothing shared between them except the fact they're on RPis. Neither projects wrote to the SD card very often if at all (not as a result of my code anyway).

Is this common? Should I make a practice of backing up all my RPi project SD cards and just expect to have to reimage them every few months?

User avatar
B.Goode
Posts: 8617
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 12:36 pm

"Software doesn't rot."
That's something a mentor told me some decades ago. It is still true.

No, the image doesn't fail, slowly or otherwise.

But no-one can know under what circumstances you use or modify the working Operating System created from that image. It is certainly possible to make inappropriate and possibly fatal changes to the configuration of your system, either deliberately or by accident.

So yes, if you value the time and effort you have put into your configuration and projects, taking a backup is a good idea. Also check that the method of backing up and restoring actually works!

scotty101
Posts: 3723
Joined: Fri Jun 08, 2012 6:03 pm

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 12:42 pm

I've been running a Raspbian image (not on the internet) since the Pi was released.
Depends how you use and abuse your Pi.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 12:46 pm

My experience, FWIW, is that there's no problems with the images or the SD cards, but there is a "fading" effect on the Pi hardware itself (including the power supply).

Usually, a reboot fixes it - so there's no real cause for alarm.

BTW, I've seen this effect on some machines, but not all. Like many other forum participants, I've had uptimes of a year or two on some Pis, with no "fading" effect.
If this post appears in the wrong forums category, my apologies.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 12:57 pm

Martin Frezman wrote:
Mon Oct 09, 2017 12:46 pm
My experience, FWIW, is that there's no problems with the images or the SD cards, but there is a "fading" effect on the Pi hardware itself (including the power supply).

Usually, a reboot fixes it - so there's no real cause for alarm.

BTW, I've seen this effect on some machines, but not all. Like many other forum participants, I've had uptimes of a year or two on some Pis, with no "fading" effect.
Rubbish. No such thing as a fading effect over time on the hardware. What you will be seeing is almost certainly a software bug. The Linux system is hugely complex, it will have bugs in it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 1:08 pm

Rubbish back at ya.

And I'm sure I'll get banned for posting this.
If this post appears in the wrong forums category, my apologies.

pcmanbob
Posts: 6968
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 1:23 pm

Having had several Pi's running 24/7 I have seen failures of running software, but its normally attributable to some external problem.

Power failures and even brownouts can cause SD card data corruption which would could cause program and even OS corruption, seen this myself when power was accidentally removed from Pi.

Another cause I came across was the SD card becoming full due to me forgetting to delete all the achieved data files my program was producing, again caused SD card corruption and OS failure.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

g1itcher
Posts: 8
Joined: Wed Feb 04, 2015 9:39 pm

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 2:28 pm

pcmanbob wrote:
Mon Oct 09, 2017 1:23 pm
Having had several Pi's running 24/7 I have seen failures of running software, but its normally attributable to some external problem.

Power failures and even brownouts can cause SD card data corruption which would could cause program and even OS corruption, seen this myself when power was accidentally removed from Pi.

Another cause I came across was the SD card becoming full due to me forgetting to delete all the achieved data files my program was producing, again caused SD card corruption and OS failure.
This seems to be the most likely issue. I know project 1 lost power a few times unexpectedly. perhaps the same happened to project 2. Wish I'd backed it all up as now I'm going to have to reinstall bluez 5.43 and that wasn't particularly fun the first time.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Is it common for RPi images to slowly fail?

Mon Oct 09, 2017 3:49 pm

SD cards are more frequently corrupting their contents than ordinary hard drives. They have an internal processor running background tasks like erasing unused flash pages for reuse. When there is a power fail, this can corrupt the contents of the sd card.

There are basically 2 methods to avoid this. Either, you provide a backup power supply like an ups that keeps the system running or shuts it down properly when there is a power fail, or you create a "read only" root file system.
When there is no writing to the sd card, there are no pages that need erasure for reuse.

Obviously, a "read only" root fs is not always possible and depends upon what you are using the pi 4. You have to ask yourself, is their anything on the home folder that I change often during normal use. If the answer is no, you can use "read only" You can use a hybrid system with a shared network drive for your storage purposes.

An advantage of read only is the fact you can backup the sd card over the network.
Since it's not altered by the OS, you can image the backup to another sd card and use it like the original.
I only recently succeeded in doing this using a nfs share.
fat32 is limited to 4GB / file, so most images won't fit on a fat32 partition. smb shares behaved strange.

A disadvantage of read only is when you forget to turn it off. You will notice that all the changes you made to the system are gone with the first reboot.

And, isn't taking backups a practice we all learned ? (Most of us the hard way...)

g1itcher
Posts: 8
Joined: Wed Feb 04, 2015 9:39 pm

Re: Is it common for RPi images to slowly fail?

Wed Oct 11, 2017 1:17 pm

obcd wrote:
Mon Oct 09, 2017 3:49 pm
And, isn't taking backups a practice we all learned ? (Most of us the hard way...)
This may be my hard way of learning.

Return to “Troubleshooting”