Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866557 - x11-libs/libva-vdpau-driver: Segfault when using vaGetDisplayDRM (e.g. by www-client/firefox)
Summary: x11-libs/libva-vdpau-driver: Segfault when using vaGetDisplayDRM (e.g. by www...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-25 17:48 UTC by Oliver Freyermuth
Modified: 2022-11-01 09:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2022-08-25 17:48:32 UTC
If x11-libs/libva-vdpau-driver is installed and the system has nvidia graphics, a segfault from Firefox' glxtest is recorded each time firefox is started, or the binary is launched to handle an URL. 

I have raised a bugreport about this in the Mozilla bugtracker:
https://bugzilla.mozilla.org/show_bug.cgi?id=1787182
and have been made aware that the cause is that the depcreacted x11-libs/libva-vdpau-driver library does not support x11-libs/libva-vdpau-driver and crashes. 

Example trace:
---
#0  XDisplayString (dpy=0x0) at /usr/src/debug/x11-libs/libX11-1.8.1/libX11-1.8.1/src/Macros.c:119
#1  0x00007fccbf6a5fc5 in vdpau_common_Initialize (driver_data=0x7fccbd5df200)
    at /usr/src/debug/x11-libs/libva-vdpau-driver-0.7.4-r5/libva-vdpau-driver-0.7.4/src/vdpau_driver.c:188
#2  vdpau_Initialize_Current (ctx=0x7fcccc12fc40) at /usr/src/debug/x11-libs/libva-vdpau-driver-0.7.4-r5/libva-vdpau-driver-0.7.4/src/vdpau_driver_template.h:561
#3  __vaDriverInit_1_15 (ctx=0x7fcccc12fc40) at /usr/src/debug/x11-libs/libva-vdpau-driver-0.7.4-r5/libva-vdpau-driver-0.7.4/src/vdpau_driver.c:317
#4  0x00007fccbf6bce4c in  () at /usr/lib64/libva.so.2
#5  0x00007fccbf6bdfc6 in vaInitialize () at /usr/lib64/libva.so.2
---
vaGetDisplayDRM() doesn't fill ->x11_dpy, causing the segfault. 
More detail in the linked report. 


Reproducible: Always

Steps to Reproduce:
1. Install x11-libs/libva-vdpau-driver on a system with nvidia card. 
2. Launch Firefox, or call the API manually. 

Actual Results:  
Segfault. 

Expected Results:  
Works. 

Reading through the bugreport and looking at the time of the last update of x11-libs/libva-vdpau-driver, it seems questionable whether it is worth fixing the bug or last-riting the package (it seems other distributions have dropped it already). 
Currently, media-tv/kodi[vdpau] seems to depend on it.
Comment 1 Oliver Freyermuth 2022-08-25 17:59:05 UTC
[...] depcreacted x11-libs/libva-vdpau-driver library does not support x11-libs/libva-vdpau-driver and crashes. 
=>
[...] deprecated x11-libs/libva-vdpau-driver library does not support vaGetDisplayDRM and crashes.
Comment 2 Matt Turner gentoo-dev 2022-08-25 21:28:04 UTC
I suspect we should remove x11-libs/libva-vdpau-driver. It's quite dead (see https://cgit.freedesktop.org/vaapi/vdpau-driver/).
Comment 3 Larry the Git Cow gentoo-dev 2022-10-05 21:17:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe906d184b33071f7a9b071c934ae30314a6874

commit 5fe906d184b33071f7a9b071c934ae30314a6874
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-10-05 16:10:57 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-10-05 21:17:26 +0000

    profiles: Mask x11-libs/libva-vdpau-driver for removal
    
    Bug: https://bugs.gentoo.org/584352
    Bug: https://bugs.gentoo.org/833102
    Bug: https://bugs.gentoo.org/852728
    Bug: https://bugs.gentoo.org/866557
    Bug: https://bugs.gentoo.org/875278
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 profiles/package.mask | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2022-10-05 21:19:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca15677f7e919a2c9030e01f4e4bb2c5a566e08

commit 4ca15677f7e919a2c9030e01f4e4bb2c5a566e08
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-10-05 16:10:57 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-10-05 21:18:51 +0000

    profiles: Mask x11-libs/libva-vdpau-driver for removal
    
    Bug: https://bugs.gentoo.org/584352
    Bug: https://bugs.gentoo.org/833102
    Bug: https://bugs.gentoo.org/852728
    Bug: https://bugs.gentoo.org/866557
    Bug: https://bugs.gentoo.org/875278
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 5 Todd Walter 2022-10-14 18:54:27 UTC
(In reply to Matt Turner from comment #2)
> I suspect we should remove x11-libs/libva-vdpau-driver. It's quite dead (see
> https://cgit.freedesktop.org/vaapi/vdpau-driver/).

A replacement based on NVDEC exists at https://github.com/elFarto/nvidia-vaapi-driver/  

I haven't had a chance to test it yet but it compiles successfully.

FWIW
Comment 6 Ahrensy 2022-10-16 12:03:49 UTC
(In reply to Matt Turner from comment #2)
> I suspect we should remove x11-libs/libva-vdpau-driver. It's quite dead (see


Now that x11-libs/libva-vdpau-driver has been masked for removal, I am getting the following:



$ sudo emerge -avuDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

!!! The following update has been skipped due to unsatisfied dependencies:

games-util/steam-client-meta:0

  selected: (games-util/steam-client-meta-0-r20220819:0/0::steam-overlay, installed)
  skipped: (games-util/steam-client-meta-0-r20220819:0/0::steam-overlay, ebuild scheduled for merge) (see unsatisfied dependency below)

emerge: there are no ebuilds to satisfy "x11-libs/libva:0/2[abi_x86_32]".
(dependency required by "games-util/steam-client-meta-0-r20220819::steam-overlay[-steamruntime]" [ebuild])


!!! The following update(s) have been skipped due to unsatisfied dependencies
!!! triggered by backtracking:

games-util/steam-launcher:0

!!! Problems have been detected with your world file
!!! Please run emaint --check world


!!! Ebuilds for the following packages are either all
!!! masked or don't exist:
games-util/steam-launcher

Nothing to merge; quitting.
Comment 7 Ahrensy 2022-10-16 12:07:57 UTC
Further to my above comment, the world check doesn't output anything useful:

$ sudo emaint --check world
Emaint: check world        100% [============================================>]
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-16 16:42:40 UTC
The Steam overlay needs to update from x11-libs -> media-libs for libva:

emerge: there are no ebuilds to satisfy "x11-libs/libva:0/2[abi_x86_32]".
(dependency required by "games-util/steam-client-meta-0-r20220819::steam-overlay[-steamruntime]" [ebuild]).

It's not related to this bug per se.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-16 16:44:11 UTC
(In reply to Sam James from comment #8)
> The Steam overlay needs to update from x11-libs -> media-libs for libva:
> 
> emerge: there are no ebuilds to satisfy "x11-libs/libva:0/2[abi_x86_32]".
> (dependency required by
> "games-util/steam-client-meta-0-r20220819::steam-overlay[-steamruntime]"
> [ebuild]).
> 
> It's not related to this bug per se.

https://github.com/anyc/steam-overlay/issues/319
Comment 10 Larry the Git Cow gentoo-dev 2022-11-01 09:24:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69f9b541579a2462e5b6552fd97bdc21f7610583

commit 69f9b541579a2462e5b6552fd97bdc21f7610583
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-11-01 09:21:20 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-11-01 09:24:27 +0000

    x11-libs/libva-vdpau-driver: Delete
    
    Closes: https://bugs.gentoo.org/584352
    Closes: https://bugs.gentoo.org/833102
    Closes: https://bugs.gentoo.org/852728
    Closes: https://bugs.gentoo.org/866557
    Closes: https://bugs.gentoo.org/875278
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 profiles/package.mask                              |  7 ----
 x11-libs/libva-vdpau-driver/Manifest               |  1 -
 ...vdpau-driver-0.7.4-VAEncH264VUIBufferType.patch | 29 -------------
 ...pau-driver-0.7.4-glext-missing-definition.patch | 16 --------
 ...au-driver-0.7.4-include-linux-videodev2.h.patch | 25 -----------
 .../libva-vdpau-driver-0.7.4-libvdpau-0.8.patch    | 13 ------
 .../libva-vdpau-driver-0.7.4-sigfpe-crash.patch    | 21 ----------
 .../libva-vdpau-driver-0.7.4-r5.ebuild             | 48 ----------------------
 x11-libs/libva-vdpau-driver/metadata.xml           | 12 ------
 9 files changed, 172 deletions(-)