Well anything unrelated or older than 1 year it might be questionable to revive. But your case fits.
So, I was able to gather some more infomation on on the latest crash.
Generally at this point the systems unresponsive & unable to start a terminal. Crashing either with the sad face or after waiting some time, the vero’s usually unplugged from the power.
However, I did have a terminal already open running the command “top” and interestingly that terminal although very slow (running commands) was still responsive and I was able to grab the logs before being able to use the restart command.
Logs at: https://paste.osmc.tv/mecozasuno
and the output of the “top” command
top - 19:15:43 up 1 day, 6:15, 2 users, load average: 8.03, 7.14, 4.40
Tasks: 179 total, 2 running, 174 sleeping, 3 stopped, 0 zombie
%Cpu(s): 0.2 us, 34.3 sy, 0.6 ni, 28.2 id, 36.8 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 1988.2 total, 572.7 free, 1372.3 used, 43.2 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 541.5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1531 root 15 -5 0 0 0 R 95.3 0.0 8:57.38 kswapd0
2834 osmc 20 0 2004868 1.1g 0 D 24.4 57.4 523:25.43 kodi.bin
1869 root -2 -15 0 0 0 S 9.7 0.0 1:12.44 mmcqd/0
1502 root -51 0 0 0 0 S 4.2 0.0 0:30.21 irq/27-meson-am
10701 osmc 20 0 5452 1552 988 R 0.8 0.1 0:00.25 top
7 root 20 0 0 0 0 S 0.3 0.0 1:58.65 rcu_preempt
3038 ntp 20 0 7208 548 0 S 0.3 0.0 0:13.25 ntpd
4593 root 20 0 0 0 0 S 0.3 0.0 0:00.65 kworker/1:0
1 root 20 0 30988 1736 0 S 0.0 0.1 0:05.10 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.15 kthreadd
6 root 20 0 0 0 0 S 0.0 0.0 0:13.83 ksoftirqd/0
8 root 20 0 0 0 0 S 0.0 0.0 0:01.32 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
11 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain
12 root rt 0 0 0 0 S 0.0 0.0 0:00.66 watchdog/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
15 root rt 0 0 0 0 S 0.0 0.0 0:00.55 watchdog/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
17 root 20 0 0 0 0 S 0.0 0.0 0:03.15 ksoftirqd/1
19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
20 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
[2]+ Stopped top
Hopefully that’s able to provide some helpful information, it’s all a little lost on me ahha.
Many thanks again for all your time and ideas! The support thats provided to everyone here is astounding, going above and beyond anything I’ve ever seen!
I’m not versed in the topic so I could be completely off kilter here but I think that is showing that you have swap enabled (I think that would be something you did yourself) but you have no swap space so it is throwing a fit because you swap is “full”.
hmmm If it’d involve accessing the cli to enable it, I can’t imagine that’d be anything I’d turn on. Thinking if unless, it’d be something left over from a previous install or from a restore using a tar. backup, but the system was recently reinstalled from fresh skipping the use of backups,
Is there a way of checking if memory swap is turned on and if it is, do you think turning it off might help the course
Your root problem is that kodi is showing a memory leak (probably a misbehaving addon) and the OS is desperately trying to free up memory by attempting to swap memory out to the non-existant swap space.
You can try playing with the swappiness as described in this thread to maybe delay the inevitable crash that you are doomed to get when it runs out of memory.
https://askubuntu.com/questions/259739/kswapd0-is-taking-a-lot-of-cpu
Hi,
As @randallspicher points out kswapd0 high cpu usage is symptom of kodi using up the physical memory. Your best bet is to use a vanilla kodi profile and see if the problem persists. If it does please provide fresh logs, if it doesn’t try restoring addons until you find the cause of the issue. This can be achieved by doing the following:
Let’s test with Kodi default settings. Enter the following commands with an SSH connection.
systemctl stop mediacenter
mv ~/.kodi ~/kodi.bak
systemctl start mediacenter
If needed you can restore:
systemctl stop mediacenter
mv ~/.kodi ~/kodi.bk2
mv ~/kodi.bak ~/.kodi
systemctl start mediacenter
If your original setup was restored as expected and you want get rid of the unneeded clean install you can delete that with the following command.
rm -r ~/kodi.bk2
Also I think @darwindesign has miss interrupted the output of top, the kernel can call kswapd regardless of whether swap is enabled. I think in this instance the high cpu use kswapd0 actually confirms there isn’t any swap to page to.
Regards Tom.
Thanks I think I’ll keep that one in mind as a final solution to try
Thanks for the detailed reply. Thats super helpful to a novice like me ahah.
I’ll get started with another fresh profile and monitor the situation.
I did try to keep the new install as bare as possible, limiting the amount of add-ons installed. From memory, I only installed, Trakt, Yatse and open subtitles oh and the daily/weekly bing wallpapers
Cheers
I highly doubt it would be Trakt or open subtitles as I’ve run these two for years without incident.
Sorry Tom for the radio silence!
I’ve had to drop a few things to in preparation of upcoming exams.
I did however, get the chance to quickly jump through the setup of a vanilla profile and tried using that new profile a couple of weeks ago. The issues still persisted though.
But when I’m freed from this escapade…, I’ll be able to sit down, test it, and look over it properly, providing some better logs.
Thanks again though
Good luck with your exams.