View Entry Info: Possible memory leak, need help on how to figure it out

Category:
Possible Bug
What ViX Image build number are you using?
Please provide your ViX Team image build number. Menu > Information > About > Build number > ENTER THIS NUMBER e.g. 4.2.028
5.3.039
Have you tried a flash WITHOUT settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
Yes
Have you tried a flash WITH settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
Yes
Attachments
Results 1 to 15 of 15

Thread: Possible memory leak, need help on how to figure it out

  1. #1

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post

    Possible memory leak, need help on how to figure it out

    Hi,

    I recently set up my Ultimo4K from scratch as I was getting crashing issues every few days.

    • System OE: OE-Alliance 4.3
    • Firmware version: OpenViX 5.3.039 (2020-07-19)
    • Kernel / Drivers: 3.14.28 / 20190424
    • OWIF: 1.4.0


    Unfortunately this did not help, I can still observe the memory reaching capacity via the top command every few days. It will then eventually crash. Prior to a fresh install I replaced the HDD.

    The device is also used for development as I maintain the pvr.vuplus (Enigma2) add-on for kodi so there will be a lot of use via OpenWebIf, both for the XML APIs and streaming server.

    I'm not sure exactly when this started but I could use some guidance on how to track down what causes this. Outside of occasionally manually updating OpenWebIf with fixes I would not know too much about the enigma2 internals. For all I know the memory usage pattern is expected and the issue lies somewhere else!

    Thanks in advance for any help.

    P.S.

    I should add that the Ultimo4K has 2xDVB-S2 FBC tuners and a DUAL DVB-T2 tuner. It is configured via ABM for both Freesat and Saorview in Ireland. This is the only configuration applied since the fresh install. The saorview channels appear as part of the freesat bouquets using a custom mix file. All EPG data is embedded in the stream.
    Last edited by phunkyfish; 20-09-20 at 09:22. Reason: Mising detail

  2. #2

    Title
    Forum Supporter
    Donated Member
    Join Date
    Sep 2014
    Posts
    3,462
    Thanks
    335
    Thanked 833 Times in 707 Posts
    Crash logs will be a good start, usually found in /media/hdd/logs

  3. #3

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    Cool, I will grab those on the next crash. But I don't have a logs folder in /media/hdd. Do I need to create it or would they be located elsewhere?

  4. #4
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    21,191
    Thanks
    5,614
    Thanked 8,350 Times in 5,620 Posts
    Default location is /home/root/logs/

    You should try installing htop and using that instead of top, data is better presented.

    I fear you won't get a solution as there was an issue about memory leak on OWIF GitHub.

    EDIT:
    https://github.com/E2OpenPlugins/e2o...bif/issues/751

  5. #5

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    The log was actually in /home/root/logs. Here it is:

    Enigma2_crash_2020-09-15_21-55-00.log

    EDIT: I have htop installed now too. Not sure if it's relevant or not to this but it used to take 4/5 seconds to play a channel from a remote kodi host. Now it takes about 20 seconds to play a channel.
    Last edited by phunkyfish; 21-09-20 at 22:59.

  6. #6
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    21,191
    Thanks
    5,614
    Thanked 8,350 Times in 5,620 Posts
    If it is causing a problem, please uninstall htop.


    Some other threads with issue
    Code:
    https://forums.openpli.org/topic/25860-recordings-failed-to-allocate-filepush-buffer/
    https://www.world-of-satellite.com/showthread.php?58563-Repeated-crashes-quot-Failed-to-allocate-filepush-buffer-contact-MiLo-quot
    EDIT:
    I can't see any fixes in ATV 's movielist for memory leak

    Code:
    https://github.com/openatv/enigma2/commits/6.4/lib/python/Components/MovieList.py
    Issue was opened here
    Code:
    https://github.com/openatv/enigma2/issues/1026

  7. The Following User Says Thank You to abu baniaz For This Useful Post:

    Andy_Hazza (22-09-20)

  8. #7

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    @"abu baniaz"

    Thanks for the guidance. Do you know of anyway I can prove this is a leak in Movies.py? Its a leak coming from somewhere.

    The kodi addon updates timers and recordings every few minutes. Let me try disabling the recordings update and see does that slow down the rate of the leak.

  9. #8
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    21,191
    Thanks
    5,614
    Thanked 8,350 Times in 5,620 Posts
    Sorry, I don't know.

    Would be nice to track it down and fix.

  10. #9

    Title
    Forum Supporter
    Donated Member
    Join Date
    Sep 2014
    Posts
    3,462
    Thanks
    335
    Thanked 833 Times in 707 Posts
    Rebooting the box once a day should avoid any more crashes.

  11. #10
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    21,191
    Thanks
    5,614
    Thanked 8,350 Times in 5,620 Posts
    And maybe using cacheflush plugin.

    Best to avoid the crash until issue is fixed.

  12. #11

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    Well I have to prove it's Movies.py first. But even if I do I need to figure out how to find a memory leak in a python file. That will be the hard part. As there has been no movement on the issue open on OpenATV I guess the only this will get fixed is if I do it myself.

  13. #12

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    After only a few hours of testing memory consumption appears to stay consistently below 200MB used. I'll leave it run throughout the day but it pretty much confirms the leak is in MovieList.py.

    Now just need to figure out how to fix it.

  14. #13
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    21,191
    Thanks
    5,614
    Thanked 8,350 Times in 5,620 Posts
    I hope you saw jbleyel's response.

    Hi @AbuBaniaz , i have made a copy of MovieList.py from enigma2 and then i have removed all the GUI parts.
    I think the leak is in the GUI part of MovieList.py.

  15. #14

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    Yes, I saw it. Now I just need to figure out which parts are the GUI parts!

  16. #15

    Title
    Member
    Join Date
    May 2018
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 1 Post
    Any hints or guidance?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.