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 793889 - vaapisink: Crashes on padded (non-alpha) RGB video with AMD card
vaapisink: Crashes on padded (non-alpha) RGB video with AMD card
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 793890 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-02-27 16:58 UTC by Alicia Boya García
Modified: 2018-11-03 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test vector (indexed color PNG without alpha channel) (144 bytes, image/png)
2018-02-27 17:00 UTC, Alicia Boya García
Details
Backtrace (12.42 KB, text/plain)
2018-02-27 17:12 UTC, Alicia Boya García
Details
Test vector (MP4 raw RGB video) (1.32 MB, video/mp4)
2018-02-28 10:30 UTC, Alicia Boya García
Details

Description Alicia Boya García 2018-02-27 16:58:19 UTC
$ gst-launch-1.0 multifilesrc location="/tmp/white.png" caps="image/png,framerate=\(fraction\)3/1" ! pngdec ! videoconvert ! identity silent=false ! vaapisink -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'vaapisink0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx1";
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = event   ******* (identity0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)116c669c7f52880c9f1b179be1334a19, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x55bdcbc9a8f0
/GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0.GstPad:src: caps = image/png, width=(int)1, height=(int)1, framerate=(fraction)3/1
/GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:sink: caps = image/png, width=(int)1, height=(int)1, framerate=(fraction)3/1
/GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:src: caps = video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)3/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = event   ******* (identity0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)3/1\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1";) 0x7f5cd8005030
/GstPipeline:pipeline0/GstIdentity:identity0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiSink:vaapisink0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstIdentity:identity0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240, framerate=(fraction)3/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)3/1
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = event   ******* (identity0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x55bdcbc9aa40
/GstPipeline:pipeline0/GstIdentity:identity0: last-message = chain   ******* (identity0:sink) (307200 bytes, dts: none, pts: 0:00:00.000000000, duration: 0:00:00.333333333, offset: -1, offset_end: -1, flags: 00000040 discont , meta: GstVideoMeta, GstVaapiVideoMeta) 0x7f5cd8009410
Caught SIGSEGV
  • #0 poll
    from /lib64/libc.so.6
  • #1 g_main_context_iterate.isra
  • #2 g_main_loop_run
    from /lib64/libglib-2.0.so.0
  • #3 gst_bus_poll
    from /lib64/libgstreamer-1.0.so.0
  • #4 event_loop
  • #5 main

Comment 1 Alicia Boya García 2018-02-27 17:00:09 UTC
Created attachment 369045 [details]
Test vector (indexed color PNG without alpha channel)
Comment 2 Alicia Boya García 2018-02-27 17:05:35 UTC
Notice format=(string)BGRx in the output above. Adding a caps filter to use BGRA, or RGBA will avoid the crash. (The color will still be very wrong because of https://bugzilla.gnome.org/show_bug.cgi?id=793886)
Comment 3 Alicia Boya García 2018-02-27 17:12:02 UTC
Created attachment 369047 [details]
Backtrace
Comment 4 Alicia Boya García 2018-02-27 17:14:22 UTC
No output is written to dmesg during the crash.
Comment 5 Alicia Boya García 2018-02-28 10:29:00 UTC
*** Bug 793890 has been marked as a duplicate of this bug. ***
Comment 6 Alicia Boya García 2018-02-28 10:30:05 UTC
Created attachment 369092 [details]
Test vector (MP4 raw RGB video)
Comment 7 Alicia Boya García 2018-02-28 10:30:46 UTC
The attached MP4 file seems to trigger the same crash with a slightly different pixel format (RGB instead of BGRx).
Comment 8 Alicia Boya García 2018-02-28 16:27:01 UTC
(In reply to Alicia Boya García from comment #7)
> The attached MP4 file seems to trigger the same crash with a slightly
> different pixel format (RGB instead of BGRx).

The playbin pipeline includes a videoconvert that converts RGB to RGBx.

RGB is not accepted by vaapisink caps, so the problem only occurs with RGBx and BGRx.
Comment 9 Alicia Boya García 2018-02-28 16:27:33 UTC
The crash can be reproduced with videotestsrc too. All the following segfault:

$ gst-launch-1.0 -v videotestsrc ! video/x-raw, format=RGBx ! vaapisink
$ gst-launch-1.0 -v videotestsrc ! video/x-raw, format=BGRx ! vaapisink
Comment 10 Julien Isorce 2018-03-01 23:23:54 UTC
Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other format (NV12) ? Same result with a tee element in between ? (maybe something woring when the sink proposes a pool)
Comment 11 Julien Isorce 2018-03-01 23:30:03 UTC
Can you try also with GST_VAAPI_ENABLE_DIRECT_RENDERING=0 (not sure if it affects vaapisink though) ?
Comment 12 Alicia Boya García 2018-03-02 16:27:04 UTC
(In reply to Julien Isorce from comment #10)
> Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other
> format (NV12) ? Same result with a tee element in between ? (maybe something
> woring when the sink proposes a pool)

Yes to all.

Name         : mesa-dri-drivers
Version      : 17.3.5
OpenGL renderer string: AMD Radeon (TM) RX 460 Graphics (AMD POLARIS11 / DRM 3.19.0 / 4.14.16-300.fc27.x86_64, LLVM 5.0.0)
Fedora 27
X11

(In reply to Julien Isorce from comment #11)
> Can you try also with GST_VAAPI_ENABLE_DIRECT_RENDERING=0 (not sure if it
> affects vaapisink though) ?

It makes no difference.
Comment 13 Alicia Boya García 2018-03-02 16:30:39 UTC
(In reply to Alicia Boya García from comment #12)
> (In reply to Julien Isorce from comment #10)
> > Thx for the report. Is it also with mesa 17.2.4 ? Does it succeed with other
> > format (NV12) ? Same result with a tee element in between ? (maybe something
> > woring when the sink proposes a pool)
> 
> Yes to all.

I'll be more explicit just in case:

* It is also mesa 17.2.
* It succeeds with NV12.
* It crashes with a tee element in between too.

> Name         : mesa-dri-drivers
> Version      : 17.3.5
Pasted wrong console output, it's actually:

Installed Packages
Name         : mesa-dri-drivers
Version      : 17.2.4
Comment 14 GStreamer system administrator 2018-11-03 15:53:30 UTC
-- 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/gstreamer-vaapi/issues/86.