GNOME Bugzilla – Bug 797297
glcontext: DRM context is not being finalized if no display is connected
Last modified: 2018-11-03 12:11:04 UTC
Created attachment 373948 [details] a simple python script which consequently creates pipelines, logs with and without the issue I use gl elements from gstreamer 1.14 with this [1] patch on a headless system (linux 4.17, mesa 18.2). It initializes and runs fine, but when I try to destroy the pipeline and build a new one, old context persists, and newly created context is being created as a software (llvmpipe) context (it seems due to the previous one is not deleted). Under wayland and X11 context is being finalized and (re)created fine. I've attached a simple python script to test the issue, error log (from a headless run) and a normal log (from under wayland) [1] https://bugzilla.gnome.org/show_bug.cgi?id=794716
Ok, the reason is that nobody closes the drm_fd, opened in `gst-libs/gl/gbm/gstgldisplay_gbm.c:392`. The other issue is that context ref counter is incremented one extra time somewhere, so the display finalizer is never called.
Created attachment 373958 [details] [review] Here is the patch, which closes drm descriptor and fixes context leaks in window_gbm
Also this should be merged in master/1.15, right after this one: https://bugzilla.gnome.org/show_bug.cgi?id=794716
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/494.