Crash from time to time of OSMC

Hi All,
My OSMC box works pretty well but from time to time I have a random crash of Kodi. An image with :frowning: appear and I have to wait few secs that kodi reboot. I looked at .kodi/temp/kodi.log but I am unable to understand the issue. Debug is not enabled for the moment and I do not have specific steps to reproduce it.
Here logs:

Not much to do here then except advise you to check your power supply and make sure you are using a good quality SDcard.

Can you tell me why you suspect this is the issue? What have you founf in logs that suggest you this conclusion?

I’ve found very little. There is no crash captured with debug logging to scrutinize and you can’t advise what steps cause the crash or even what processes might be taking place when the crash occurs.

You also run tvheadend, torrent server, a great deal of system customizations by way of apt-get, quite a few 3rd party addons whose only purpose are to bypass copyright and provide pirated content, and you somehow think you need 183mb of cachemembuffer. Wouldn’t surprise me if you are running the system out of memory at some point.

I have a Pi 2 model B system with 1 Gb.
Consider that with this system I experimented a lot and it could be possible I have plugin that I actually I do not use. I can disable them. Tvheadend interest me because I want to use live tv to record tv program. I followed a tutorial to set the 183mb of cachemembuffer to improve streaming some time ago. The tutorial suggested to use a specifc percentage of my total memory. Is it too much? Which are typical value for this parameter?

This sounds like a good reason to start over with a fresh install. I’d be surprised if the tutorial that told you to use 183mb was advising this for an Rpi, though this excessive amount should not be necessary on any platform really. The default of 20mb should be sufficient in most all cases.

Yes, I thought to start from scratch but I did lot of customization that are useful for me. I want sometime a script to automate everything I did (for the moment I documented all the changes in a document).
At this point if the default is ok I can remove the advance setting.xml, because I imagine it uses default value. Probably this could be the cause of issue since i did it few weeks ago and from that moment the system had this issue.

Sounds like solid logic.

Doing a top I see this:
top - 23:41:15 up 3:29, 1 user, load average: 0.36, 0.32, 0.41
Tasks: 143 total, 1 running, 141 sleeping, 0 stopped, 1 zombie
%Cpu(s): 3.2 us, 1.5 sy, 0.4 ni, 93.9 id, 0.6 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem: 751028 total, 725396 used, 25632 free, 30328 buffers
KiB Swap: 0 total, 0 used, 0 free. 383276 cached Mem

if I am correct it seems I have only 25 Mb free. Is that correct?


How I can determine the process that is using more memory. In top it seems all processes use few bytes so I do not understand why the total is so huge. Another thing I do not undestand is why I have 750Mb totoal if I have 1Gb (at least Pi2+ Model B should have this quantity).

21:47:28 5754.909180 T:1956688816 NOTICE: ARM mem: 752MB GPU mem: 256MB MPG2:1 WVC1:1

Strange pi2 model B should have 1 Gb

What about memory usage for single process? There is a way on OSMC? I have always had problem finding these values even on normal Linux boxes. Sometime data are confusing.

It does! 256mb is reserved for GPU.


Any suggestion for memory check for each process? A quick way just to understand who is the main responsible. In the meanwhile I’ll start to remove everything not necessary from my system.

I’m sorry, giving linux lessons is a bit out of the scope of this forum and more demanding of my time than I currently have available. You were able to google your way into a whole plethora of debian/linux customizations, I’m sure you can figure it out.

Try installing and using htop instead of top.

Occam’s razor.

Check the Linux cheatsheet for a bit more info. You may want to use a swap file but this could cripple your performance.

I didn’t ask for linux lessons. I aked that question because command line tool like top are not so reliable. On normal linux box I use others tools (some graphical) that on OSMC requires too much dependencies. Other requires some manual work so my request was just if the OSMC community uses a specific tool available on repository for a task that I consider quite normal. That’s all. However as you said I can figure out it by myself. Thanks for your support.

Ok it could be a solution. To be honest I haven’t used this tool before.

I asked this because I didn’t see any out of error messages in log. I didn’t suspect I used all this memory and I didn’t think to check it. But now it’s clear that this is the reason. Thanks.

Probably a Linux cheatsheet is too much elementary :slight_smile: Probably I asked the question in the wrong way. However, I’ll give a try to htop and if it does not satisfy me I’ll try to find something else … I think at the end a command easy to install on OSMC should exist.

ps aux --sort -rss

and to check if you run out of memory you could start a screen session and run watch free -m