Page 1 of 1

What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 9:54 am
by hary
Hi.

I was suspecting my Raspberry Pi4 to strangely/randomly reboot so I've been investigating and found some different command to find out.
I've been able to find command line to show that it was actually rebooting, but I'm not able to find the cause.

Here are some of the command I've used, showing that it has actually rebooted during night, at about 6 Oclock in the morning for no obvious reason. It's power supply is on a 24V battery with a DC/DC 24V/5V buck converter that has never failed under load. At 6 in the morning, the Pi was supposed to be idle, so not under high load (has to be checked to be sure).

Code: Select all

pi@raspberrypi:~ $ uptime
 10:47:42 up  4:44,  3 users,  load average: 0,50, 0,94, 1,35
pi@raspberrypi:~ $ last reboot | head -1
reboot   system boot  4.19.75-v7l+     Thu Jan  1 01:00   still running
pi@raspberrypi:~ $ last -x|grep shutdown | head -1
shutdown system down  4.19.75-v7l+     Sat Nov 30 17:18 - 01:00 (-18230+16:18)
pi@raspberrypi:~ $ who -b
         démarrage système 1970-01-01 01:00
As you can see, the following command

Code: Select all

pi@raspberrypi:~ $ last reboot | head -1
reboot   system boot  4.19.75-v7l+     Thu Jan  1 01:00   still running
doesn't send back a coherent response. It seems to be the first EPOC time .... might be of any means for experienced people here ?

If one has any more advices ti help and find what cause the reboot ?

Re: What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 10:03 am
by DougieLawson
The last command doesn't work on a systemd system.

Also, the system clock doesn't get set correctly until the network is connected. At boot up it will always start at 1st Jan 1970, then fake-hwclock updates it to 17 minutes past the last hour recorded, then timesysncd sets it right when the network connects.

Re: What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 10:19 am
by hary
Mmmm !

