Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122283

Flaky tst_QSoundEffect and tst_QAudioSink tests on macOS ARM VMs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 6.8
    • Multimedia
    • None
    • macOS

      Flaky tst_QSoundEffect::testSource() and  tst_QAudioSink::pull() tests are flaky (crashes) on macOS with virtual audio device when  calling AudioDeviceGetPropertyInfo and AudioDeviceSetPropertyInfo respectively. Note that the also text to speech audio related tests are also flaky on this VM, but with different call stack.

      We've started getting test results for the macOS ARM VMS, and it seems there is some issues with audio tests. The VM has an audio device, but perhaps it doesn't work the way we expect or have all the required features?

       

      See https://testresults.qt.io/grafana/d/cd9dd101-e171-4255-ad74-f9cbed7fc053/tart-failures?orgId=1 for failures 

      To reproduce:

      brew install cirruslabs/cli/tart
      tart clone ghcr.io/cirruslabs/macos-sonoma-xcode:latest sonoma
      tart run sonoma

      Or if on intranet:

      tart clone tart-registry.ci.qt.io/qtci-macos-14-arm-106 macos-14-ci

      Pass {}dir{-} to run to mount a host directory with an existing build (eg. -dir build:~/build )

      The virtualization is all Apple, both on the host and guest side, so yes, part of the OS. Tart is only a wrapper around the Apple virtualization framework. 

      Call stack tst_QAudioSink::pull

      * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
        * frame #0: 0x0000000188c65874 libsystem_kernel.dylib`mach_msg2_trap + 8
          frame #1: 0x0000000188c77cf0 libsystem_kernel.dylib`mach_msg2_internal + 80
          frame #2: 0x0000000188c6e4b0 libsystem_kernel.dylib`mach_msg_overwrite + 476
          frame #3: 0x0000000188c65bf8 libsystem_kernel.dylib`mach_msg + 24
          frame #4: 0x000000018b691ef8 CoreAudio`HALC_ProxyObject::HasProperty(AudioObjectPropertyAddress const&, bool&) const + 156
          frame #5: 0x000000018b5c026c CoreAudio`HALC_ShellObject::HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&) const + 720
          frame #6: 0x000000018b48c3c0 CoreAudio`HAL_HardwarePlugIn_ObjectHasProperty(AudioHardwarePlugInInterface**, unsigned int, AudioObjectPropertyAddress const*) + 488
          frame #7: 0x000000018b2e4dac CoreAudio`HALPlugIn::ObjectHasProperty(HALObject const&, AudioObjectPropertyAddress const&) const + 44
          frame #8: 0x000000018b5b8ab4 CoreAudio`AudioDeviceGetPropertyInfo + 208
          frame #9: 0x0000000103023b04 CoreAudio`___lldb_unnamed_symbol1028 + 292
          frame #10: 0x000000010311cd54 CoreAudio`___lldb_unnamed_symbol4759 + 280
          frame #11: 0x0000000103120604 CoreAudio`___lldb_unnamed_symbol4812 + 164
          frame #12: 0x000000018b020d08 AudioToolboxCore`AudioUnitGetProperty + 452
          frame #13: 0x00000001029b2344 QtMultimedia`QDarwinAudioSink::open(this=0x0000600003ab0100) at qdarwinaudiosink.mm:518:9 [opt]
          frame #14: 0x00000001029b20f4 QtMultimedia`QDarwinAudioSink::start(this=0x0000600003ab0100, device=0x00006000004bc340) at qdarwinaudiosink.mm:234:65 [opt]
          frame #15: 0x000000010233bcb8 tst_qaudiosink`tst_QAudioSink::pull(this=0x000000016dace378) at tst_qaudiosink.cpp:451:17 [opt]
          frame #16: 0x0000000102346e7c tst_qaudiosink`tst_QAudioSink::qt_static_metacall(_o=, _c=, _id=, _a=) at tst_qaudiosink.moc:207:22 [opt] [artificial]
          frame #17: 0x0000000103f1312c QtCore`QMetaMethodInvoker::invokeImpl(self=QMetaMethod @ 0x000000016dacdae0, target=0x000000016dace378, connectionType=, paramCount=1, parameters=0x000000016dacdc58, typeNames=0x000000016dacdc60, metaTypes=0x000000016dacdc68) at qmetaobject.cpp:2756:13 [opt]
          frame #18: 0x0000000103f17b74 QtCore`QMetaMethod::invokeImpl(self=QMetaMethod @ 0x000000016dacdbc0, target=, connectionType=, paramCount=1, parameters=, typeNames=0x000000016dacdc60, metaTypes=0x000000016dacdc68) at qmetaobject.cpp:2595:13 [opt]
          frame #19: 0x000000010282e8b8 QtTest`QTest::TestMethods::invokeTestOnData(int) const [inlined] std::__1::enable_if::value, bool>::type QMetaMethod::invoke(this=, obj=, c=DirectConnection, r=QTemplatedMetaMethodReturnArgument @ 0x00006000019e9880) const at qmetaobject.h:148:16 [opt]
          frame #20: 0x000000010282e894 QtTest`QTest::TestMethods::invokeTestOnData(int) const [inlined] std::__1::enable_if::value, bool>::type QMetaMethod::invoke<>(this=, obj=, c=DirectConnection) const at qmetaobject.h:160:16 [opt]
          frame #21: 0x000000010282e894 QtTest`QTest::TestMethods::invokeTestOnData(this=0x000000016dace1c8, index=) const at qtestcase.cpp:1166:45 [opt]
          frame #22: 0x000000010282f5b0 QtTest`QTest::TestMethods::invokeTest(this=0x000000016dace1c8, index=6, tag=, watchDog=0x00006000034ac5a0) const at qtestcase.cpp:1469:21 [opt]
          frame #23: 0x00000001028302d4 QtTest`QTest::TestMethods::invokeTests(this=0x000000016dace1c8, testObject=0x000000016dace378) const at qtestcase.cpp:1808:33 [opt]
          frame #24: 0x0000000102830ed4 QtTest`QTest::qRun() at qtestcase.cpp:2450:18 [opt]
          frame #25: 0x0000000102830498 QtTest`QTest::qExec(testObject=0x000000016dace378, argc=, argv=0x000000016dace658) at qtestcase.cpp:2328:15 [opt]
          frame #26: 0x0000000102346d3c tst_qaudiosink`main(argc=, argv=0x000000016dace658) at tst_qaudiosink.cpp:1020:1 [opt]
          frame #27: 0x00000001889250e0 dyld`start + 2360
      

       

      Call stack tst_QSoundEffect::testSource()

      * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
        * frame #0: 0x00000001812bd874 libsystem_kernel.dylib`mach_msg2_trap + 8
          frame #1: 0x00000001812cfd2c libsystem_kernel.dylib`mach_msg2_internal + 140
          frame #2: 0x00000001812c64b0 libsystem_kernel.dylib`mach_msg_overwrite + 476
          frame #3: 0x00000001812bdbf8 libsystem_kernel.dylib`mach_msg + 24
          frame #4: 0x0000000183ce6f20 CoreAudio`HALC_ProxyObject::SetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, void const*) + 2668
          frame #5: 0x0000000183b1c880 CoreAudio`HALC_ProxyIOContext::TellServerAboutStreamUsage(bool) + 528
          frame #6: 0x0000000183b1bfc8 CoreAudio`HALC_ProxyIOContext::SetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, void const*) + 476
          frame #7: 0x0000000183c1574c CoreAudio`HALC_ShellObject::SetPropertyData(unsigned int, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, void const*) + 872
          frame #8: 0x0000000183ae3734 CoreAudio`HAL_HardwarePlugIn_ObjectSetPropertyData(AudioHardwarePlugInInterface**, unsigned int, AudioObjectPropertyAddress const*, unsigned int, void const*, unsigned int, void const*) + 548
          frame #9: 0x0000000183bf94cc CoreAudio`HALPlugIn::ObjectSetPropertyData(HALObject const&, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, void const*, AudioTimeStamp const*) + 88
          frame #10: 0x0000000183b9c22c CoreAudio`HALObject::SetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, void const*, AudioTimeStamp const*) + 296
          frame #11: 0x0000000183c113ac CoreAudio`AudioDeviceSetProperty + 444
          frame #12: 0x000000010fbaff64 CoreAudio`___lldb_unnamed_symbol856 + 972
          frame #13: 0x000000010fbb0678 CoreAudio`___lldb_unnamed_symbol861 + 68
          frame #14: 0x000000010fbb24a4 CoreAudio`___lldb_unnamed_symbol914 + 184
          frame #15: 0x000000010fcae9dc CoreAudio`___lldb_unnamed_symbol4721 + 884
          frame #16: 0x000000010fcb4278 CoreAudio`___lldb_unnamed_symbol4811 + 140
          frame #17: 0x0000000183679048 AudioToolboxCore`AudioUnitSetProperty + 548
          frame #18: 0x000000010493a314 QtMultimedia`QDarwinAudioSink::open(this=0x0000600001e6ca00) at qdarwinaudiosink.mm:504:9 [opt]
          frame #19: 0x000000010493a0f4 QtMultimedia`QDarwinAudioSink::start(this=0x0000600001e6ca00, device=0x000060000097a4c0) at qdarwinaudiosink.mm:234:65 [opt]
          frame #20: 0x00000001048eaa20 QtMultimedia`QSoundEffectPrivate::setPlaying(this=0x000060000097a4c0, playing=) at qsoundeffect.cpp:248:22 [opt]
          frame #21: 0x00000001048ebbf8 QtMultimedia`QSoundEffect::play(this=0x0000600002242620) at qsoundeffect.cpp:678:8 [opt]
          frame #22: 0x0000000104282444 tst_qsoundeffect`tst_QSoundEffect::testSource() + 276
          frame #23: 0x0000000105e9b12c QtCore`QMetaMethodInvoker::invokeImpl(self=QMetaMethod @ 0x000000016bb81b20, target=0x000000016bb823b8, connectionType=, paramCount=1, parameters=0x000000016bb81c98, typeNames=0x000000016bb81ca0, metaTypes=0x000000016bb81ca8) at qmetaobject.cpp:2756:13 [opt]
          frame #24: 0x0000000105e9fb74 QtCore`QMetaMethod::invokeImpl(self=QMetaMethod @ 0x000000016bb81c00, target=, connectionType=, paramCount=1, parameters=, typeNames=0x000000016bb81ca0, metaTypes=0x000000016bb81ca8) at qmetaobject.cpp:2595:13 [opt]
          frame #25: 0x00000001047b68b8 QtTest`QTest::TestMethods::invokeTestOnData(int) const [inlined] std::__1::enable_if::value, bool>::type QMetaMethod::invoke(this=, obj=, c=DirectConnection, r=QTemplatedMetaMethodReturnArgument @ 0x0000600002872fc0) const at qmetaobject.h:148:16 [opt]
          frame #26: 0x00000001047b6894 QtTest`QTest::TestMethods::invokeTestOnData(int) const [inlined] std::__1::enable_if::value, bool>::type QMetaMethod::invoke<>(this=, obj=, c=DirectConnection) const at qmetaobject.h:160:16 [opt]
          frame #27: 0x00000001047b6894 QtTest`QTest::TestMethods::invokeTestOnData(this=0x000000016bb82208, index=) const at qtestcase.cpp:1166:45 [opt]
          frame #28: 0x00000001047b75b0 QtTest`QTest::TestMethods::invokeTest(this=0x000000016bb82208, index=0, tag=, watchDog=0x0000600001070630) const at qtestcase.cpp:1469:21 [opt]
          frame #29: 0x00000001047b82d4 QtTest`QTest::TestMethods::invokeTests(this=0x000000016bb82208, testObject=0x000000016bb823b8) const at qtestcase.cpp:1808:33 [opt]
          frame #30: 0x00000001047b8ed4 QtTest`QTest::qRun() at qtestcase.cpp:2450:18 [opt]
          frame #31: 0x00000001047b8498 QtTest`QTest::qExec(testObject=, argc=, argv=) at qtestcase.cpp:2328:15 [opt]
          frame #32: 0x0000000104286dd4 tst_qsoundeffect`main + 112
          frame #33: 0x0000000180f7d0e0 dyld`start + 2360
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            johanseg Jøger Hansegård
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes