Bug 90242 - BYT: vaInitialize: segfault when playing back h264 video in Kodi media player (with VA-API enabled)
Summary: BYT: vaInitialize: segfault when playing back h264 video in Kodi media player...
Status: RESOLVED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: haihao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-29 16:51 UTC by Joe Konno
Modified: 2015-05-01 09:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Joe Konno 2015-04-29 16:51:55 UTC
Filed on behalf of an end-user-- I do not have the hardware cited so I am unable to personally confirm the bug or verify any fixes. If there is someone in the community with the hardware in question, any help would be appreciated.

End-user reports a crash in the Kodi media player on an Intel Celeron J1800-based platform (formerly Bay Trail). Attempting to play back an h264 video stream in Kodi with VA-API enabled results in a segfault. If VA-API is disabled in Kodi, the segfault is not seen.

Stacktrace as provided by end-user, when playing back the stream in Kodi with VA-API enabled:



Stack trace of thread 8477:
#0  0x00007fd05d0328d7 raise (libc.so.6)
#1  0x00007fd05d03453a abort (libc.so.6)
#2  0x00007fd05d02b47d __assert_fail_base (libc.so.6)
#3  0x00007fd05d02b532 __assert_fail (libc.so.6)
#4  0x00007fd05dafad65 isDRI2Connected (libva-x11.so.1)
#5  0x00007fd05dafc5ed va_DisplayContextGetDriverName (libva-x11.so.1)
#6  0x00007fd05d8e4bfe vaInitialize (libva.so.1)
#7  0x00000000008b3432 _ZN5VAAPI13CVAAPIContext13CreateContextEv (kodi.bin)
#8  0x00000000008b6312 _ZN5VAAPI13CVAAPIContext13EnsureContextEPPS0_PNS_8CDecoderE (kodi.bin)
#9  0x00000000008b87f7 _ZN5VAAPI8CDecoder4OpenEP14AVCodecContext13AVPixelFormatj (kodi.bin)
#10 0x00000000008a1443 _ZN20CDVDVideoCodecFFmpeg9GetFormatEP14AVCodecContextPK13AVPixelFormat (kodi.bin)
#11 0x00007fd05f0e0c21 ff_get_format (libavcodec.so.56)
#12 0x00007fd05ee990c5 get_pixel_format.isra.7 (libavcodec.so.56)
#13 0x00007fd05ee9b720 ff_h264_decode_slice_header (libavcodec.so.56)
#14 0x00007fd05ee59a35 decode_nal_units (libavcodec.so.56)
#15 0x00007fd05ee5b558 h264_decode_frame (libavcodec.so.56)
#16 0x00007fd05f0dde76 avcodec_decode_video2 (libavcodec.so.56)
#17 0x00000000008a009f _ZN20CDVDVideoCodecFFmpeg6DecodeEPhidd (kodi.bin)
#18 0x00000000010684c9 _ZN15CDVDPlayerVideo7ProcessEv (kodi.bin)
#19 0x000000000132e41f _ZN7CThread6ActionEv (kodi.bin)
#20 0x000000000132e6d9 _ZN7CThread12staticThreadEPv (kodi.bin)
#21 0x00007fd064eea52a start_thread (libpthread.so.0)
#22 0x00007fd05d0fe22d __clone (libc.so.6)



Originally reported in the 01.org Linux Graphics forum:
  * https://01.org/linuxgraphics/comment/1180#comment-1180
Comment 1 haihao 2015-04-30 00:27:50 UTC
Could you double check whether you have permission to access the dri device ?
Comment 2 Levente Farkas 2015-04-30 08:27:01 UTC
how can i check it?
Comment 3 Joe Konno 2015-04-30 14:39:13 UTC
@Levente - In the linux distros I've used, the dri device(s) require users be members of the 'video' group. You can double-check by running the following:

$ ls -la /dev/dri/*

Which will get you output something like this:

crw-rw----+ 1 root video 226,   0 Apr 30 07:27 /dev/dri/card0
crw-rw----  1 root video 226,  64 Apr 30 07:27 /dev/dri/controlD64
crw-rw----+ 1 root video 226, 128 Apr 30 07:27 /dev/dri/renderD128

Be sure your user account-- and if kodi has a username associated with it, that one as well-- is added to the 'video' group or whichever group is shown by 'ls'. After that's done, log out of all your desktop sessions entirely and log back in again for the group membership to take effect. (Or reboot, whichever works best).

Once that's done, try playing that video in kodi with va-api enabled.
Comment 4 Levente Farkas 2015-05-01 09:19:07 UTC
first of all i use a fully updated fedora 21. no external packages except rpmfusion's kodi pacakges (and it's dependencies).

media user was not in the video group so i added it. anyway my dri permissions look like this:

[root@media ~]# ll /dev/dri/
total 0
crw-rw---- 1 root video 226,   0 Apr 29 09:18 card0
crw------- 1 root video 226,  64 Apr 29 09:18 controlD64
crw-rw---- 1 root video 226, 128 Apr 29 09:18 renderD128

after adding media to video everything is working. sorry for the false report.


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.