Bug 98275 - Segmentation fault when using VAAPI acceleration in VLC after installing oibaf's optimized drivers
Summary: Segmentation fault when using VAAPI acceleration in VLC after installing oiba...
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-15 16:42 UTC by lesserbrute
Modified: 2016-10-19 19:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lesserbrute 2016-10-15 16:42:45 UTC
VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
[00000000017c1088] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000000017d5b38] core playlist: stopping playback
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
Segmentation fault

dmesg:
[138451.878863] vlc[10533]: segfault at 7fcf170d3000 ip 00007fcf54540034 sp 00007fcf260a9080 error 4 in libLLVM-3.9.so.1[7fcf53f2f000+287b000]
Comment 1 Nicolai Hähnle 2016-10-17 08:14:54 UTC
Could you please provide a backtrace of the crash? (Make sure that debug symbol packages are installed.)
Comment 2 lesserbrute 2016-10-17 17:51:51 UTC
(In reply to Nicolai Hähnle from comment #1)
> Could you please provide a backtrace of the crash? (Make sure that debug
> symbol packages are installed.)

libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so

Thread 29 "vlc" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffaa15e700 (LWP 4484)]
0x00007fffc0f9d034 in llvm::cl::AddLiteralOption(llvm::cl::Option&, char const*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1
(gdb) 


=========================================

(gdb) bt
#0  0x00007fffc0f9d034 in llvm::cl::AddLiteralOption(llvm::cl::Option&, char const*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1
#1  0x00007fff90ca6b0a in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1
#2  0x00007ffff7de74ea in call_init (l=<optimized out>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe048, env=env@entry=0x7fffdc044a40) at dl-init.c:72
#3  0x00007ffff7de75fb in call_init (env=0x7fffdc044a40, argv=0x7fffffffe048, argc=2, l=<optimized out>) at dl-init.c:30
#4  _dl_init (main_map=main_map@entry=0x7fff80056ba0, argc=2, argv=0x7fffffffe048, env=0x7fffdc044a40) at dl-init.c:120
#5  0x00007ffff7dec712 in dl_open_worker (a=a@entry=0x7fffaa15d450) at dl-open.c:575
#6  0x00007ffff7de7394 in _dl_catch_error (objname=objname@entry=0x7fffaa15d440, errstring=errstring@entry=0x7fffaa15d448, 
    mallocedp=mallocedp@entry=0x7fffaa15d43f, operate=operate@entry=0x7ffff7dec300 <dl_open_worker>, args=args@entry=0x7fffaa15d450) at dl-error.c:187
#7  0x00007ffff7debbd9 in _dl_open (file=0x7fff80056b40 "/usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so", mode=-2147479294, caller_dlopen=0x7fffcb0bfa6b, 
    nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x7fffdc044a40) at dl-open.c:660
#8  0x00007ffff7797f09 in dlopen_doit (a=a@entry=0x7fffaa15d680) at dlopen.c:66
#9  0x00007ffff7de7394 in _dl_catch_error (objname=0x7fff80054c00, errstring=0x7fff80054c08, mallocedp=0x7fff80054bf8, operate=0x7ffff7797eb0 <dlopen_doit>, 
    args=0x7fffaa15d680) at dl-error.c:187
#10 0x00007ffff7798571 in _dlerror_run (operate=operate@entry=0x7ffff7797eb0 <dlopen_doit>, args=args@entry=0x7fffaa15d680) at dlerror.c:163
#11 0x00007ffff7797fa1 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#12 0x00007fffcb0bfa6b in ?? () from /usr/lib/x86_64-linux-gnu/libva.so.1
#13 0x00007fffcb0c0a97 in vaInitialize () from /usr/lib/x86_64-linux-gnu/libva.so.1
#14 0x00007fff93dfdbcf in Open (i_thread_count=<optimized out>, i_codec_id=<optimized out>, va=0x7fff80055538) at codec/avcodec/vaapi.c:187
#15 Create (p_va=0x7fff80055538, ctx=<optimized out>, fmt=<optimized out>) at codec/avcodec/vaapi.c:593
#16 0x00007ffff7159858 in module_load (obj=obj@entry=0x7fff80055538, m=m@entry=0x6672b0, init=init@entry=0x7fffaa165fd0 <vlc_va_Start>, 
    args=args@entry=0x7fffaa15d958) at modules/modules.c:185
