Xorg crashes with assertion failure at dixGetPrivateAddr: Assertion `key->initialized' failed
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
X.Org X server |
Fix Released
|
Unknown
|
||||
xorg-server (Ubuntu) | Status tracked in Plucky | |||||
Focal |
Fix Committed
|
High
|
Matthew Ruffell | |||
Jammy |
Fix Committed
|
High
|
Matthew Ruffell | |||
Noble |
Fix Committed
|
High
|
Matthew Ruffell | |||
Oracular |
Fix Committed
|
High
|
Matthew Ruffell | |||
Plucky |
Fix Released
|
High
|
Matthew Ruffell |
Bug Description
[Impact]
A very common crash in Xorg occurs when an application you are trying to launch
does not call DRI2ScreenInit() before calling DRI2Authenticate() or
DRI2CreateDrawa
This brings down the entire Xserver, and you lose all work.
This isn't just a single application, common ones are gstreamer1.0-vaapi
either invoked as gst-inspect-1.0 or through file manager thumbnailers,
Intel libva, and more.
The solution is to make DRI2Authenticate() and DRI2CreateDrawa
robust to not having had DRI2ScreenInit() called, and to pass the error up
instead of just crashing on the assert.
Stack traces from logs:
Xorg: ../../.
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+
(EE) 1: /lib/x86_
(EE) 2: /lib/x86_
(EE) 3: /lib/x86_
(EE) 4: /lib/x86_
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 5: /lib/x86_
(EE) 6: /lib/x86_
(EE) 7: /usr/lib/xorg/Xorg (DRIMoveBuffers
(EE) 8: /usr/lib/xorg/Xorg (DRI2Authentica
(EE) 9: /usr/lib/xorg/Xorg (DRI2GetParam+
(EE) 10: /usr/lib/xorg/Xorg (SendErrorToCli
(EE) 11: /usr/lib/xorg/Xorg (InitFonts+0x3b3) [0x587abb7a5623]
(EE) 12: /lib/x86_
(EE) 13: /lib/x86_
(EE) 14: /usr/lib/xorg/Xorg (_start+0x25) [0x587abb789685]
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
#0 _XReply (dpy=dpy@
at ../../src/
#1 0x00007ffff752a3d0 in VA_DRI2Authenticate (dpy=dpy@
at ../va/x11/
#2 0x00007ffff7c138ed in va_drm_
#3 0x00007ffff7c135d5 in va_drm_authenticate (fd=6, magic=1) at ../va/drm/
#4 0x00007ffff7c134bd in va_DisplayConte
#5 va_DisplayConte
at ../va/drm/
#6 0x00007ffff781729e in va_new_opendriver (dpy=0x55555558
#7 vaInitialize
(dpy=
#8 0x00007ffff7f496d0 in vaapi_initialize (dpy=0x55555558
#9 0x00007ffff7f6db73 in supports_vaapi (fd=6) at ../gst-
#10 get_default_
at ../gst-
#11 set_device_path (device_
at ../gst-
#12 gst_vaapi_
at ../gst-
#13 0x00007ffff7f4a68b in gst_vaapi_
(data=0x0, init_type=
at ../gst-
#14 gst_vaapi_
(display=
#15 0x00007ffff7f709a1 in gst_vaapi_
#16 0x00007ffff7f0c295 in gst_vaapi_
#17 plugin_init (plugin=
#18 0x00007ffff7e22452 in gst_plugin_
(plugin=
#19 0x00007ffff7e279c0 in _priv_gst_
(filename=
#20 0x00007ffff7e6ed41 in do_plugin_load
(tag=0, filename=
at ../gst/
#21 handle_rx_packet
(payload_
#22 read_one (l=0x555555584a30) at ../gst/
#23 exchange_packets (l=l@entry=
#24 0x00007ffff7e703a8 in _gst_plugin_
#25 0x00005555555551db in main (argc=<optimized out>, argv=<optimized out>) at ../libs/
[Testcase]
Start a fresh VM. Make sure the session is using X Server.
$ sudo apt install gstreamer1.0-vaapi gstreamer1.0-tools
$ gst-inspect-1.0
On plucky, you don't even need to run gst-inspect-1.0, just try log in, you will
quickly find that xserver is broken and you aren't getting a X session today.
Review the backtrace in /var/log/syslog.
If you install a test package from the following ppa, the issue does not occur:
https:/
[Where problems could occur]
We are adding some protection on the xserver side against user-space applications
that incorrectly do not call DRI2ScreenInit() before attempting to construct
a window.
It would be best if all applications would call DRI2ScreenInit(), but if an
applications don't, then we need to not crash the entire xserver.
Regressions could occur in unintended behaviour for applications that can get
away without calling DRI2ScreenInit(), but those applications will likely just
continue working as usual.
If a regression were to occur, it would occur when launching applications in
Xorg desktop environments.
[Other Info]
Duplicate Bugs
--------------
At the time of writing the primary Launchpad bug has 19 duplicate bugs, which
is the most I have ever seen, so this bug impacts a large amount of people.
Upstream Bugs
-------------
https:/
https:/
https:/
https:/
Downstream Bugs
---------------
https:/
Merge Request and Fix
-------
https:/
commit a0834009cfb10b8
From: Doug Brown <email address hidden>
Date: Mon, 15 Jul 2024 19:44:23 -0700
Subject: dri2: Protect against dri2ClientPrivate assertion failures
Link: https:/
This was very recently merged.
description: | updated |
affects: | ubuntu → gdm3 (Ubuntu) |
tags: | added: focal |
summary: |
- login impossible from GUI on fresh Ubuntu 20.04 install + [focal] Xorg crashed with assertion failure (privates.h:121: + dixGetPrivateAddr: Assertion `key->initialized' failed) and call stack + comes from DRIMoveBuffersHelper |
summary: |
- [focal] Xorg crashed with assertion failure (privates.h:121: - dixGetPrivateAddr: Assertion `key->initialized' failed) and call stack - comes from DRIMoveBuffersHelper + [focal] Xorg crashed with assertion failure (usually in a VM) at + [privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed] + and call stack comes from DRIMoveBuffersHelper |
affects: | gdm3 (Ubuntu) → xorg-server (Ubuntu) |
tags: | removed: champagne |
Changed in xorg-server: | |
status: | Unknown → New |
tags: | added: bionic jammy mantic noble |
summary: |
Xorg crashed with assertion failure (usually in a VM) at [privates.h:121/122: dixGetPrivateAddr: Assertion `key->initialized' - failed] and call stack comes from DRIMoveBuffersHelper + failed] |
description: | updated |
tags: | added: sts |
tags: | added: patch |
Changed in xorg-server: | |
status: | New → Fix Released |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1861609/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]