Random diet-Pi crashes -> reboot -> not coming back

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 3089
Joined: Sat Nov 18, 2017 6:21 pm

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by MichaIng »

Is the PHP sessions module actually used? ls -l /run/php_sessions
If it has no content, you can disable the service/timer for it: systemctl disable --now phpsessionclean.timer
But I cannot imagine how it would cause a crash :?.

vcgencmd get_throttled has bits for past events (of current boot session, of course) and for current events: https://github.com/raspberrypi/document ... _throttled
Those can stack
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by Joulinar »

there was still activity a minute later

Code: Select all

Jun 14 10:39:01 DietPi systemd[1]: Starting Clean php session files...
Jun 14 10:39:02 DietPi systemd[1]: phpsessionclean.service: Succeeded.
Jun 14 10:39:02 DietPi systemd[1]: Started Clean php session files.
Jun 14 10:40:01 DietPi CRON[17678]: (www-data) CMD (php /var/www/nextcloud/cron.php)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
psychoquaker
Posts: 10
Joined: Tue Jun 15, 2021 7:41 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by psychoquaker »

Yes, there was one more minute of activity. So the last thing that happened was the nextcloud cron job.

I will log the vcgencmd get_throttled now and see, if something happens.
Also I attached an oscilloscope at the 5V supply to check whether there are voltage dips.
psychoquaker
Posts: 10
Joined: Tue Jun 15, 2021 7:41 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by psychoquaker »

Update:

1) During the day it did log the 5V supply (via external oscilloscope) and also via vcgencmd get_throttled.
Result: neither voltage dips nor a vcgencmd log entry.
So it looks like the power supply is not the issue

2) Later today I had another crash. Again the last syslog entry is:

Code: Select all

Jun 17 14:55:01 DietPi CRON[9574]: (www-data) CMD (php /var/www/nextcloud/cron.php)
Now I tried to uninstall nextcloud.

Could the RAM usage be an issue? As I said: I'm running a PI Zero with little RAM.
Is there any command to log when the system is out of memory?
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by Joulinar »

well you coud use free -m to watch the ram usage. or if you have a spare device and/or VM, we could setup a monitoring solution that will collect performance data from the PI Zero. Why to use a spare device? Because your system seems already overloaded and It doesn't make sense to put additional stuff on it like InfluxDB + Grafana 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3089
Joined: Sat Nov 18, 2017 6:21 pm

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by MichaIng »

Uninstalling Nextcloud is a bit radical. You could disable the cron job and see if it solves the issue. Then we could try to identify the exact job which causes the creash:
- crontab -u www-data -e
- Comment the Nextcloud line by prefixing it with #
- Save via CTRL+O and exit via CTRL+X
psychoquaker
Posts: 10
Joined: Tue Jun 15, 2021 7:41 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by psychoquaker »

Uninstalling nextCloud did not help.
This morning I had another crash.

See logs attached.

Do you have any more ideas?
Attachments
crash4.zip
(31.28 KiB) Downloaded 9 times
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by Joulinar »

this seems to be last message inside the syslog before system was restarted

Code: Select all

Jun 24 07:16:09 DietPi rngd[166]: stats: bits received from HRNG source: 2700064
Jun 24 07:16:09 DietPi rngd[166]: stats: bits sent to kernel pool: 2641536
Jun 24 07:16:09 DietPi rngd[166]: stats: entropy added to kernel pool: 2641536
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2 successes: 135
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2 failures: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2(2001-10-10) Monobit: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2(2001-10-10) Poker: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2(2001-10-10) Runs: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2(2001-10-10) Long run: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS 140-2(2001-10-10) Continuous run: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: HRNG source speed: (min=418.982; avg=867.935; max=1110.109)Kibits/s
Jun 24 07:16:09 DietPi rngd[166]: stats: FIPS tests speed: (min=2.953; avg=6.683; max=8.867)Mibits/s
Jun 24 07:16:09 DietPi rngd[166]: stats: Lowest ready-buffers level: 2
Jun 24 07:16:09 DietPi rngd[166]: stats: Entropy starvations: 0
Jun 24 07:16:09 DietPi rngd[166]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us
But this is something happening on hourly basis and I'm not sure if this is a trigger

Very last message is the hourly cron job

Code: Select all

Jun 24 07:17:01 DietPi CRON[10447]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3089
Joined: Sat Nov 18, 2017 6:21 pm

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by MichaIng »

To mute those random generator daemon logs, migrate to the new one:

Code: Select all

apt install rng-tools5
To rule out Cron jobs completely:

Code: Select all

systemctl stop cron
This will also disable hourly /var/log RAMlog clearing, to keep in mind in case something is logging heavily there and is able to fill it up to its 50 MiB limit within a few hours. But usually it should survive a few days or more.
psychoquaker
Posts: 10
Joined: Tue Jun 15, 2021 7:41 am

Re: Random diet-Pi crashes -> reboot -> not coming back

Post by psychoquaker »

Would you really recommend to stop cron completely?

I would expect that this can lead to other unexpected behavior...?
Post Reply