#17 0x00007ffff7159dfe in vlc_module_load (obj=obj@entry=0x7fff80055538, capability=capability@entry=0x7fffaa16d0f8 "hw decoder", name=0x7fff800555b9 "", 
    name@entry=0x7fffaa16d0ec "$avcodec-hw", strict=strict@entry=true, probe=probe@entry=0x7fffaa165fd0 <vlc_va_Start>) at modules/modules.c:277
#18 0x00007fffaa1660b6 in vlc_va_New (obj=obj@entry=0x7fffb4083278, avctx=avctx@entry=0x7fffb40be3c0, fmt=fmt@entry=0x7fffb40832b0) at codec/avcodec/va.c:56
#19 0x00007fffaa161dd4 in ffmpeg_GetFormat (p_context=0x7fffb40be3c0, pi_fmt=0x7fff80055460) at codec/avcodec/video.c:1351
#20 0x00007fffcc3b7b85 in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56
#21 0x00007fffcc07ab25 in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56
#22 0x00007fffcc07dd6f in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56
#23 0x00007fffcc02cc71 in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56
#24 0x00007fffcc2daea5 in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56
#25 0x00007ffff79a26fa in start_thread (arg=0x7fffaa15e700) at pthread_create.c:333
#26 0x00007ffff74d4b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)
Comment 3 Michel Dänzer 2016-10-18 00:31:23 UTC
(In reply to lesserbrute from comment #2)
> #0  0x00007fffc0f9d034 in llvm::cl::AddLiteralOption(llvm::cl::Option&, char
> const*) () from /usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1
> #1  0x00007fff90ca6b0a in ?? () from
> /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1

Looks like both /usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1 and /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1 are getting pulled in. Did you upgrade all Mesa packages to the versions from the PPA?
Comment 4 Andy Furniss 2016-10-18 10:50:37 UTC
(In reply to lesserbrute from comment #0)

> libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so

If obiaf uses recent mesa then the driver name was changed to radeonsi_drv_video.so.

Check if that's in in that dir as well and if it is set 

LIBVA_DRIVER_NAME=radeonsi

Maybe gallium_drv_video.so is left over from older install or something.

I know nothing about how obiaf/distro stuff works so may me talking rubbish.
Comment 5 Andy Furniss 2016-10-18 11:00:07 UTC
Another random observation = If you are only concerned with decode/display/deinterlace it's currently best to use vdpau anyway.

There are bugs with vaapi that don't affect vdpau.
Comment 6 lesserbrute 2016-10-19 18:17:48 UTC
(In reply to Michel Dänzer from comment #3)

> Looks like both /usr/lib/x86_64-linux-gnu/libLLVM-3.9.so.1 and
> /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1 are getting pulled in. Did you
> upgrade all Mesa packages to the versions from the PPA?

I have done apt update / upgrade / dist-uprgade.

libLLVM-3.8.so.1 is a dependency of mesa-va-drivers package which version is 11.2.0-1ubuntu2.2
Comment 7 lesserbrute 2016-10-19 18:18:59 UTC
(In reply to Andy Furniss from comment #5)
> Another random observation = If you are only concerned with
> decode/display/deinterlace it's currently best to use vdpau anyway.
> 
> There are bugs with vaapi that don't affect vdpau.

Can't use VDPAU because it is nvidia specific (I have radeon HD7850)
Comment 8 Alex Deucher 2016-10-19 18:22:59 UTC
(In reply to lesserbrute from comment #7)
> Can't use VDPAU because it is nvidia specific (I have radeon HD7850)

VDPAU is not nvidia specific.  It is supported on radeon hardware as well.
Comment 9 lesserbrute 2016-10-19 19:39:58 UTC
(In reply to Alex Deucher from comment #8)
> (In reply to lesserbrute from comment #7)
> > Can't use VDPAU because it is nvidia specific (I have radeon HD7850)
> 
> VDPAU is not nvidia specific.  It is supported on radeon hardware as well.

Just tried it. VDPAU is working well heavily reducing CPU load. Thank you for advise! So, only VAAPI is broken.


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.