Skip to content

Fix deadlock with mappings for display controllers#15524

Merged
acolombier merged 1 commit into
mixxxdj:2.6from
daschuer:applyMappingFix
Oct 28, 2025
Merged

Fix deadlock with mappings for display controllers#15524
acolombier merged 1 commit into
mixxxdj:2.6from
daschuer:applyMappingFix

Conversation

@daschuer

Copy link
Copy Markdown
Member

This fixed the deadlock introduced via merging 2.5 to 2.6 that contains the incompatible "concurrent access crasher fix" #14159 and the "controller screen rendering" #11407

This the solution with the second slot called non blocking as discussed in #14606.

@daschuer daschuer added this to the 2.6.0 milestone Oct 23, 2025
@acolombier

Copy link
Copy Markdown
Member

Thanks for looking into this, I will test that ASAP

@acolombier acolombier self-requested a review October 23, 2025 11:33
Comment thread src/controllers/controllermanager.cpp Outdated
ConfigKey("[Controller]", sanitizeDeviceName(pController->getName())), 0);
}

// This needs to be called in a Qt::BlockingQueuedConnection so that the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any way to enforce that / check that at runtime?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we not doing it by adding a thread affinity assertion?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would assert that it is not directly called from a different thread, not that the signalling thread is blocked.

@acolombier acolombier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and unfortunately, this doesn't fix the deadlock, and the main thread still lock due to the blocking connection.

Backtrace is the same.

@daschuer

Copy link
Copy Markdown
Member Author

Interesting. Can you post the backtrace? Which mapping do you use?

@acolombier

Copy link
Copy Markdown
Member

I am using the mapping that it in main and the backtrace is still the same than here: #13653 (comment)
Note that you can reproduce that locally with the dummy screen mapping, the dummy uhid device (see C file in tools folder) and running Mixxx with the screen preview flag

@daschuer

Copy link
Copy Markdown
Member Author

Ah is see the Qt::QueuedConnection flag was lost. Now it should work.

@acolombier acolombier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected! Let's merge and fix forward if anything doesn't work!
Thank you for taking care of that!

@acolombier acolombier merged commit fc6ce90 into mixxxdj:2.6 Oct 28, 2025
14 checks passed
@daschuer daschuer deleted the applyMappingFix branch December 5, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants