On an Intel(R) Core(TM) i3-3220 CPU (on a H77 chipset board), using the following command line (I'll attach the media), I see a GPU hang delivering an error state:
gst-launch-1.0 filesrc location=jet\ car\ from\ the\ bridge\ at\ santapod\ raceway\ central\ day\ 2012\ \(Low\).mp4 ! qtdemux ! vaapidecode ! vaapisink
I can also reproduce the hang with:
gst-launch-1.0 filesrc location=jet\ car\ from\ the\ bridge\ at\ santapod\ raceway\ central\ day\ 2012\ \(Low\).mp4 ! qtdemux ! queue ! vaapidecode ! queue ! vaapisink
I'll attach the media and the error state.
Relevant software versions:
gstreamer-vaapi from git revision a4bd8450
I've built libva without GLX support, so I'm using an X11 display type
Created attachment 102022 [details]
Error state from GPU hang
The error state - shows BSD and BLT rings stuck.
Media file is too big to attach, so I've placed it at:
Created attachment 102060 [details] [review]
a workaround for this issue
The root cause is that the codec layer passes the wrong parameters to the driver. It would be better to fix this issue in gstreamer-vaapi.
The attached patch prevents the GPU from hanging.
Would it be possible to apply this workaround or a similar workaround to the driver, just to ensure that you don't trigger a GPU hang on faulty input data?
(In reply to comment #4)
> The attached patch prevents the GPU from hanging.
> Would it be possible to apply this workaround or a similar workaround to the
> driver, just to ensure that you don't trigger a GPU hang on faulty input
Haihao, please don't workaround, but add a patch that *errors* out if first_mb_in_slice < first_mb_in_slice of the previous slice. Arbitrary Slice Ordering is not supported (baseline profile feature). No need to check the profile, just check for that condition and return an error. Thanks.
I will add the error checking in the driver to avoid GPU hang. Actually the profile of the sample video is constrained profile and there is a *real* bug in gstreamer-vaapi. Gstreamer vaapi mixes up the two consecutive IDR frames and FFmpeg-vaapi doesn't have this issue. So it would be better to fix this issue in gstreamer-vaapi.
Now another patch is pushed to the libva-intel-driver, which will check the first_mb_in_slice field of input slice_parameter. It will return the error status when it fails in the checking and prompts that the issue had better be fixed in upper-middleware.
The commit id is :
Author: Zhao Yakui <email@example.com>
Date: Wed Jul 23 13:46:17 2014 +0800
Add more check of H264 slice param to avoid GPU hang caused by the incorrect parameter
Will you please check it and see whether it work for you?
*** This bug has been marked as a duplicate of bug 76363 ***