One of the threads is waiting on a lock in Mir's SystemCompositorWindowManager::add_display() - I see no other thread touching that lock, and there's a bug in the lock handling of that class. (See linked branch.)
The SystemCompositorWindowManager::remove_surface() bug may not be the whole problem but needs to be eliminated.
One of the threads is waiting on a lock in Mir's SystemComposito rWindowManager: :add_display( ) - I see no other thread touching that lock, and there's a bug in the lock handling of that class. (See linked branch.)
The SystemComposito rWindowManager: :remove_ surface( ) bug may not be the whole problem but needs to be eliminated.