Bug 249947 - wpebackend-fdo appears to be leaking EGL images
Summary: wpebackend-fdo appears to be leaking EGL images
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: Other
Hardware: Other Linux
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-29 12:27 PST by otherbms
Modified: 2022-12-29 15:51 PST (History)
4 users (show)

See Also:


Attachments
fdo patch to free egl images (549 bytes, patch)
2022-12-29 12:27 PST, otherbms
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description otherbms 2022-12-29 12:27:31 PST
Created attachment 464250 [details]
fdo patch to free egl images

My understanding of the EGL image management in FDO is somewhat limited, but I believe that EGL images are being leaked when destroying webkit views. 

In my application I regularly call webkit_web_view_backend_new; this happens a lot because I create many separate webkit views and release them when no longer needed.

All EGL images that are consumed by the client (my code) are returned to FDO prior to webkit.view un-referencing using the wpe_view_backend_exportable_fdo_dispatch_frame_complete and wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image functions.


I notice that memory is consumed but not freed and upon investigation I found that EGL images were leaking.

The attached patch corrected my application and I'm submitting it for help here.
Thanks!
Comment 1 Michael Catanzaro 2022-12-29 15:40:55 PST
Hi, thanks for investigating this problem. This is not the right issue tracker though. Feel free to submit an issue report and pull request at https://github.com/Igalia/WPEBackend-fdo where it can be reviewed properly. Thanks!
Comment 2 Michael Catanzaro 2022-12-29 15:51:34 PST
BTW you'll want to look at https://github.com/Igalia/WPEBackend-fdo/pull/176, which introduced the leak, and https://github.com/Igalia/WPEBackend-fdo/pull/178, which seems to fix it. Maybe that #178 is all that's needed here? Not sure why it seems to be stalled.