Network related Memory leak like problem

Since i have updated to the “2019 07-1” i have a memory leak issue.
I did not had to reinstall my Rpi since a year now, all was fine with it.

The sympthoms:
Starting OSMC, got about 600Mb of free memory (according to debug).
IPTV simple client jumps in downloads the list of channels, EPG, logo.
Free memory drops to around 480 Mb.

And now even if you are not touching it the free memory nice slowly begins to shrink.

If you play a video via SMB from local lan, the allocation slow.
If you play a stream via simple IPTV client then its faster.
If you play a stream via YouTube addon the allocation does huge chuncks. Like no additional allocation, then a large block, then release some, then allocates a larger block again.

Once you finishes a play or exiting from a client some memory been released but like 20 Mb or maybe 40Mb but the other 3-400 Mbytes are stay reserved.

Once i made a massive memory release by unplugging the LAN cable from Rpi. Once i plugged in the cable the memory leak stopped. I played a video from the local network via SMB , and that was okay. No issues, until i started to stream a video from the internet via simple IPTV.

i have checked other topics about similar memory leak issues.
I have stopped media center, renamed .kodi , started media center. I can confirm that in that case the memory usage is stable no leaks there. (But nothing works :frowning: )

I have disabled each and every addon but the memory leak doesn’t stopped.

I have reinstalled with recent build.

The first step was to add local network libraries via SMB. And at that point a very small memory leak begins. If you leave the GUI for an hour or so you can see that at that point it allocates an extra 50Mb of ram. If you move in the menu that allocates a lot of memory.

Once i reinstalled simple IPTV CLient and YouTube addone, the memory allocation is around 8 Mb / sec.

so current result is when the free Ram reaches around 40 Mb the sad face appears and system restarts.

You can’t watch a movie as a whole without have an OSMC restart.

As a last test now i had around 200Mb ram left, i have removed LAN cable, memory leak stopped. And about 30 seconds later i got back all the allocated memory.
Once i plugged LAN cable back memory leak continues.

here is the log , took about 1-2 minutes after the big memory release.

https://paste.osmc.tv/wumotixufu

Regards,
Endre

There seems to be an issue with that log but off the top of my head I would suggest looking for a network loop.

Yeah, I see what you mean.

When i select All or even specific ones it says at upload :
http://paste.osmc.tv/ , and i guess this is another bug here :frowning:

@darwindesign : Network loop ?
Can you be a bit more specific ?

I checked the traffic generated by kodi through my firewall, and its not opening any connection. I mean i see it allocates memory, same time no port opened, no dns query sent, no active connection been made.

You said you did a clean install and your problem persists. I know there is not some major issue as I keep some of my Pi’s on without rebooting for many weeks at a time. You also said the problem changed when you dumped your network connection. This leads me to believe that you have a problem in your network, and not on your pi. It may be impacting OSMC more than it may be some other operating systems, but it really has nothing to do with the computers.

You would probably be best served by just googling “network loop” as there is plenty of information on the net about it. You could also have more than one machine with the same IP address, or more than one DHCP on the same subnet. Any of these things can cause a bunch of extra network traffic and wreak havoc on a computer that is trying to process all this extra information.

  1. osmc is configured to use fix IP, issued by router (based on devices Mac address).
  2. I have replaced my rpi3 with another board using the same sdcard. issue is the same (this time with a different IP as its issued by DHCP).
  3. My network has only 10 devices, where 7 is on fixed IP.
  4. device is using direct LAN cable.
  5. at the time and ever since when the error appeared only OSMC been updated.
  6. the problem isn’t directly with the core system, but either with SMB protocoll buffering or how the network is being handled. As as soon you try to use YouTube or Simple IPTV Client you see that memory is beign allocated but not released. Like its buffering new data, but buffer isn’t released.

Once you remove LAN cable these allocated memories been released.

I do monitor my network , and there are no collosions, no suspicious inbound or outbound connections.

  1. Error appears when there is an uplink on Lan port. No traffic , only uplink needed, and memory leak begins.

  2. the speed of the memory leak depends on network traffic in a way where more received packets results bigger memory leak.

That is all i see and all i found. I can’t add more to this.

Short of a lucky gess, the only way we can make progress is for you to provide full logs.

I suggest that you:

  • switch on Kodi debugging.
  • reboot your Pi.
  • do something that will cause the memory problem, for example " play a stream via simple IPTV client".
  • provide full logs

Reduce number of days in IPTV EPG

@sam_nazarko even if i disable using epg data the nemory leak still present.

I noticed it with youtube app and with simpleiptv client. But if you only leave the device on it runs out of memory in a day or two.

I managed to attach finally some log.

Okay i can attach zip here. And the log uploader isnt working in osmc.

The log uploader works fine. Your logs are prob just too large. Reboot twice to remove the kodi.log and the kodi.old.log and then try to reproduce and submit logs.

I understabd you say it works fine.
I would produce a smaler log if i could. But when it reaches the point it restart it self because of memory pressure each an every time the log uploader gives instead of the code.

So you say its working fine i say i cant upload the log with it.
I hipe i am the only one with this problem.

so i saved two log files 7.7 meg each but i cant send it. Cant attach them here.

Is there any other way i could try ?

You could use dropbox or any other filesharing solution.
But you might first want to check why it’s so huge, maybe that explains your problem already.