(SOLVED)Maybe a memory leak problem with kodi
#1
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
Reply
#2
It's most likely memory fragmentation, can you start kodi that way, in one line:

Code:
MALLOC_MMAP_THRESHOLD_=131072 /usr/lib/kodi/kodi.bin
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
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)
Reply
#4
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
Reply
#5
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:
Code:
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!
Reply
#6
Open a terminal and type the above line c/p it :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
(2017-02-21, 19:13)fritsch Wrote: Open a terminal and type the above line c/p it :-)

Here is what I get:

Code:
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
admin@ubuntu_1604:~$

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]
Reply
#8
this indead fixed it, its stabilaze the ram usage arround 840-870..
Reply
#9
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.
Reply
#10
we already set that in kodi: https://github.com/xbmc/xbmc/blob/master....sh.in#L36
Reply
#11
Thanks for the information.
Reply
#12
@wsnipex

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)
Reply
#13
This was pushed into kodi's master - has nothing to do with agile at all. LE ships that in their final release, too.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
Thank you fritsch
Reply
#15
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
Reply

Logout Mark Read Team Forum Stats Members Help
(SOLVED)Maybe a memory leak problem with kodi0