Xlib deadlock in GUI thread

Bug #1805559 reported by Be
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Critical
Be
mixxx (Ubuntu)
New
Undecided
Unassigned

Bug Description

[Impact]

Current Mixxx 2.2.0 beta and Mixxx 2.1.3 using 2.2 with RGB (GL) waveforms on XWayland with Qt 5.11.1-9.fc29.x86_64, libX11 1.6.7-1.fc29.x86_64, libxcb 1.13.1-1.fc29.x86_64 causes a GUI deadlock.

The issue can be isolated and fixed with the code posted in comment #11 below. It is not reliable reproducible with the original Mixxx build.

[Test Case]

 * Use Mixxx with the effected setup and verify that there is no GUI deadlock.

[Regression Potential]

None.

[Other Info]

The Cosmic 2.1.3 build is also effected, see: https://bugs.launchpad.net/ubuntu/+source/mixxx/+bug/1804513

Tags: qt5
Revision history for this message
Be (be.ing) wrote :
Revision history for this message
Be (be.ing) wrote :

Note this is a different backtrace than Bug #1789059.

Revision history for this message
Be (be.ing) wrote :

Using xorg-x11-drv-intel-2.99.917-39.20180618.fc29.x86_64 with Intel UHD Graphics 620.

Revision history for this message
Be (be.ing) wrote :

Actually this is the same backtrace in Xlib as Bug #1789059, but now something else in Mixxx is triggering it. Unfortunately the backtrace doesn't seem very helpful in identifying what that is.

Be (be.ing)
Changed in mixxx:
importance: Undecided → Critical
milestone: none → 2.2.0
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I've never seen this issue on Fedora 28/29 on i5-6440HQ with HD Graphics 530.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

...same configuration, i.e. XWayland and RGB (GL) waveforms. I'm using the Deere skin.

Revision history for this message
Be (be.ing) wrote :
Changed in mixxx:
status: New → In Progress
assignee: nobody → Be (be.ing)
Revision history for this message
Be (be.ing) wrote :

I have no idea why no one else has replicated this.

Revision history for this message
Owen Williams (ywwg) wrote :

can you attach gdb while it's locked and inspect memory to see what event is being posted?

Are you using JACK as your audio backend? Do you also get lockups when using a different backend?

Revision history for this message
Be (be.ing) wrote :

I tried, but I don't know how to get any useful information from that. Running "frame Xlib-frame-number" then "info args" and "info local" didn't yield any useful information, I think because I didn't have the source code files for the library. If you have any tips how to get more useful info, please let me know. But at this point, I think the best course of action is to hack around the bug. Considering I have encountered at least two distinct situations (this bug and Bug #1789059) that trigger the same Xlib bug, I'm not confident that if we change Mixxx to not trigger the Xlib bug in this one case that we won't discover more code in Mixxx later that also triggers the Xlib bug.

I do use JACK and I haven't tested if this happens with ALSA, but nothing in the backtrace leads me to suspect this has anything to do with audio processing. The audio thread continues fine when the GUI thread deadlocks, which allows me to recover relatively gracefully by letting the track continue to play till the end, then force quitting and restarting Mixxx.

Revision history for this message
Be (be.ing) wrote :

I have not encountered this bug since https://github.com/mixxxdj/mixxx/pull/1923 was merged. To confirm that did hack around the issue, I applied the workaround to the testcase from https://bugs.freedesktop.org/show_bug.cgi?id=59361 and it does seem to work. Commenting out this line in the attached test case:

applyXDeadlockFix(dpy);

reproduces the bug.

Build the test case with:
gcc -I/usr/include testCase.c -o testCase -lX11-xcb -lX11 -lxcb

Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
tags: added: qt5
description: updated
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9533

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.