Bug 72660 - Mplayer crashed when decoding FM1_FT_E.264
Summary: Mplayer crashed when decoding FM1_FT_E.264
Status: VERIFIED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: ykzhao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 01:56 UTC by zhenxiang.li
Modified: 2014-01-24 01:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description zhenxiang.li 2013-12-13 01:56:09 UTC
Environment:
--------------
Libva:(master)88ed1ebe960b1c4a7970e12f8df1ed7d7031352a
Libva_intel_driver:(master)355ce947511b9c249c4e39b006a1aeb7aff5fe17
Mplayer:(hwaccel-vaapi)1923fa10ed77bbf8408f2ce312d85a97dab1f0f3

Command line:
--------------
LD_PRELOAD=/root/media_tools/decoder/i965_drv_video_hook_op.so
mplayer -vo vaapi -va vaapi -fps 30 /root/media_tools/decoder/Base_Ext_Main_profile/FM1_FT_E.264

Bug info:
--------------
frame_count = 43eo_hook_op.c, vaPutSurface, 70V:   0.0  42/ 42  0%  5%  0.0% 0 0
used size = 38016
srcx = 0
srcy = 0
srcw = 176
srch = 144
destx = 0
desty = 0
destw = 176
desth = 144
mplayer: i965_decoder_utils.c:286: gen5_fill_avc_ref_idx_state: Assertion `frame_idx < 16' failed.


MPlayer interrupted by signal 6 in module: decode_video
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.
Comment 1 zhenxiang.li 2013-12-13 02:01:20 UTC
It also reproduced on staging branch.
Libva:          (staging)a3097a5b045f4d624ae50949c891351e08588d66
Libva_intel_driver:             (staging)2a61b0d17072bdc5b58608e3dfa2c4f9f8
Comment 2 zhenxiang.li 2013-12-13 03:36:54 UTC
(gdb) bt
#0  0x00007ffff2b4c819 in raise () from /lib64/libc.so.6
#1  0x00007ffff2b4df28 in abort () from /lib64/libc.so.6
#2  0x00007ffff2b457f6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff2b458a2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007fffe946766a in gen5_fill_avc_ref_idx_state (state=state@entry=0x7fffffffc9b0 "\320\327\312VUU", ref_list=ref_list@entry=0x555556cc559c,
    ref_list_count=ref_list_count@entry=1, frame_store=frame_store@entry=0x555556cad638) at i965_decoder_utils.c:286
#5  0x00007fffe9467793 in gen6_send_avc_ref_idx_state_1 (batch=0x555556cad7d0, list=0, ref_list=0x555556cc559c, ref_list_count=1,
    frame_store=0x555556cad638) at i965_decoder_utils.c:309
#6  0x00007fffe9467849 in gen6_send_avc_ref_idx_state (batch=0x555556cad7d0, slice_param=0x555556cc5580, frame_store=0x555556cad638)
    at i965_decoder_utils.c:330
#7  0x00007fffe9458fc8 in gen75_mfd_avc_ref_idx_state (gen7_mfd_context=0x555556cad510, slice_param=0x555556cc5580, pic_param=0x555556cc4910,
    ctx=0x555556becb00) at gen75_mfd.c:937
#8  gen75_mfd_avc_decode_picture (gen7_mfd_context=0x555556cad510, decode_state=0x555556bef8f8, ctx=0x555556becb00) at gen75_mfd.c:1200
#9  gen75_mfd_decode_picture (ctx=0x555556becb00, profile=<optimized out>, codec_state=0x555556bef8f8, hw_context=0x555556cad510) at gen75_mfd.c:3197
#10 0x00007ffff30e01b4 in vaEndPicture (dpy=0x555556becac0, context=33554432) at va.c:1103
#11 0x0000555555e2eaf7 in ?? ()
#12 0x0000555555cefd78 in ?? ()
#13 0x0000555555a65b51 in ?? ()
#14 0x0000555555a8326b in ?? ()
#15 0x0000555555ce80bb in ?? ()
#16 0x00005555557fca50 in ?? ()
#17 0x000055555571126b in ?? ()
#18 0x000055555568fd5d in ?? ()
#19 0x000055555568347e in ?? ()
#20 0x00007ffff2b38b75 in __libc_start_main () from /lib64/libc.so.6
#21 0x000055555568566d in ?? ()
#22 0x00007fffffffe0b8 in ?? ()
#23 0x000000000000001c in ?? ()
#24 0x0000000000000008 in ?? ()
#25 0x00007fffffffe3da in ?? ()
#26 0x00007fffffffe40b in ?? ()
#27 0x00007fffffffe40f in ?? ()
#28 0x00007fffffffe415 in ?? ()
#29 0x00007fffffffe419 in ?? ()
#30 0x00007fffffffe41f in ?? ()
#31 0x00007fffffffe424 in ?? ()
#32 0x00007fffffffe427 in ?? ()
#33 0x0000000000000000 in ?? ()
Comment 3 ykzhao 2014-01-13 01:58:19 UTC
Although the back trace is triggered in intel-vaapi driver, the real issue is caused by the incorrect parameter passed by the mplayer.

Now I add some checks so that it can complain the warning info instead of mplayer crash.

The 0a843549292550e1917baa9e62e04ce2d9e86277 in staging branch includes the corresponding fix.

Will you please try it and see whether the crash issue still exists?

Thanks.
Comment 4 zhenxiang.li 2014-01-14 02:06:12 UTC
warning appeared instead of mplayer crashed:

[VD_FFMPEG] XVMC-accelerated MPEG-2.
WARNING: Invalid reference frame!!!
WARNING: Invalid Slice reference frame list !!!. It is not included in DPB
V:   0.0  73/ 73  0% 234%  0.0% 0 0
...
[h264 @ 0x7f184aa6d260]Missing reference picture, default is 570
[h264 @ 0x7f184aa6d260]Missing reference picture, default is 570
[h264 @ 0x7f184aa6d260]Missing reference picture, default is 570
[h264 @ 0x7f184aa6d260]Missing reference picture, default is 570
V:   0.0 288/288  0% 122%  0.0% 0 0

Exiting... (End of file)

But GPU hang occured:

[   76.695328] [drm] stuck on bsd ring
[   76.695336] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[   76.695339] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[   76.695342] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[   76.695344] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[   76.695345] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[   76.698748] [drm:i915_set_reset_status] *ERROR* bsd ring hung inside bo (0x1df000 ctx 0) at 0x202084
[   83.693765] [drm] stuck on bsd ring
[   83.693853] [drm:i915_set_reset_status] *ERROR* bsd ring hung flushing bo (0x25f000 ctx 0) at 0x177c
[   83.693855] [drm:i915_context_is_banned] *ERROR* context hanging too fast, declaring banned!
Comment 5 ykzhao 2014-01-14 02:54:33 UTC
Yes. After the crash issue disappears, the GPU hang will be triggered. But in fact this is not the driver issue. 
As the mentioned video clip is *BASE* profile, it is not supported by the driver. In such case it is possible that the GPU hang is triggered.
Comment 6 ykzhao 2014-01-15 01:03:01 UTC
So I think that this bug can be marked as close.

For the GPU hang of FM1_FT_E.264 when using mplayer, I think that you can file another bug if it is necessary.

Thanks.
    Yakui
Comment 7 ykzhao 2014-01-17 04:05:49 UTC
After the commit is applied, there is no crash issue.

So this bug will be marked as resolved.

Thanks.
Comment 8 zhenxiang.li 2014-01-24 01:37:07 UTC
This file is removed from nightly testing


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.