GNOME Bugzilla – Bug 749604
gst vaapi swap buffers in gl_destroy_context crash cogl (eg. totem that use both)
Last modified: 2015-06-17 11:16:03 UTC
Created attachment 303627 [details] Full sequence of events - gstreamer-vaapi gl_destroy_context use of gl swap breaks cogl The hack to swpa buffers in gst-libs/gst/vaapi/gstvaapiutils_glx.c to swap the buffers as an nvidia bug workaround : /* XXX: if buffers were never swapped, the application will crash later with the NVIDIA driver */ if (!cs->swapped_buffers) **gl_swap_buffers (cs);** confuse cogl internal state. cogl segfault in a dereference of info->presentation_time. My current workaround is to comment this nvidia workaround (I am on intel graphics). That is notify_swap_buffers called via glx_event_filter_cb in ./winsys/cogl-winsys-glx.c peek the head of its onscreen->pending_frame_infos but it is left empty. The gst vaapi gl swap add a GLX_BufferSwapComplete in dri2GetSwapEvent called by DRI2WireToEvent as shown in this backtrace:
+ Trace 235076
Full sequence with "push" the CoglFrameInfo, "pop" it, attached.
How I can reproduce the crash? I have compiled totem, played some videos, but was unable to reproduce the crash.
I should have told first my setup : totem 3.14.0.-2 debian cogl 1.18.2-3 debian gstreamer-vaapi git master gstreamer and its plugins 1.5.0.1+git20150513-1 debian may I ask if you compiled totem latest (and if any of the other items differ too). All I have to do is totem <my file> (I tried mpeg2 and mp4 files)
which version of libva and libva-intel-driver are you using?
liva and i965-va-driver are both 1.5.1-2 (debian sid)
Which commit id do you have as master in gstreamer-vaapi?
latest from gitorious . Sorry will switch to github .
indeed unreproducible with github code.
sorry my bad... the crash is still there. the new repo has issues with HEVC which broke gstreamer registration . I was back on software decoding. I fixed those locally (gst/vaapi/Makefile.am h265 encoder.c/. in the encoders list only if USE flag is set) . Also added va_dec_hevc.h and av.h to gst-libs/gst/vaapi/gstvaapidecoder_h265.c to fix build. I plan to send those two fixes in a few hours. Feel free to beat me at that.
(In reply to Alban Browaeys from comment #8) > sorry my bad... the crash is still there. > the new repo has issues with HEVC which broke gstreamer registration . I was > back on software decoding. > > I fixed those locally (gst/vaapi/Makefile.am h265 encoder.c/. in the > encoders list only if USE flag is set) . Aha, that was a stupid mistake from me.Sorry.. Waiting for the patches :) > Also added va_dec_hevc.h and av.h to > gst-libs/gst/vaapi/gstvaapidecoder_h265.c to fix build. > > I plan to send those two fixes in a few hours. Feel free to beat me at that.
(In reply to Alban Browaeys from comment #8) > sorry my bad... the crash is still there. What chipset/GPU are you using? The backtrace of the crash is the same?
Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) The issue I cannot reproduce anymore as setup has evolved (debian unstable switched to gnome 3.16 and ll its dependencies) and is now at : totem 3.16.1-2 cogl 1.20.0-2.1 gstreamer1.0 and its plugins at 1.5.1-1 gstreamer-vaapi github cbc2d15becc33718085c6663f300e5a4cd2b1b18 "vaapipostproc: add color balance interface" Should I close this report ? Closing as obsolete seems far stretched but still the closest. PS: only issue left is totem-video-thumbnailer fails as it does not discard "vaapidecodebin" and "vaapidecode" only the latter (issue already reported to totem as https://bugzilla.gnome.org/show_bug.cgi?id=749605 ) .
(In reply to Alban Browaeys from comment #11) > Should I close this report ? Closing as obsolete seems far stretched but > still the closest. Yes, let's do it. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME. Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.