After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725643 - use of upload meta does not honour GL context usage
use of upload meta does not honour GL context usage
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 736713 743569
 
 
Reported: 2014-03-04 07:11 UTC by Matthew Waters (ystreet00)
Modified: 2015-02-24 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapidecode: store the upstream GL context (3.25 KB, patch)
2014-03-04 07:17 UTC, Matthew Waters (ystreet00)
none Details | Review
vaapidecode: store the upstream GL context (2.83 KB, patch)
2014-03-04 08:48 UTC, Matthew Waters (ystreet00)
none Details | Review

Description Matthew Waters (ystreet00) 2014-03-04 07:11:23 UTC
Basically the following occurs:

1. pipeline with vaapidecode ! glimagesink is running normally
2. pipeline starts shutting down
3. glimagesink destroys it's context and display handle
4. vaapisink attempts to destroy some GL resources using the destroyed context/display.
5. segfault inside X11 recreating the context.

I hypothesize that this does not occur with webkit/clutttersink because the GL context and display is controlled outside of the pipeline.

See the end of https://bugzilla.gnome.org/show_bug.cgi?id=725048 for the full details with numerous backtraces.
Comment 1 Matthew Waters (ystreet00) 2014-03-04 07:17:08 UTC
Created attachment 270872 [details] [review]
vaapidecode: store the upstream GL context

This is a proof of concept patch for proper integration with gst-plugins-gl.  Consider this a RFC :)
Comment 2 Matthew Waters (ystreet00) 2014-03-04 08:48:42 UTC
Created attachment 270876 [details] [review]
vaapidecode: store the upstream GL context

The previous patch contained an unrelated change
Comment 3 Gwenole Beauchesne 2014-07-29 04:20:45 UTC
Hi,

(In reply to comment #1)
> Created an attachment (id=270872) [details] [review]
> vaapidecode: store the upstream GL context
> 
> This is a proof of concept patch for proper integration with gst-plugins-gl. 
> Consider this a RFC :)

Is this still the patch you recommend with the existing gstgl code, that evolved much since that submission? :)

I plan to release gstreamer-vaapi 0.5.9 and look into this afterwards if this is still needed. Thanks.
Comment 4 Matthew Waters (ystreet00) 2014-07-29 06:42:24 UTC
At the moment I think it is a theoretically issue.  IIRC libgstgl worked around it by delaying context destruction.
Comment 5 Gwenole Beauchesne 2014-12-03 12:21:19 UTC
(In reply to comment #4)
> At the moment I think it is a theoretically issue.  IIRC libgstgl worked around
> it by delaying context destruction.

I will rework your patch to match the current code, and align with the new EGL backend needs.

BTW, I also plan to s/upstream/downstream/ in the comment since this is where the GstGLContext originates from when we are in ::decide_allocation(). :)
Comment 6 Gwenole Beauchesne 2015-02-24 14:44:20 UTC
commit d9c082168b64ea7175dd2b469e1955d2d79e39e3
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Wed Dec 3 14:14:30 2014 +0100

    plugins: record downstream GstGLContext.
    
    Record GL context supplied by downstream elements. This can be useful,
    and further needed, to enforce run-time check that the GL context is
    compatible for use by libgstvaapi. e.g. check that we don't create a
    VA/GLX display for EGL/X11 contexts.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725643
    
    Original-path-by: Matthew Waters <ystreet00@gmail.com>