And any way to find the cause of the reboot ? That might be related to my SDcard problem (SDcard don't like to crash when writing).

Re: What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 10:36 am
by DougieLawson
Random reboots are usually due to a bad power supply.

What's in /var/log/syslog /var/log/messages /var/log/daemon.log /var/log/kern.log?

Re: What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 11:17 am
by hary
At the link https://www.dropbox.com/sh/6h3nnqbwm5oc ... Yb-0a?dl=0, you should get all what you asked for.

I don't know how to read those.
We stopped using the Pi yesterday evening at about 21:30.
I can see something has happened at 1:17, then at 5:59 this morning but unfortunately, I'm far to understand a tiny bit of all theses informations !

Re: What cause my pi4 to strangely reboot ?

Posted: Sat Dec 07, 2019 4:31 pm
by renice123
As far as I understand, your logs report problems with the sd card. On the links below there is a description of a similar problem, is this an old Linux problem that suddenly suddenly “appeared” on Buster?
https://www.raspberrypi.org/forums/view ... p?t=123261
Here they write about the same https://github.com/raspberrypi/linux/issues/2802
As far as I know, this is a widespread problem for memory cards, you can read here
https://askubuntu.com/questions/1151761 ... no-sd-card
https://forums.xilinx.com/t5/Embedded-L ... d-p/731734
And as I understand it, this is not only a raspberry problem, but a problem including the controllers of some cards and drivers. I don’t know the solutions (at least for Raspberries), I think it’s easier to buy a reliable memory card from well-known manufacturers than to mess with settings and images for several days.
What is your memory card?

Re: What cause my pi4 to strangely reboot ?

Posted: Sun Dec 08, 2019 10:32 am
by hary
Thanks for your response.

I'm using Samsung EVO+ 32 GB SDcard but I wonder if they're genuine !

Re: What cause my pi4 to strangely reboot ?

Posted: Sun Dec 08, 2019 12:11 pm
by renice123
I must disappoint you, it was about Samsung EVO + cards that were reported as problematic
 in some forums. I know these are popular cards from Raspberry owners, but alas, such messages are coming.
I quote from the link:
"Interestingly this only occurs with a 64gb Samsung EVO microSD card. The card passes read-write tests and I haven't had and issues with it in other devices so I don't believe that there is anything wrong with it. I cloned the contents to another cheap 64gb microSD card and that one works perfectly with no errors »
https://github.com/raspberrypi/linux/issues/2802
I do not know if it will help if you switch to memory cards of another company
And I don’t know the reasons why Samsung memory cards suddenly started to cause such an error.
Some people believe that the error is associated with an unusual Samsung memory card controller - including due to the algorithm for working with erroneous sectors

Re: What cause my pi4 to strangely reboot ?

Posted: Sun Dec 08, 2019 1:09 pm
by hary
Well I've just got a new Samsung EVO+ 32 GB !

Despite it' already burned with the last buster, I didn't try it yet.

Thanks you for your help, indeed.

At least I know the direction to follow if I still face the problem, .... I'll get another SDcard brand.

Re: What cause my pi4 to strangely reboot ?

Posted: Mon Dec 09, 2019 6:08 am
by hary
@Renice

May I know from what information and what logfile you can see it has rebooted and the cause of the problem is the SDcard ?

Re: What cause my pi4 to strangely reboot ?

Posted: Mon Dec 09, 2019 7:47 am
by renice123
Good day. I looked at the data in your kern.log file
Namely the following lines
mmc0: Timeout waiting for hardware interrupt. (entry dated December 1)
You have a lot of these notes, which surprised me. Then I looked in Google for a message about the problem, I found that the problem is common.
By the way, your last record of the problem is still the same
Dec 7 10:22:10 raspberrypi kernel: [15538.096792] mmc0: Timeout waiting for hardware interrupt.
I concluded that the problem with the card (given that it is a bootable card) also affects the restart of the computer. But this is a “logical conclusion” based on messages on the Internet.
It would be interesting to deal with this error.
For example, see how your computer will behave on the same problem card, but with a different operating system. Because my Buster works worse with some programs than other OSs. Or see what happens if you change the settings in config.txt
So far I know that problems with memory cards are very critical for the fourth version of Raspberry, they started at the very beginning, when the “32 Gb memory card error” occurred.
https://www.raspberrypi.org/forums/view ... 8&t=248968
 Then it was fixed, there were error messages "green death light" related (as reported on the forum here) with memory cards in some cases. https://www.raspberrypi.org/forums/view ... 8&t=250183
So I think studying the issue of memory cards might be useful to all of us.
I also know that Buster has problems leading to hardware failures.
This is normal for a young operating system, but it is annoying.
I have an idea that the problems of memory cards are due to the fact that in the fourth version, Raspberries changed the mechanism for working with memory cards. Including, as far as I remember from the messages of RPI development engineers, the option in config.txt clock speed for memory cards disappeared.
Unfortunately, I personally can’t verify this at all, because I only have old primitive Sandisk cards that work well. But perhaps in more advanced modern cards from Samsung, this problem manifests itself. Or is it because Samsung’s memory cards are often faked.
Also on forums they sometimes write that Samsung cards have a “special” controller.
I think the following can be done if there is interest in experiments.
https://www.raspberrypi.org/forums/view ... 9#p1576919
Perhaps if you tried to put a different version of the operating system on the problem card (I did this when I had hardware problems with the sound card in Buster), we could also conclude that the Buster itself is not the source of the error .

PS These are just my thoughts, and I cannot guarantee that I am going the right way.

Re: What cause my pi4 to strangely reboot ?

Posted: Thu Dec 12, 2019 7:59 pm
by hary
These last days, I finally burned BUSTER on my brand new 32Go EVO+ SAMSUNG uSDcard with BalenaEtcher, then inserted it in a PI3, ran it for 1 or 2 days, then updated/upgrading it on the PI3 and everything seems to work ok till today.

The only point is that I had to burn it twice, but I might have done something wrong the first time as I copied the config.txt file from the working Sandisk uSDcard onto the 32Go SAMSUNG to get every things already settled up . That might be no a right thing to do.
So I reburned it, and put it with only ssh file added to /boot and some minor modification to config.txt to get the proper screen output working.

I wonder if I take the chance to run that SAMSUNG 32Go EVO+ uSDcard on my PI4 ?

Re: What cause my pi4 to strangely reboot ?

Posted: Wed Jan 01, 2020 3:51 am
by HawaiianPi
hary wrote:
Thu Dec 12, 2019 7:59 pm
These last days, I finally burned BUSTER on my brand new 32Go EVO+ SAMSUNG uSDcard
Is it actually an EVO+ or an EVO Plus (word vs +)? Because the "EVO+" was replaced by the "EVO Plus" a couple of years ago, so if you bought a brand new EVO+ it may be a fake. If it is genuine, the + is better than the Plus (however, it should work, since EVO+ cards work on my Pi4).

Picture of older EVO+ and newer EVO Plus.
SSEVOPlus.jpg
SSEVOPlus.jpg (38.53 KiB) Viewed 468 times


Check the back of your card to see where it was made. If it says Korea, it's a fake. Yes, I know Samsung is a Korean company, but their SD cards are made in the Philippines, so this is an easy way to spot a fake. Also, the back of the card should be black, but the edges should be white.