RPi freezing after a few days

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
TTS_JD
Posts: 5
Joined: Tue Sep 21, 2021 1:49 pm

RPi freezing after a few days

Post by TTS_JD »

Hello,

for some time my RPi stops working after a few days of proper operation. Log analysis shows that the system freezes, i.e. the logs are not continued, the screen displays the view that was recently displayed (touch does not work), it is impossible to log into it via SSH. The only thing that helps is a power restart - it helps for a few days.

RPi has connected:
- a fan powered from pins 4 and 6
- 2 USB-RS232 converters (FTDI chip)
- USB-powered touch overlay

RPi Info:
* System: DietPi v7.5.2
* Device model: RPi 4 Model B (armv7l)
* RAM: 2GB

Logs attached. The error appeared on September 18, 2021, around 3 p.m. The power reboot was performed on the same day around 5 pm.
I will be grateful for your help.
regards
Attachments
LOGS.zip
(63.94 KiB) Downloaded 5 times
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: RPi freezing after a few days

Post by MichaIng »

Indeed not a single log entry related to the crash, just an hourly rng-tools execution, next entries are from after the reboot.

Btw, you're using the legacy rng-tools. I recommend to use the newer one, which also does not spam the syslog with the hourly check:

Code: Select all

apt install --autoremove rng-tools5
Can you post the output of this command to check for thermal and voltage related events and throttling:

Code: Select all

vcgencmd get_throttled
RAM usage is fine? (though would lead to OOM reaper log entries available memory is exceeded)
TTS_JD
Posts: 5
Joined: Tue Sep 21, 2021 1:49 pm

Re: RPi freezing after a few days

Post by TTS_JD »

Thank you for the quick reply.
Btw, you're using the legacy rng-tools. I recommend to use the newer one, which also does not spam the syslog with the hourly check:
Installed

Can you post the output of this command to check for thermal and voltage related events and throttling:
throttled=0x0
RAM usage is fine? (though would lead to OOM reaper log entries available memory is exceeded)
RAM usage does not exceed 700 MB

DietPi CPU Info
Use dietpi-config to change CPU / performance options
─────────────────────────────────────────────────────
Architecture | armv7l
Temperature | 49'C : 120'F (Optimal temperature)
Governor | ondemand
Throttle up | 50% CPU usage
TTS_JD
Posts: 5
Joined: Tue Sep 21, 2021 1:49 pm

Re: RPi freezing after a few days

Post by TTS_JD »

I decided to check what happens to the RPi if it loses connection with the SD card while the system is under load.
For this purpose, I ran a stress-test in the CPU + RAM variant (excluding writing to SD) and immediately after starting the test, I took the SD card out of the slot for a second and then reinserted it. RPi froze exactly as described above! .
I did the identical test again to confirm the repeatability of the test and yes - it freezes every time.

Now the question is whether this is a problem with RAM, card slot or card.
User avatar
Joulinar
Posts: 6000
Joined: Sat Nov 16, 2019 12:49 am

Re: RPi freezing after a few days

Post by Joulinar »

Hi,

while patching to 7.5 we offer to disable SD card polling. Means, availability of SD card is checked only once during boot. If you remove the card, system might going to freeze as data are not being available the system like to access.

You could check the availability of the setting as follow

Code: Select all

cat /boot/config.txt | grep sd_poll_once
if it returns a line, the feature is active. You could try to remove or hash that line (followed by a reboot) to check how it behave now.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply