Forum

Full Version: Memory leak when idle?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am running Xbian on a Rpi 3+ and Kodi will freeze and I see in dmesg that I get an out of memory error. I don't get a kernel panic. Kodi restarts but the previous screen stays on the TV so I can see it happens at random times.

PRETTY_NAME="XBian 11.0 - Bullseye"
NAME=XBian
VERSION_ID=11.0
VERSION="XBian 11.0 - Bullseye"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
uname = 6.1.28+
getconf LONG_BIT = 32

I don't see any memory leak warnings in the kodi.log file. I do run iptvsimple so I don't know if this is a source of my problem or something else.

I thought it could be this but it was already disabled sudo echo 0 > /sys/kernel/mm/lru_gen/enabled

Any pointers?
Are you running a heavy skin?
(1st Jul, 2023 05:34 AM)f1vefour Wrote: [ -> ]Are you running a heavy skin?

No just the default Kodi skin Estuary is all I use. I don't have any other skins installed besides the two default ones.
I created a swapfile at /var/swapfile so now Kodi doesn't freeze or cause OOM_killer to kill Kodi. Looks like upstart zram-swap should create the swapfile but it doesn't. I believe it is due to the file system being btrfs. The upstart log doesn't give any info for zram-swap except /proc/self/fd/9: 43: echo: echo: I/O error
I have the same problem. As workaround i just increased the swap partition to 1.5GiB (default was 256MiB (?) or something like that).
Now Kodi does not crash or restarts.

I do notice that Swap usage can reach up to 700MB sometimes, and only a Kodi stop/start clears the swap back to zero.
If you don't see any memory leak warnings in the kodi.log file. But it does run iptvsimple, so I think it is because of other reasons. It should be that there is something wrong with the system when you restart. I suggest shutting down again and then turning it on again later.chatgpt login
(13th Jul, 2023 06:00 AM)Exnor Wrote: [ -> ]I have the same problem. As workaround i just increased the swap partition to 1.5GiB (default was 256MiB (?) or something like that).
Now Kodi does not crash or restarts.

I do notice that Swap usage can reach up to 700MB sometimes, and only a Kodi stop/start clears the swap back to zero.

My system wasn't creating any swap (0 GB) which was causing my problems. I created a swap but I was still getting some crashes and dmesg gave me an error about can't swap pagenets or something on a non-sub volume. I had to create a swap on a subvolume. Since then no crashes.
Reference URL's