Data update requested by Kodi or DreamPlayer causes memory leak of /usr/bin/enigma2 process
Hello,
I have a problem with memory leak of /usr/bin/enigma2 crashing my receiver.
Describe the bug / Actual behaviour: Every time a client such as Kodi with PVR plugin or Android TV/Fire TV app called DreamPlayer makes data request to my OpenATV receiver, the memory usage of the process /usr/bin/engima2 increases slightly. Eventually after a few days the receiver stops responding and needs to be rebooted.
Have a look at the screenshots below. I am monitoring my receiver using net-snmp-server plugin and LibreNMS.
Here is the screenshot of physical memory usage:
And here is the screenshot of network usage:
On the combined graph below, you can see that the memory usage increase happens every 2 hours, at exactly the same time as my clients are making data update queries:
Using ps or htop, I can see the memory usage of /usr/bin/enigma2 increasing every time a request is made by one of my clients.
This eventually leads to the receiver crashing once it runs out of available RAM.
Expected behaviour:
/usr/bin/enigma2 process should free up the RAM once it is done providing requested data to remote clients.
Has this issue started to happen just recently? It started a few months ago when I added 2 more remote clients to my household. I only got around to properly trace the root cause of the problem today though.
To reproduce: Steps to reproduce the behavior:
On the receiver:
- Flash OpenATV 7.5.1.20250218 image onto Zgemma H9 TWIN receiver
- Install OSCam 2.25.01-11868-802 plugin
- Upload bouquets to the receiver
On a client of your choice such as Kodi with PVR plugin, or DreamPlayer installed on Android TV or FireTV:
- Point the client app of your choice to the IPv4 address of the OpenATV receiver
- Wait for it to sync channels, picons, EPG, and so on, or force the update
Back on the receiver:
- Observe memory usage of
/usr/bin/enigma2increasing and not dropping back down to its previous level as the update completes.
Image/Box Model (please complete the following information):
- Version: OpenATV 7.5.1.20250218 (2025-02-18)
- BoxModel: Zgemma H9 TWIN
Additional context Just for clarity, over the past few months I have reflashed my Zgemma receiver multiple times and kept the config as bare-bone as possible to isolate this issue.
I have the same problem.
It has been a month since I reported this bug with no comment from any dev. Is this project still being monitored?
I've made some fine-tuning adjustments to the Enigma2 plugin in my Kodi instance. Specifically, I've increased the Update Interval in the Settings - Enigma2 Client - General section from the default value to 30 minutes.
This change has resulted in a reduction in the memory leak. I've attached a picture for your reference.
@vogofox Well it doesn't change the fact that the memory leak still occurs.
I am currently working around this problem by having set a cronjob that reboots the receiver once a day in the middle of the night but that is a workaround, not a solution.
OpenATV and all other images are maintained by users in their private free time and we all get no money.
Your problem is very difficult to investigate. You don’t need a cron job because there is a feature called scheduler formally known as power timer to reboot or shut down your box daily.
I fully appreciate the effort that goes into maintaining free open source software.
All I was saying is that I took time and effort to diagnose and pinpoint the issue so a simple acknowledgement of the bug would be nice, especially given I have provided clear and easy to reproduce steps.
The problem is not that easy to reproduce because I don’t use Kodi and I don’t connect from one box to another.
It looks like the that the Kodi Plugin use the webinterface / openwebif to fetch data from the box. Each of these api requests should not create any leak but it seams there is one.
The first step of the investigation must be: Don’t use the Kodi Plugin and try to reproduce the leak by calling one api call and then the next and so one until we have the bad one.
I am running LibreElec on RaspberryPi 4 however Kodi can be installed as an application on any Windows computer. Another option is to get DreamPlayer app on an Android device.
I am not familiar with doing individual API calls, if you give me instructions on how to do it I can give it a try and report back.
You can find the api calls in the enigma debug log. I don’t have any Android or Windows device. Maybe someone else can help here.
I'll take care of the API tests and figure out which call is causing the leak. I'll have some time in the next two weeks to do this and get back to you with the results.
Do you have any update?
he is running kodi on raspbery with libreelec not on stb the enigma2 addon in kodi does not work fine it's based on vti many functions for asking ber signal etc does not work on oe-a