Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreadSanitizer: data race engineworkerscheduler.cpp:21 in EngineWorkerScheduler::workerReady() #13893

Open
m0dB opened this issue Nov 17, 2024 · 0 comments
Labels

Comments

@m0dB
Copy link
Contributor

m0dB commented Nov 17, 2024

Bug Description

So this comment in EngineWorkerSchedule is wrong:

    // Wake the scheduler if we have written a worker-ready message to the
    // scheduler. There is no race condition in accessing this boolean because
    // both workerReady and runWorkers are called from the callback thread.
Details

WARNING: ThreadSanitizer: data race (pid=32552)
  Write of size 1 at 0x00011c6803f0 by main thread (mutexes: write M0, write M1, write M2):
    #0 EngineWorkerScheduler::workerReady() engineworkerscheduler.cpp:21 (mixxx:arm64+0x10099ab6c)
    #1 EngineWorker::workReady() engineworker.cpp:29 (mixxx:arm64+0x100999f98)
    #2 CachingReaderWorker::newTrack(std::__1::shared_ptr<Track>) cachingreaderworker.cpp:99 (mixxx:arm64+0x1008c6af4)
    #3 CachingReader::newTrack(std::__1::shared_ptr<Track>) cachingreader.cpp:218 (mixxx:arm64+0x1008aeed8)
    #4 EngineBuffer::loadTrack(std::__1::shared_ptr<Track>, bool, EngineChannel*) enginebuffer.cpp:1527 (mixxx:arm64+0x100978514)
    #5 BaseTrackPlayerImpl::slotLoadTrack(std::__1::shared_ptr<Track>, bool) basetrackplayer.cpp:539 (mixxx:arm64+0x100e8b11c)
    #6 PlayerManager::slotLoadTrackIntoNextAvailableDeck(std::__1::shared_ptr<Track>) playermanager.cpp:766 (mixxx:arm64+0x100eaf3d4)
    #7 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<std::__1::shared_ptr<Track>>, void, void (PlayerManager::*)(std::__1::shared_ptr<Track>)>::call(void (PlayerManager::*)(std::__1::shared_ptr<Track>), PlayerManager*, void**) qobjectdefs_impl.h:137 (mixxx:arm64+0x100ebf830)
    #8 void QtPrivate::FunctionPointer<void (PlayerManager::*)(std::__1::shared_ptr<Track>)>::call<QtPrivate::List<std::__1::shared_ptr<Track>>, void>(void (PlayerManager::*)(std::__1::shared_ptr<Track>), PlayerManager*, void**) qobjectdefs_impl.h:174 (mixxx:arm64+0x100ebf6cc)
    #9 QtPrivate::QSlotObject<void (PlayerManager::*)(std::__1::shared_ptr<Track>), QtPrivate::List<std::__1::shared_ptr<Track>>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:432 (mixxx:arm64+0x100ebf530)
    #10 void doActivate<false>(QObject*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fd96c)
    #11 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fc5ec)
    #12 Library::loadTrack(std::__1::shared_ptr<Track>) moc_library.cpp:778 (mixxx:arm64+0x100ca27fc)
    #13 Library::slotLoadTrack(std::__1::shared_ptr<Track>) library.cpp:548 (mixxx:arm64+0x100ca34a4)
    #14 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<std::__1::shared_ptr<Track>>, void, void (Library::*)(std::__1::shared_ptr<Track>)>::call(void (Library::*)(std::__1::shared_ptr<Track>), Library*, void**) qobjectdefs_impl.h:137 (mixxx:arm64+0x100cb6bf8)
    #15 void QtPrivate::FunctionPointer<void (Library::*)(std::__1::shared_ptr<Track>)>::call<QtPrivate::List<std::__1::shared_ptr<Track>>, void>(void (Library::*)(std::__1::shared_ptr<Track>), Library*, void**) qobjectdefs_impl.h:174 (mixxx:arm64+0x100cb6a94)
    #16 QtPrivate::QSlotObject<void (Library::*)(std::__1::shared_ptr<Track>), QtPrivate::List<std::__1::shared_ptr<Track>>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:432 (mixxx:arm64+0x100cb68f8)
    #17 void doActivate<false>(QObject*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fd96c)
    #18 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fc5ec)
    #19 WLibraryTableView::loadTrack(std::__1::shared_ptr<Track>) moc_wlibrarytableview.cpp:360 (mixxx:arm64+0x101478a78)
    #20 WTrackTableView::slotMouseDoubleClicked(QModelIndex const&) wtracktableview.cpp:404 (mixxx:arm64+0x101535fe4)
    #21 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QModelIndex const&>, void, void (WTrackTableView::*)(QModelIndex const&)>::call(void (WTrackTableView::*)(QModelIndex const&), WTrackTableView*, void**) qobjectdefs_impl.h:137 (mixxx:arm64+0x101542c44)
    #22 void QtPrivate::FunctionPointer<void (WTrackTableView::*)(QModelIndex const&)>::call<QtPrivate::List<QModelIndex const&>, void>(void (WTrackTableView::*)(QModelIndex const&), WTrackTableView*, void**) qobjectdefs_impl.h:174 (mixxx:arm64+0x101542af0)
    #23 QtPrivate::QSlotObject<void (WTrackTableView::*)(QModelIndex const&), QtPrivate::List<QModelIndex const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:432 (mixxx:arm64+0x101542954)
    #24 void doActivate<false>(QObject*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fd96c)
    #25 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fc5ec)
    #26 QAbstractItemView::mouseDoubleClickEvent(QMouseEvent*) <null>:196429892 (mixxx:arm64+0x102734c18)
    #27 QWidget::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102467dec)
    #28 QFrame::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102511588)
    #29 QAbstractScrollArea::viewportEvent(QEvent*) <null>:196429892 (mixxx:arm64+0x10250d1d0)
    #30 QAbstractItemView::viewportEvent(QEvent*) <null>:196429892 (mixxx:arm64+0x102732958)
    #31 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x10250e5c8)
    #32 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x100093830)
    #33 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed014)
    #34 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023f0460)
    #35 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #36 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #37 QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000942ec)
    #38 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) <null>:196429892 (mixxx:arm64+0x1023ed8f0)
    #39 QWidgetWindow::handleMouseEvent(QMouseEvent*) <null>:196429892 (mixxx:arm64+0x102485544)
    #40 QWidgetWindow::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102483e3c)
    #41 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #42 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ee5e4)
    #43 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #44 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #45 QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000942ec)
    #46 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) <null>:196429892 (mixxx:arm64+0x1029251f4)
    #47 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) <null>:196429892 (mixxx:arm64+0x102923fa4)
    #48 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) <null>:196429892 (mixxx:arm64+0x102984958)
    #49 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) <null>:196429892 (mixxx:arm64+0x102df5324)
    #50 QCoreApplication::exec() <null>:196429892 (mixxx:arm64+0x100093f5c)
    #51 QGuiApplication::exec() <null>:196429892 (mixxx:arm64+0x102923200)
    #52 QApplication::exec() <null>:196429892 (mixxx:arm64+0x1023ee318)
    #53 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:108 (mixxx:arm64+0x10000d754)
    #54 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Previous read of size 1 at 0x00011c6803f0 by thread T72 (mutexes: write M3, write M4):
    #0 EngineWorkerScheduler::runWorkers() engineworkerscheduler.cpp:34 (mixxx:arm64+0x10099ad9c)
    #1 EngineMixer::process(int) enginemixer.cpp:820 (mixxx:arm64+0x10098c9f4)
    #2 SoundManager::onDeviceOutputCallback(long) soundmanager.cpp:599 (mixxx:arm64+0x10115ee50)
    #3 SoundDevicePortAudio::callbackProcessClkRef(long, float*, float const*, PaStreamCallbackTimeInfo const*, unsigned long) sounddeviceportaudio.cpp:1015 (mixxx:arm64+0x101156b70)
    #4 (anonymous namespace)::paV19CallbackClkRef(void const*, void*, unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*) sounddeviceportaudio.cpp:69 (mixxx:arm64+0x101153cb0)
    #5 AdaptingOutputOnlyProcess <null>:196429892 (mixxx:arm64+0x101a943c4)
    #6 PaUtil_EndBufferProcessing <null>:196429892 (mixxx:arm64+0x101a9258c)
    #7 AudioIOProc <null>:196429892 (mixxx:arm64+0x101a9c8d4)
    #8 <null> <null>:196429892 (CoreAudio:arm64e+0xa8d8)

  Location is heap block of size 72 at 0x00011c6803e0 allocated by main thread:
    #0 operator new(unsigned long) <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x83de0)
    #1 EngineMixer::EngineMixer(QSharedPointer<ConfigObject<ConfigValue>>, QString const&, EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>, bool) enginemixer.cpp:67 (mixxx:arm64+0x100983538)
    #2 EngineMixer::EngineMixer(QSharedPointer<ConfigObject<ConfigValue>>, QString const&, EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>, bool) enginemixer.cpp:52 (mixxx:arm64+0x100982df8)
    #3 EngineMixer* std::__1::construct_at[abi:v160006]<EngineMixer, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool, EngineMixer*>(EngineMixer*, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) construct_at.h:38 (mixxx:arm64+0x100627010)
    #4 void std::__1::allocator_traits<std::__1::allocator<EngineMixer>>::construct[abi:v160006]<EngineMixer, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool, void, void>(std::__1::allocator<EngineMixer>&, EngineMixer*, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) allocator_traits.h:304 (mixxx:arm64+0x100626c84)
    #5 std::__1::__shared_ptr_emplace<EngineMixer, std::__1::allocator<EngineMixer>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool>(std::__1::allocator<EngineMixer>, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) shared_ptr.h:284 (mixxx:arm64+0x100626af0)
    #6 std::__1::__shared_ptr_emplace<EngineMixer, std::__1::allocator<EngineMixer>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool>(std::__1::allocator<EngineMixer>, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) shared_ptr.h:276 (mixxx:arm64+0x100626508)
    #7 std::__1::shared_ptr<EngineMixer> std::__1::allocate_shared[abi:v160006]<EngineMixer, std::__1::allocator<EngineMixer>, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool, void>(std::__1::allocator<EngineMixer> const&, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) shared_ptr.h:995 (mixxx:arm64+0x1006262ec)
    #8 std::__1::shared_ptr<EngineMixer> std::__1::make_shared[abi:v160006]<EngineMixer, QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*, std::__1::shared_ptr<ChannelHandleFactory>&, bool, void>(QSharedPointer<ConfigObject<ConfigValue>>&, char const (&) [9], EffectsManager*&&, std::__1::shared_ptr<ChannelHandleFactory>&, bool&&) shared_ptr.h:1004 (mixxx:arm64+0x100618898)
    #9 mixxx::CoreServices::initialize(QApplication*) coreservices.cpp:264 (mixxx:arm64+0x100616c28)
    #10 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:87 (mixxx:arm64+0x10000d5f4)
    #11 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Mutex M0 (0x000111a0e668) created at:
    #0 pthread_mutex_init <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x30e30)
    #1 <null> <null>:196429892 (CoreAudio:arm64e+0x7041c)
    #2 AudioUnitManager::AudioUnitManager(AVAudioUnitComponent*, AudioUnitInstantiationType) audiounitmanager.mm:22 (mixxx:arm64+0x1015c8e28)
    #3 AudioUnitManager::AudioUnitManager(AVAudioUnitComponent*, AudioUnitInstantiationType) audiounitmanager.mm:11 (mixxx:arm64+0x1015c92f8)
    #4 AudioUnitManifest::AudioUnitManifest(QString const&, AVAudioUnitComponent*) audiounitmanifest.mm:23 (mixxx:arm64+0x1015d0228)
    #5 AudioUnitManifest::AudioUnitManifest(QString const&, AVAudioUnitComponent*) audiounitmanifest.mm:12 (mixxx:arm64+0x1015d0af0)
    #6 AudioUnitBackend::loadAudioUnits() audiounitbackend.mm:102 (mixxx:arm64+0x1015bed08)
    #7 AudioUnitBackend::AudioUnitBackend() audiounitbackend.mm:22 (mixxx:arm64+0x1015be7cc)
    #8 AudioUnitBackend::AudioUnitBackend() audiounitbackend.mm:21 (mixxx:arm64+0x1015be684)
    #9 createAudioUnitBackend() audiounitbackend.mm:111 (mixxx:arm64+0x1015be5dc)
    #10 EffectsBackendManager::EffectsBackendManager() effectsbackendmanager.cpp:22 (mixxx:arm64+0x1007ac2cc)
    #11 EffectsBackendManager::EffectsBackendManager() effectsbackendmanager.cpp:15 (mixxx:arm64+0x1007ac9f8)
    #12 EffectsManager::EffectsManager(QSharedPointer<ConfigObject<ConfigValue>>, std::__1::shared_ptr<ChannelHandleFactory>) effectsmanager.cpp:34 (mixxx:arm64+0x100807cfc)
    #13 EffectsManager::EffectsManager(QSharedPointer<ConfigObject<ConfigValue>>, std::__1::shared_ptr<ChannelHandleFactory>) effectsmanager.cpp:31 (mixxx:arm64+0x1008091d8)
    #14 EffectsManager* std::__1::construct_at[abi:v160006]<EffectsManager, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&, EffectsManager*>(EffectsManager*, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) construct_at.h:38 (mixxx:arm64+0x100625a30)
    #15 void std::__1::allocator_traits<std::__1::allocator<EffectsManager>>::construct[abi:v160006]<EffectsManager, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&, void, void>(std::__1::allocator<EffectsManager>&, EffectsManager*, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) allocator_traits.h:304 (mixxx:arm64+0x100625710)
    #16 std::__1::__shared_ptr_emplace<EffectsManager, std::__1::allocator<EffectsManager>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&>(std::__1::allocator<EffectsManager>, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) shared_ptr.h:284 (mixxx:arm64+0x1006255ac)
    #17 std::__1::__shared_ptr_emplace<EffectsManager, std::__1::allocator<EffectsManager>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&>(std::__1::allocator<EffectsManager>, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) shared_ptr.h:276 (mixxx:arm64+0x100624ff4)
    #18 std::__1::shared_ptr<EffectsManager> std::__1::allocate_shared[abi:v160006]<EffectsManager, std::__1::allocator<EffectsManager>, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&, void>(std::__1::allocator<EffectsManager> const&, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) shared_ptr.h:995 (mixxx:arm64+0x100624e08)
    #19 std::__1::shared_ptr<EffectsManager> std::__1::make_shared[abi:v160006]<EffectsManager, QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&, void>(QSharedPointer<ConfigObject<ConfigValue>>&, std::__1::shared_ptr<ChannelHandleFactory>&) shared_ptr.h:1004 (mixxx:arm64+0x100618770)
    #20 mixxx::CoreServices::initialize(QApplication*) coreservices.cpp:262 (mixxx:arm64+0x100616bac)
    #21 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:87 (mixxx:arm64+0x10000d5f4)
    #22 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Mutex M1 (0x000110c60dc0) created at:
    #0 __tsan_mutex_post_lock <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x4707c)
    #1 QRecursiveMutex::tryLock(int) <null>:196429892 (mixxx:arm64+0x1002234dc)
    #2 QRecursiveMutex::lock() qmutex.h:201 (mixxx:arm64+0x1009096d8)
    #3 QMutexLocker<QRecursiveMutex>::QMutexLocker(QRecursiveMutex*) qmutex.h:235 (mixxx:arm64+0x100909658)
    #4 QMutexLocker<QRecursiveMutex>::QMutexLocker(QRecursiveMutex*) qmutex.h:232 (mixxx:arm64+0x1009095a8)
    #5 lockMutex(QRecursiveMutex*) qmutex.h:38 (mixxx:arm64+0x1008ffdd0)
    #6 PlayerManager::addMicrophone() playermanager.cpp:536 (mixxx:arm64+0x100eb7894)
    #7 mixxx::CoreServices::initialize(QApplication*) coreservices.cpp:302 (mixxx:arm64+0x100616f6c)
    #8 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:87 (mixxx:arm64+0x10000d5f4)
    #9 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Mutex M2 (0x000110c60db0) created at:
    #0 __tsan_mutex_post_lock <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x4707c)
    #1 QRecursiveMutex::tryLock(int) <null>:196429892 (mixxx:arm64+0x100223500)
    #2 QRecursiveMutex::lock() qmutex.h:201 (mixxx:arm64+0x1009096d8)
    #3 QMutexLocker<QRecursiveMutex>::QMutexLocker(QRecursiveMutex*) qmutex.h:235 (mixxx:arm64+0x100909658)
    #4 QMutexLocker<QRecursiveMutex>::QMutexLocker(QRecursiveMutex*) qmutex.h:232 (mixxx:arm64+0x1009095a8)
    #5 lockMutex(QRecursiveMutex*) qmutex.h:38 (mixxx:arm64+0x1008ffdd0)
    #6 PlayerManager::addMicrophone() playermanager.cpp:536 (mixxx:arm64+0x100eb7894)
    #7 mixxx::CoreServices::initialize(QApplication*) coreservices.cpp:302 (mixxx:arm64+0x100616f6c)
    #8 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:87 (mixxx:arm64+0x10000d5f4)
    #9 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Mutex M3 (0x000130617618) created at:
    #0 pthread_mutex_init <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x30e30)
    #1 HALB_Mutex::HALB_Mutex() <null>:196429892 (CoreAudio:arm64e+0x582f70)
    #2 Pa_Initialize <null>:196429892 (mixxx:arm64+0x101a8fb0c)
    #3 SoundManager::queryDevicesPortaudio() soundmanager.cpp:261 (mixxx:arm64+0x10115af0c)
    #4 SoundManager::queryDevices() soundmanager.cpp:239 (mixxx:arm64+0x1011592d0)
    #5 SoundManager::SoundManager(QSharedPointer<ConfigObject<ConfigValue>>, EngineMixer*) soundmanager.cpp:77 (mixxx:arm64+0x101158d24)
    #6 SoundManager::SoundManager(QSharedPointer<ConfigObject<ConfigValue>>, EngineMixer*) soundmanager.cpp:59 (mixxx:arm64+0x101159530)
    #7 SoundManager* std::__1::construct_at[abi:v160006]<SoundManager, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*, SoundManager*>(SoundManager*, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) construct_at.h:38 (mixxx:arm64+0x100628398)
    #8 void std::__1::allocator_traits<std::__1::allocator<SoundManager>>::construct[abi:v160006]<SoundManager, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*, void, void>(std::__1::allocator<SoundManager>&, SoundManager*, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) allocator_traits.h:304 (mixxx:arm64+0x100628078)
    #9 std::__1::__shared_ptr_emplace<SoundManager, std::__1::allocator<SoundManager>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*>(std::__1::allocator<SoundManager>, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) shared_ptr.h:284 (mixxx:arm64+0x100627f14)
    #10 std::__1::__shared_ptr_emplace<SoundManager, std::__1::allocator<SoundManager>>::__shared_ptr_emplace[abi:v160006]<QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*>(std::__1::allocator<SoundManager>, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) shared_ptr.h:276 (mixxx:arm64+0x10062795c)
    #11 std::__1::shared_ptr<SoundManager> std::__1::allocate_shared[abi:v160006]<SoundManager, std::__1::allocator<SoundManager>, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*, void>(std::__1::allocator<SoundManager> const&, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) shared_ptr.h:995 (mixxx:arm64+0x100627770)
    #12 std::__1::shared_ptr<SoundManager> std::__1::make_shared[abi:v160006]<SoundManager, QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*, void>(QSharedPointer<ConfigObject<ConfigValue>>&, EngineMixer*&&) shared_ptr.h:1004 (mixxx:arm64+0x1006189e4)
    #13 mixxx::CoreServices::initialize(QApplication*) coreservices.cpp:274 (mixxx:arm64+0x100616cb8)
    #14 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:87 (mixxx:arm64+0x10000d5f4)
    #15 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Mutex M4 (0x000111a29b60) created at:
    #0 pthread_mutex_init <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x30e30)
    #1 CADeprecated::CAMutex::CAMutex(char const*) <null>:196429892 (libAudioToolboxUtility.dylib:arm64e+0x2920c)
    #2 OpenStream <null>:196429892 (mixxx:arm64+0x101a99de8)
    #3 Pa_OpenStream <null>:196429892 (mixxx:arm64+0x101a90bf4)
    #4 SoundDevicePortAudio::open(bool, int) sounddeviceportaudio.cpp:339 (mixxx:arm64+0x101153010)
    #5 SoundManager::setupDevices() soundmanager.cpp:475 (mixxx:arm64+0x10115c86c)
    #6 MixxxMainWindow::initialize() mixxxmainwindow.cpp:346 (mixxx:arm64+0x100f170b8)
    #7 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MixxxMainWindow::*)()>::call(void (MixxxMainWindow::*)(), MixxxMainWindow*, void**) qobjectdefs_impl.h:137 (mixxx:arm64+0x100f2b8f8)
    #8 void QtPrivate::FunctionPointer<void (MixxxMainWindow::*)()>::call<QtPrivate::List<>, void>(void (MixxxMainWindow::*)(), MixxxMainWindow*, void**) qobjectdefs_impl.h:174 (mixxx:arm64+0x100f2b7c4)
    #9 QtPrivate::QSlotObject<void (MixxxMainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:432 (mixxx:arm64+0x100f2b628)
    #10 void doActivate<false>(QObject*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fd96c)
    #11 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fc5ec)
    #12 WInitialGLWidget::onInitialized() moc_winitialglwidget.cpp:160 (mixxx:arm64+0x1015b4194)
    #13 WInitialGLWidget::initializeGL() winitialglwidget.cpp:17 (mixxx:arm64+0x1015b46b0)
    #14 OpenGLWindow::initializeGL() openglwindow.cpp:31 (mixxx:arm64+0x1015b14d4)
    #15 QOpenGLWindowPrivate::initialize() <null>:196429892 (mixxx:arm64+0x10233db2c)
    #16 QOpenGLWindow::resizeEvent(QResizeEvent*) <null>:196429892 (mixxx:arm64+0x10233eb1c)
    #17 QWindow::event(QEvent*) <null>:196429892 (mixxx:arm64+0x10297c7cc)
    #18 QPaintDeviceWindow::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102945890)
    #19 OpenGLWindow::event(QEvent*) openglwindow.cpp:70 (mixxx:arm64+0x1015b1818)
    #20 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #21 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ee5e4)
    #22 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #23 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #24 QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000942ec)
    #25 QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) <null>:196429892 (mixxx:arm64+0x10292788c)
    #26 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) <null>:196429892 (mixxx:arm64+0x1029239e8)
    #27 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) <null>:196429892 (mixxx:arm64+0x102984958)
    #28 QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) <null>:196429892 (mixxx:arm64+0x1029843d8)
    #29 QCocoaWindow::handleGeometryChange() <null>:196429892 (mixxx:arm64+0x102e158a0)
    #30 QWindow::show() <null>:196429892 (mixxx:arm64+0x102973750)
    #31 QWindowContainer::event(QEvent*) <null>:196429892 (mixxx:arm64+0x10248ade8)
    #32 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #33 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ef7c4)
    #34 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #35 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #36 QCoreApplication::sendEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x10009428c)
    #37 QWidgetPrivate::show_helper() <null>:196429892 (mixxx:arm64+0x102465d5c)
    #38 QWidgetPrivate::setVisible(bool) <null>:196429892 (mixxx:arm64+0x1024677bc)
    #39 QWidget::setVisible(bool) <null>:196429892 (mixxx:arm64+0x102466f9c)
    #40 QWidget::show() <null>:196429892 (mixxx:arm64+0x102465b74)
    #41 WGLWidget::showEvent(QShowEvent*) wglwidgetqopengl.cpp:44 (mixxx:arm64+0x1015b3ab4)
    #42 QWidget::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102467dec)
    #43 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #44 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ef7c4)
    #45 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #46 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #47 QCoreApplication::sendEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x10009428c)
    #48 QWidgetPrivate::show_helper() <null>:196429892 (mixxx:arm64+0x102465d5c)
    #49 QWidgetPrivate::setVisible(bool) <null>:196429892 (mixxx:arm64+0x1024677bc)
    #50 QWidget::setVisible(bool) <null>:196429892 (mixxx:arm64+0x102466f9c)
    #51 QWidget::show() <null>:196429892 (mixxx:arm64+0x102465b74)
    #52 MixxxMainWindow::initializeQOpenGL() mixxxmainwindow.cpp:161 (mixxx:arm64+0x100f15d38)
    #53 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:92 (mixxx:arm64+0x10000d600)
    #54 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

  Thread T72 (tid=16334781, running) created by main thread at:
    #0 pthread_create <null>:196429892 (libclang_rt.tsan_osx_dynamic.dylib:arm64e+0x2ffec)
    #1 HALB_IOThread::DispatchPThread(void* (*)(void*), void*) <null>:196429892 (CoreAudio:arm64e+0x332910)
    #2 Pa_StartStream <null>:196429892 (mixxx:arm64+0x101a90e6c)
    #3 SoundDevicePortAudio::open(bool, int) sounddeviceportaudio.cpp:364 (mixxx:arm64+0x1011531ac)
    #4 SoundManager::setupDevices() soundmanager.cpp:475 (mixxx:arm64+0x10115c86c)
    #5 MixxxMainWindow::initialize() mixxxmainwindow.cpp:346 (mixxx:arm64+0x100f170b8)
    #6 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MixxxMainWindow::*)()>::call(void (MixxxMainWindow::*)(), MixxxMainWindow*, void**) qobjectdefs_impl.h:137 (mixxx:arm64+0x100f2b8f8)
    #7 void QtPrivate::FunctionPointer<void (MixxxMainWindow::*)()>::call<QtPrivate::List<>, void>(void (MixxxMainWindow::*)(), MixxxMainWindow*, void**) qobjectdefs_impl.h:174 (mixxx:arm64+0x100f2b7c4)
    #8 QtPrivate::QSlotObject<void (MixxxMainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:432 (mixxx:arm64+0x100f2b628)
    #9 void doActivate<false>(QObject*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fd96c)
    #10 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) <null>:196429892 (mixxx:arm64+0x1000fc5ec)
    #11 WInitialGLWidget::onInitialized() moc_winitialglwidget.cpp:160 (mixxx:arm64+0x1015b4194)
    #12 WInitialGLWidget::initializeGL() winitialglwidget.cpp:17 (mixxx:arm64+0x1015b46b0)
    #13 OpenGLWindow::initializeGL() openglwindow.cpp:31 (mixxx:arm64+0x1015b14d4)
    #14 QOpenGLWindowPrivate::initialize() <null>:196429892 (mixxx:arm64+0x10233db2c)
    #15 QOpenGLWindow::resizeEvent(QResizeEvent*) <null>:196429892 (mixxx:arm64+0x10233eb1c)
    #16 QWindow::event(QEvent*) <null>:196429892 (mixxx:arm64+0x10297c7cc)
    #17 QPaintDeviceWindow::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102945890)
    #18 OpenGLWindow::event(QEvent*) openglwindow.cpp:70 (mixxx:arm64+0x1015b1818)
    #19 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #20 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ee5e4)
    #21 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #22 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #23 QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000942ec)
    #24 QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) <null>:196429892 (mixxx:arm64+0x10292788c)
    #25 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) <null>:196429892 (mixxx:arm64+0x1029239e8)
    #26 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) <null>:196429892 (mixxx:arm64+0x102984958)
    #27 QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) <null>:196429892 (mixxx:arm64+0x1029843d8)
    #28 QCocoaWindow::handleGeometryChange() <null>:196429892 (mixxx:arm64+0x102e158a0)
    #29 QWindow::show() <null>:196429892 (mixxx:arm64+0x102973750)
    #30 QWindowContainer::event(QEvent*) <null>:196429892 (mixxx:arm64+0x10248ade8)
    #31 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #32 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ef7c4)
    #33 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #34 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #35 QCoreApplication::sendEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x10009428c)
    #36 QWidgetPrivate::show_helper() <null>:196429892 (mixxx:arm64+0x102465d5c)
    #37 QWidgetPrivate::setVisible(bool) <null>:196429892 (mixxx:arm64+0x1024677bc)
    #38 QWidget::setVisible(bool) <null>:196429892 (mixxx:arm64+0x102466f9c)
    #39 QWidget::show() <null>:196429892 (mixxx:arm64+0x102465b74)
    #40 WGLWidget::showEvent(QShowEvent*) wglwidgetqopengl.cpp:44 (mixxx:arm64+0x1015b3ab4)
    #41 QWidget::event(QEvent*) <null>:196429892 (mixxx:arm64+0x102467dec)
    #42 QApplicationPrivate::notify_helper(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ed03c)
    #43 QApplication::notify(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1023ef7c4)
    #44 MixxxApplication::notify(QObject*, QEvent*) mixxxapplication.cpp:200 (mixxx:arm64+0x100ed9828)
    #45 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x1000932ac)
    #46 QCoreApplication::sendEvent(QObject*, QEvent*) <null>:196429892 (mixxx:arm64+0x10009428c)
    #47 QWidgetPrivate::show_helper() <null>:196429892 (mixxx:arm64+0x102465d5c)
    #48 QWidgetPrivate::setVisible(bool) <null>:196429892 (mixxx:arm64+0x1024677bc)
    #49 QWidget::setVisible(bool) <null>:196429892 (mixxx:arm64+0x102466f9c)
    #50 QWidget::show() <null>:196429892 (mixxx:arm64+0x102465b74)
    #51 MixxxMainWindow::initializeQOpenGL() mixxxmainwindow.cpp:161 (mixxx:arm64+0x100f15d38)
    #52 (anonymous namespace)::runMixxx(MixxxApplication*, CmdlineArgs const&) main.cpp:92 (mixxx:arm64+0x10000d600)
    #53 main main.cpp:243 (mixxx:arm64+0x10000c5f0)

SUMMARY: ThreadSanitizer: data race engineworkerscheduler.cpp:21 in EngineWorkerScheduler::workerReady()

Version

No response

OS

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant