Skip to content

Memory leak with EGT demo? #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gbmbg opened this issue Apr 16, 2025 · 15 comments
Open

Memory leak with EGT demo? #33

gbmbg opened this issue Apr 16, 2025 · 15 comments

Comments

@gbmbg
Copy link

gbmbg commented Apr 16, 2025

Good Morning,
We encountered memory leak issues while implementing code using the EGT libraries. To ensure that the problem was not specific to our code, we tested the same scenario with the demo provided by the EGT libraries. Unfortunately, the memory leak persisted, indicating that the issue may lie within the libraries themselves.
In fact, flashing the NAND with the demo on SAM9x60-curiosity board, after 25/26 hours we encountered the same problem pointed out in #31, the EGT demo process was killed by the OOM-killer:

Image

Image

Image

Do you have any suggestion regarding this? We are using 2024.10 buildroot based kernel
Thanks a lot and work well

@ldesroches
Copy link
Contributor

Hello,

This sounds quite different from the other issue that was about caching more and more images. Right now, we didn't observe it, but we didn't test it on such duration.

We'll have a look as soon as possible.

Thanks for reporting this issue.

Regards,
Ludovic

@gbmbg
Copy link
Author

gbmbg commented Apr 17, 2025

Ok thanks a lot, from our experience and our code issues, it seems connected to animations...
Hope this helps.

@gbmbg
Copy link
Author

gbmbg commented Apr 22, 2025

Here a new log concerning another test we made during last weekend. This time we used EGT demo flashing kernel image 2022.07
EGT_failure.log
Hope this helps too.

@ldesroches
Copy link
Contributor

Hello,

We have not started the debugging yet. Thanks for your inputs. For sure, it will be useful.

Regards,
Ludovic

@gbmbg
Copy link
Author

gbmbg commented Apr 30, 2025

Hello do you have any news?

@ldesroches
Copy link
Contributor

Hello,

Sorry, no, not yet. We are in the release process of 1.11, we'll have a look once the release is done. As it is sync with linux4microchip we can't postpone it. Depending of the fix, we'll release a 1.11.x or it will be in the 1.12.

Regards,
Ludovic

@gbmbg
Copy link
Author

gbmbg commented May 2, 2025

Ok, so we will have to wait about 3/4 month at minimum, right?
Please let me know
Work well
Giovanni

@ldesroches
Copy link
Contributor

I can't tell until we find the root cause. It can be due to EGT or other components used by EGT and even the LCD kernel driver.

If it's related to EGT and if the fix is trivial, i.e. we don't expect side effects, we can release a 1.11.x so it could be done as soon as we find the fix. If it's more complex, it will be put on the master branch so you could cherry-pick it. It just means that the patch hasn’t yet passed all the tests we run before a release.

We still have issues to fix for 1.11, I don't think we'll be able to really dig into this issue before June.

@gbmbg
Copy link
Author

gbmbg commented May 2, 2025

Ok thaks a lot.

@ldesroches
Copy link
Contributor

Hello,

We investigated more on the issue. We have not found any memory leak in process of the EGT application.
There is a memory leak with the slab allocator that probably comes from the LCD driver. I know there are plans to refresh this driver and so it can be part of this rework. It means that you'll probably have to wait for the next linux4microchip release.
I'll keep you informed when patches will be published, either for just fixing this bug, or when the driver refresh is done.

Regards,
Ludovic

@gbmbg
Copy link
Author

gbmbg commented May 6, 2025

Ok thanks a lot, you mean at least 2025.10 right?

@ldesroches
Copy link
Contributor

yes

@gbmbg
Copy link
Author

gbmbg commented May 22, 2025

Is EGT version 1.11 still based on cairo? If so, on which version?
Cairo v 1.17.4 is the one on which EGT v 1.10 is based, correct?

@CyrillePitchen
Copy link
Contributor

Indeed, EGT 1.11 still depends on cairo; all references to cairo have been removed from the headers in the public API but internally, cairo is still used for the rendering when no GPU is available or when the render operation is not supported by the GPU.

We didn't change the cairo requirement; in both CMakeLists.txt and configure.ac, we still require cairo >= 1.14.6 (the autotools support will be deprecated soon, we have moved to cmake).

The actual version of cairo depends on the package in the build system, buildroot or yocto, used to generate the linux4microchip image. For instance, in buildroot for linux4microchip-2025.04, I see the version is set to 1.18.2 in the cairo package: package/cairo/cairo.mk in the buildroot-at91 repository (will move soon to buildroot-mchp).

In yocto, still for linux4microchip-2025.04, in the openembedded-core repository, I see the meta/recipes-graphics/cairo/cairo_1.18.0.bb recipe, hence I guess, the cairo version should be 1.18.0.

@gbmbg
Copy link
Author

gbmbg commented May 22, 2025

Thanks a lot.
Now we are still using EGT 1.10 embedded in linux4microchip-2024.10 and it is based on 1.17.4!
looking to:
https://www.cairographics.org/news/[cairo-1.17.8](https://www.cairographics.org/news/cairo-1.17.8/)/
and
https://www.cairographics.org/news/[cairo-1.18.0](https://www.cairographics.org/news/cairo-1.18.0/)/
they fixed a lot of memory leaks!
Could be our issue related to theirs?
Thaks again and work well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants