[nvidia] totem crashes on startup (assert !xcb_xlib_unknown_req_in_deq) in _XReply because XInitThreads is not called early enough by libx11 (patch included)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Totem |
New
|
Unknown
|
|||
totem (Ubuntu) |
In Progress
|
High
|
xtknight |
Bug Description
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic
totem 43.0-2ubuntu1
proprietary nvidia-driver-525 525.60.
libx11-6 2:1.8.1-2
Totem crashes (most of the time) when opening a video file. When it does crash, it crashes before playing the video at all.
It doesn't crash often when being run under gdb, profilers, or other utilities that may slow down execution. That indicated it may be a threading issue or race condition, and after digging deeper the issue is evident from the assert message.
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
A similar issue happened in SDL, where XInitThreads was *supposed* to be called but wasn't called early enough, specifically by the NVIDIA libGL implementation which I also happen to be using.
https:/
(Attempted to use apport to report this, but for some reason it doesn't want to upload or show me the report. I've included the gdb stack trace here.)
andy@andy-
GNU gdb (Ubuntu 12.1-3ubuntu2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https:/
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from totem...
This GDB supports auto-downloading debuginfo from the following URLs:
https:/
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Reading symbols from /home/andy/
warning: Can't open file /memfd:/.glXXXXXX (deleted) during file-backed mapping note processing
warning: Can't open file /run/user/
warning: Can't open file /memfd:pulseaudio (deleted) during file-backed mapping note processing
warning: Can't open file /memfd:
warning: Can't open file /home/andy/
warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing
[New LWP 747582]
[New LWP 747566]
[New LWP 747568]
[New LWP 747567]
[New LWP 747570]
[New LWP 747572]
[New LWP 747583]
[New LWP 747586]
[New LWP 747578]
[New LWP 747589]
[New LWP 747588]
[New LWP 747590]
[New LWP 747584]
[New LWP 747593]
[New LWP 747587]
[New LWP 747601]
[New LWP 747581]
[New LWP 747597]
[New LWP 747606]
[New LWP 747603]
[New LWP 747579]
[New LWP 747598]
[New LWP 747592]
[New LWP 747591]
[New LWP 747599]
[New LWP 747594]
[New LWP 747596]
[New LWP 747605]
[New LWP 747595]
[New LWP 747602]
[New LWP 747585]
[New LWP 747569]
[New LWP 747600]
[New LWP 747604]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `totem C0109.MP4'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_
Download failed: Invalid argument. Continuing without source file ./nptl/
44 ./nptl/
[Current thread is 1 (Thread 0x7fde2beff6c0 (LWP 747582))]
(gdb) bt
#0 __pthread_
#1 __pthread_
#2 __GI___pthread_kill (threadid=
#3 0x00007fde5e83bc46 in __GI_raise (sig=sig@entry=6) at ../sysdeps/
#4 0x00007fde5e8227fc in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007fde5e82271b in __assert_fail_base
(fmt=
at ./assert/
#6 0x00007fde5e833596 in __GI___assert_fail
(assertion=
#7 0x00007fde5df04dea in dequeue_
#8 0x00007fde5df0d0f3 in _XReply (dpy=0x556f5fdc
#9 0x00007fde3bce05e8 in () at /lib/x86_
#10 0x00007fde3bc92f8a in () at /lib/x86_
#11 0x00007fde3bcde831 in () at /lib/x86_
#12 0x00007fde3bcdec30 in () at /lib/x86_
#13 0x00007fde3a05008b in () at /lib/x86_
#14 0x00007fde3a05209f in () at /lib/x86_
#15 0x00007fde3a145a0a in () at /lib/x86_
#16 0x00007fde3a0fe5f3 in () at /lib/x86_
#17 0x00007fde3a0d674a in () at /lib/x86_
#18 0x00007fde3a132f0a in () at /lib/x86_
#19 0x00007fde3a13c910 in () at /lib/x86_
#20 0x00007fde3a0aadca in () at /lib/x86_
#21 0x00007fde39d4d468 in () at /lib/x86_
#22 0x00007fde39dc3b25 in () at /lib/x86_
#23 0x00007fde3a0f95ce in () at /lib/x86_
#24 0x00007fde39d3dfcd in () at /lib/x86_
#25 0x00007fde39d3e154 in () at /lib/x86_
#26 0x00007fde58114931 in _attach_
#27 gst_gl_
#28 0x00007fde58114b7a in gst_gl_
#29 0x00007fde58103774 in _init_convert_fbo (convert=
#30 _init_convert (convert=<optimized out>) at ../gst-
#31 _do_convert (context=
#32 0x00007fde58126ae7 in _run_message_sync (message=
#33 0x00007fde58126aa6 in _run_message_async (message=
#34 0x00007fde5f5e73cf in g_main_dispatch (context=
#35 g_main_
#36 0x00007fde5f63c228 in g_main_
#37 0x00007fde5f5e6a7f in g_main_loop_run (loop=0x556f60b
#38 0x00007fde5810bd8c in gst_gl_
#39 0x00007fde5f616371 in g_thread_proxy (data=0x556f610
#40 0x00007fde5e890402 in start_thread (arg=<optimized out>) at ./nptl/
#41 0x00007fde5e91f590 in clone3 () at ../sysdeps/
* The commits that cause the problem are:
commit 140d9eea70c3101
Author: Bastien Nocera <email address hidden>
Date: Wed May 4 11:38:02 2022 +0200
main: Rely on libX11 initialising threads
commit 2610b4536f73493
Author: Bastien Nocera <email address hidden>
Date: Wed May 4 11:37:37 2022 +0200
backend: Rely on libX11 initialising threads
Although they were definitely made with good intention, unfortunately they don't play well with the current state of NVIDIA libGL and cause an immediate crash. For now, I've settled on calling XInitThreads in totem again. But it would be better to solve the race condition that calls XInitThreads to be called too late. It seems like this would be happening for anyone using the NVIDIA proprietary driver, but I am not certain on what exact conditions cause this.
Changed in totem: | |
status: | Unknown → New |
tags: | added: nvidia |
summary: |
- totem crashes on startup (assert !xcb_xlib_unknown_req_in_deq) in - _XReply because XInitThreads is not called early enough by libx11 (patch - included) + [nvidia] totem crashes on startup (assert !xcb_xlib_unknown_req_in_deq) + in _XReply because XInitThreads is not called early enough by libx11 + (patch included) |
The attachment "ensure XInitThreads gets called early. reverts totem commits 2610b4536f73493 587e4a5a38e01c9 961fcabb96 and 140d9eea70c3101 ef3234abb4de597 4cb84b13db" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]