Kodi Community Forum

Full Version: (SOLVED)Maybe a memory leak problem with kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well, this is just a heads up, I will report back later on when Ill get the next reboot on kodi.

Its seems to me that kodi have a mem leak problem, its take about 2-4% of mem everytime you start a new movie, so the memory usage to kodi increase, and when it have increase to a sudden number, kodi crash, and when its starts up again the memory usage is reset.

I will post log, and debug info as soon this happens again. (kodi is not at 1G mem usages), så i guess at 2G usage it crash again.

By the way using the default skin that came with kodi 17
It's most likely memory fragmentation, can you start kodi that way, in one line:

MALLOC_MMAP_THRESHOLD_=131072 /usr/lib/kodi/kodi.bin
Yepp I will put that in the autostart script..

hmm had to just have following: MALLOC_MMAP_THRESHOLD_=131072 kodi-standalone (no kodi.bin in spesific folder)
Its seems like that did the trick, I asume kodi should use some amont of memory also, but now its looks like it also clean up the mem usage under use to.. And that did not happend without that extra code..

Ty fritsch
Hi fritsch, all,

I am having same issue as thread opener (Kodi 17 on Ubuntu 16.04). RAM usage grows and grows, then swapping starts (I hear the disks a lot), then system gets slow and finally might crash

(2017-02-20, 10:57)fritsch Wrote: [ -> ]
MALLOC_MMAP_THRESHOLD_=131072 /usr/lib/kodi/kodi.bin

Can you please let me know how to do that? Usually I start KODI by double clicking the icon on the Desktop.

Many thanks!
Open a terminal and type the above line c/p it :-)
(2017-02-21, 19:13)fritsch Wrote: [ -> ]Open a terminal and type the above line c/p it :-)

Here is what I get:

admin@ubuntu_1604:~$ MALLOC_MMAP_THRESHOLD_=131072 /usr/bin/kodi
ERROR: Unable to create GUI. Exiting
Segmentation fault (core dumped)
Crash report available at /home/admin/kodi_crashlog-20170221_182410.log

my ubuntu runs a desktop (I mean the graphical interface) i think that is the problem...

[EDIT: I ran the command from SSH, that didn't work. Now I ran it from local shell and it starts KODI. I will now test. Thank you]
this indead fixed it, its stabilaze the ram usage arround 840-870..
Hopefully the right thread to ask this in, but what would be the correct syntax for a pi3?

Using Bitvise i entered MALLOC_MMAP_THRESHOLD_=131072 /usr/lib/kodi/kodi.bin which it did not seem to like. Entering MALLOC_MMAP_THRESHOLD_=131072 was fine.

However, I came across this on another site Environment=MALLOC_MMAP_THRESHOLD_=131072 and that was fine as well.

And finally saw a suggestion that 524288 should be used on 64bit systems.

So the questions are what is the correct syntax and in which file should I include it? The config.txt where the decoding licenses are entered, autostart.sh, or does it really matter?

Thanks for your assistance.
Thanks for the information.

is it already in use, by milhouse for example, or did you just fix it in agile to be used when it is merged to master?

Just asking cause I'm having similar issues using an actual milhouse build (x86_64)
This was pushed into kodi's master - has nothing to do with agile at all. LE ships that in their final release, too.
Thank you fritsch
Is it also solved, if I call kodi-standalone? because I have a similar issue.
The used memory rises nearly linear (see screenshot)
I am using Kodi 17.4 on Ubuntu 16.04.3 LTS
Pages: 1 2