I am working on a project with a PI compute module set up on a custom PCB. The project has to reliably run ideally indefinitely while logging sensor data and writing video and audio to a usb when the device is triggered. The program that handles all of this is written in is a multiprocessed/threaded Python program that starts on boot. When it is recording audio and video, it uses around 35% of CPU and around 15% when it is not. The system runs from a solar panel and battery
It recently crashed after around 3.5 days of running reliably. The logging that I set up within the program did not indicate that anything was wrong, and I have a system set up that restarts within the python program if any process or threads does go down, so the problem was not the python program itself.
The following was found in /var/syslog (I will edit in the full syslog if someone thinks it will be useful):
May 19 12:28:02 raspberrypi kernel: [322680.792629] INFO: task scsi_eh_0:69 blocked for more than 120 seconds. May 19 12:28:02 raspberrypi kernel: [322680.792893] INFO: task usb-storage:71 blocked for more than 120 seconds. May 19 12:28:02 raspberrypi kernel: [322680.793216] INFO: task python3:724 blocked for more than 120 seconds.
These are timestamped about 4 minutes after the last log of the python program. The last few of these logs indicate that it was recording audio and video, and that the CPU and MEM usage were 14.6% and 23.8% respectively a maximum of a minute beforehand.
according to the below link this error message appears when “whole process has not been scheduled for any CPU-time for 120 seconds”. I haven’t been able to find any other useful references to this error as most seem to refer to high-load servers.
Is this error in syslog a result of the PI itself or could it be caused by my code that writes audio and video, or could it be a power issue? Any help is appreciated. This is difficult to debug since it takes so long for the error to occur.
I originally asked this question on stackoverflow but didn’t get any responses (for obvious reasons) so I have deleted that and have tried to make it a bit more concise here. I hope this is acceptable.