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

AdjustReplayGainTest sometimes segfaults #10497

Closed
mixxxbot opened this issue Aug 23, 2022 · 12 comments
Closed

AdjustReplayGainTest sometimes segfaults #10497

mixxxbot opened this issue Aug 23, 2022 · 12 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: Holzhaus
Date: 2021-08-19T23:28:54Z
Status: Fix Committed
Importance: Critical
Launchpad Issue: lp1940589
Attachments: adjustreplaygaintestsegfault.coredump.xz


This randomly happens when running tests on main (e.g. 2.4-alpha-767-g0774a046ca).

The following tests FAILED:
    498 - AdjustReplayGainTest.AdjustReplayGainUpdatesPregain (SEGFAULT)

    $ coredumpctl -1 gdb
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Core was generated by `/home/jan/Projects/mixxx/build/mixxx-test --gtest_filter=AdjustReplayGainTest.A'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x000055bd8e0236fb in SyncControl::slotControlPlay (this=0x55bd8f83dc30, play=0) at /home/jan/Projects/mixxx/src/engine/sync/synccontrol.cpp:385
    385	    m_pEngineSync->notifyPlayingAudible(this, play > 0.0 && m_audible);
    [Current thread is 1 (Thread 0x7f8a57579640 (LWP 175095))]
    >>> bt
    #0  0x000055bd8e0236fb in SyncControl::slotControlPlay(double) (this=0x55bd8f83dc30, play=0) at /home/jan/Projects/mixxx/src/engine/sync/synccontrol.cpp:385
    #1  0x00007f8a6b6de75b in  () at /usr/lib/libQt5Core.so.5
    #2  0x000055bd8df3c080 in ControlProxy::valueChanged(double) (this=<optimized out>, _t1=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_controlproxy.cpp:164
    #3  0x00007f8a6b6de75b in  () at /usr/lib/libQt5Core.so.5
    #4  0x000055bd8df30965 in ControlDoublePrivate::valueChanged(double, QObject*) (this=this@entry=0x55bd8f7ee060, _t1=<optimized out>, _t1@entry=0, _t2=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_control.cpp:145
    #5  0x000055bd8df310ee in ControlDoublePrivate::setInner(double, QObject*) (this=0x55bd8f7ee060, value=0, pSender=<optimized out>) at /home/jan/Projects/mixxx/src/control/control.cpp:223
    #6  0x00007f8a6b6de75b in  () at /usr/lib/libQt5Core.so.5
    #7  0x000055bd8df308f3 in ControlDoublePrivate::valueChangeRequest(double) (this=this@entry=0x55bd8f7ee060, _t1=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_control.cpp:152
    #8  0x000055bd8df31228 in ControlDoublePrivate::set(double, QObject*) (this=0x55bd8f7ee060, value=<optimized out>, pSender=0x55bd8f7edfc0) at /home/jan/Projects/mixxx/src/control/control.cpp:208
    #9  0x000055bd8dff8c16 in ControlObject::set(double) (value=<optimized out>, this=<optimized out>) at /home/jan/Projects/mixxx/src/control/controlobject.h:83
    #10 EngineBuffer::slotTrackLoading() (this=0x55bd8f7e5fe0) at /home/jan/Projects/mixxx/src/engine/enginebuffer.cpp:523
    #11 0x00007f8a6b6de75b in  () at /usr/lib/libQt5Core.so.5
    #12 0x00007f8a6b6de75b in  () at /usr/lib/libQt5Core.so.5
    #13 0x000055bd8dfcb260 in CachingReaderWorker::loadTrack(std::shared_ptr<Track> const&) (this=0x55bd8f7e9478, pTrack=std::shared_ptr<Track> (use count 5, weak count 0) = {...}) at /home/jan/Projects/mixxx/src/engine/cachingreader/cachingreaderworker.cpp:136
    #14 0x000055bd8dfcd2ad in CachingReaderWorker::run() (this=0x55bd8f7e9478) at /home/jan/Projects/mixxx/src/engine/cachingreader/cachingreaderworker.cpp:104
    #15 0x00007f8a6b4bbfef in  () at /usr/lib/libQt5Core.so.5
    #16 0x00007f8a6afd6259 in start_thread () at /usr/lib/libpthread.so.0
    #17 0x00007f8a6aeff5e3 in clone () at /usr/lib/libc.so.6
@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-08-20T10:06:55Z


The adjustment of replay gain values was introduced by this PR:

#4031

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2021-08-22T22:06:53Z


I am unable to reproduce on my own machine. Can you figure out what object is segfaulting? is m_pEngineSync null? I suspect this is an initialization race condition that likely only affects this test because it uses an unusual code path.

@mixxxbot
Copy link
Collaborator Author

Commented by: Holzhaus
Date: 2021-09-07T11:27:21Z


I actually don't know. I just happened again, but looking at the coredump I doesn't look like m_pEngineSync is null:

    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x000055abf33c004b in SyncControl::slotControlPlay (this=0x55abf5c19cd0, play=0) at /home/jan/Projects/mixxx/src/engine/sync/synccontrol.cpp:385
    385	    m_pEngineSync->notifyPlayingAudible(this, play > 0.0 && m_audible);
    [Current thread is 1 (Thread 0x7fe75f19f640 (LWP 245841))]
    >>> bt
    #0  0x000055abf33c004b in SyncControl::slotControlPlay(double) (this=0x55abf5c19cd0, play=0) at /home/jan/Projects/mixxx/src/engine/sync/synccontrol.cpp:385
    mixxxdj/mixxx#4910  0x00007fe77335f76b in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4911  0x000055abf32d7ef0 in ControlProxy::valueChanged(double) (this=<optimized out>, _t1=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_controlproxy.cpp:164
    mixxxdj/mixxx#4912  0x00007fe77335f76b in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4913  0x000055abf32cb755 in ControlDoublePrivate::valueChanged(double, QObject*) (this=this@entry=0x55abf5bca2d0, _t1=<optimized out>, _t1@entry=0, _t2=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_control.cpp:145
    mixxxdj/mixxx#4914  0x000055abf32cb8ce in ControlDoublePrivate::setInner(double, QObject*) (this=0x55abf5bca2d0, value=0, pSender=<optimized out>) at /home/jan/Projects/mixxx/src/control/control.cpp:280
    mixxxdj/mixxx#4915  0x00007fe77335f76b in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4916  0x000055abf32cb6e3 in ControlDoublePrivate::valueChangeRequest(double) (this=this@entry=0x55abf5bca2d0, _t1=<optimized out>) at /home/jan/Projects/mixxx/build/mixxx-lib_autogen/include/moc_control.cpp:152
    mixxxdj/mixxx#4917  0x000055abf32cc628 in ControlDoublePrivate::set(double, QObject*) (this=0x55abf5bca2d0, value=<optimized out>, pSender=0x55abf5bca230) at /home/jan/Projects/mixxx/src/control/control.cpp:265
    mixxxdj/mixxx#4918  0x000055abf33988d7 in ControlObject::set(double) (value=<optimized out>, this=<optimized out>) at /home/jan/Projects/mixxx/src/control/controlobject.h:83
    mixxxdj/mixxx#4919 EngineBuffer::slotTrackLoading() (this=0x55abf5bc2250) at /home/jan/Projects/mixxx/src/engine/enginebuffer.cpp:529
    mixxxdj/mixxx#4920 0x00007fe77335f76b in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4921 0x00007fe77335f76b in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4922 0x000055abf3366e50 in CachingReaderWorker::loadTrack(std::shared_ptr<Track> const&) (this=0x55abf5bc56e8, pTrack=std::shared_ptr<Track> (use count 3, weak count 0) = {...}) at /home/jan/Projects/mixxx/src/engine/cachingreader/cachingreaderworker.cpp:136
    mixxxdj/mixxx#4923 0x000055abf3368e9d in CachingReaderWorker::run() (this=0x55abf5bc56e8) at /home/jan/Projects/mixxx/src/engine/cachingreader/cachingreaderworker.cpp:104
    mixxxdj/mixxx#4924 0x00007fe77313cfef in  () at /usr/lib/libQt5Core.so.5
    mixxxdj/mixxx#4925 0x00007fe772c57259 in start_thread () at /usr/lib/libpthread.so.0
    mixxxdj/mixxx#4926 0x00007fe772b805e3 in clone () at /usr/lib/libc.so.6
    >>> p m_audible
    $1 = {
      <QAtomicInteger<int>> = {
        <QBasicAtomicInteger<int>> = {
          _q_value = {
            <std::__atomic_base<int>> = {
              static _S_alignment = 4,
              _M_i = 0
            },
            members of std::atomic<int>:
            static is_always_lock_free = true
          }
        }, <No data fields>}, <No data fields>}
    >>> p play
    $2 = 0
    >>> p this
    $3 = (SyncControl * const) 0x55abf5c19cd0
    >>> p m_pEngineSync
    $4 = (SyncableListener *) 0x55abf593f7c0

All of these seem to exist. My hunch was that m_audible was not initialized, but according to the Qt docs, it's initialized with 0 in that case: https://doc.qt.io/qt-5/qatomicinteger.html#QAtomicInteger

@mixxxbot
Copy link
Collaborator Author

Commented by: Holzhaus
Date: 2021-09-07T11:40:25Z
Attachments: adjustreplaygaintestsegfault.coredump.xz

@mixxxbot
Copy link
Collaborator Author

Commented by: Holzhaus
Date: 2021-09-30T15:18:48Z


Just happened again, same issue.

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-10-01T09:53:54Z


Confirmed. Backtrace suggests a race condition when terminating the test.

280/717 Test #⁠515: AdjustReplayGainTest.AdjustReplayGainUpdatesPregain .....................................***Exception: SegFault 1.70 sec
QML debugging is enabled. Only use this in a safe environment.
Note: Google Test filter = AdjustReplayGainTest.AdjustReplayGainUpdatesPregain

Thread 1 (Thread 0x7f2aea914640 (LWP 49758)):
#0  0x0000000000000000 in  ()
mixxxdj/mixxx#4910  0x00007f2b080493a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4911  0x00000000009f6c20 in ControlProxy::valueChanged(double) (this=<optimized out>, _t1=<optimized out>) at mixxx-lib_autogen/include/moc_controlproxy.cpp:164
mixxxdj/mixxx#4912  0x00007f2b080493a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4913  0x00000000009ea38d in ControlDoublePrivate::valueChanged(double, QObject*) (_t2=<optimized out>, _t1=<optimized out>, this=0x2d114d0) at mixxx-lib_autogen/include/moc_control.cpp:145
mixxxdj/mixxx#4914  ControlDoublePrivate::setInner(double, QObject*) (this=0x2d114d0, value=0, pSender=<optimized out>) at ../src/control/control.cpp:280
mixxxdj/mixxx#4915  0x00007f2b080493a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4916  0x00000000009eb1e2 in ControlDoublePrivate::valueChangeRequest(double) (_t1=<optimized out>, this=0x2d114d0) at mixxx-lib_autogen/include/moc_control.cpp:152
mixxxdj/mixxx#4917  ControlDoublePrivate::set(double, QObject*) (this=0x2d114d0, value=<optimized out>, pSender=0x2d11430) at ../src/control/control.cpp:265
mixxxdj/mixxx#4918  0x0000000000ab4e56 in ControlObject::set(double) (value=<optimized out>, this=<optimized out>) at ../src/control/controlobject.h:82
mixxxdj/mixxx#4919 EngineBuffer::slotTrackLoading() (this=0x2d093e0) at ../src/engine/enginebuffer.cpp:528
mixxxdj/mixxx#4920 0x00007f2b080493a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4921 0x00007f2b080493a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4922 0x0000000000a861c0 in CachingReaderWorker::trackLoading() (this=0x2d0c878) at mixxx-lib_autogen/include/moc_cachingreaderworker.cpp:178
mixxxdj/mixxx#4923 CachingReaderWorker::loadTrack(std::shared_ptr<Track> const&) (this=0x2d0c878, pTrack=std::shared_ptr<Track> (use count 5, weak count 0) = {...}) at ../src/engine/cachingreader/cachingreaderworker.cpp:148
mixxxdj/mixxx#4924 0x0000000000a88364 in CachingReaderWorker::run() (this=0x2d0c878) at ../src/engine/cachingreader/cachingreaderworker.cpp:103
mixxxdj/mixxx#4925 0x00007f2b07e584a6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4926 0x00007f2b0794b299 in start_thread () at /lib64/libpthread.so.0
mixxxdj/mixxx#4927 0x00007f2b07873353 in clone () at /lib64/libc.so.6


Thread 4 (Thread 0x7f2afeff9280 (LWP 49749)):
#0  0x00007f2b07957a8a in __futex_abstimed_wait_common64 () at /lib64/libpthread.so.0
mixxxdj/mixxx#4910  0x00007f2b079512c0 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
mixxxdj/mixxx#4911  0x00007f2b07e5e01b in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4912  0x00007f2b07e58189 in QThread::wait(QDeadlineTimer) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4913  0x0000000000a85c29 in CachingReaderWorker::quitWait() (this=<optimized out>) at ../src/engine/cachingreader/cachingreaderworker.cpp:229
mixxxdj/mixxx#4914  0x0000000000a82a2a in CachingReader::~CachingReader() (this=0x2a4a970, __in_chrg=<optimized out>) at ../src/engine/cachingreader/cachingreader.cpp:96
mixxxdj/mixxx#4915  0x0000000000a82f49 in CachingReader::~CachingReader() (this=0x2a4a970, __in_chrg=<optimized out>) at ../src/engine/cachingreader/cachingreader.cpp:98
mixxxdj/mixxx#4916  0x0000000000abfd2b in EngineBuffer::~EngineBuffer() (this=0x2b11c60, __in_chrg=<optimized out>) at ../src/engine/enginebuffer.cpp:302
mixxxdj/mixxx#4917  0x0000000000ac0239 in EngineBuffer::~EngineBuffer() (this=0x2b11c60, __in_chrg=<optimized out>) at ../src/engine/enginebuffer.cpp:331
mixxxdj/mixxx#4918  0x0000000000eec255 in EngineDeck::~EngineDeck() (this=0x2a6a400, __in_chrg=<optimized out>) at ../src/engine/channels/enginedeck.cpp:47
mixxxdj/mixxx#4919 0x0000000000eec309 in EngineDeck::~EngineDeck() (this=0x2a6a400, __in_chrg=<optimized out>) at ../src/engine/channels/enginedeck.cpp:49
mixxxdj/mixxx#4920 0x0000000000ac7ab3 in EngineMaster::~EngineMaster() (this=0x2a7a0c0, __in_chrg=<optimized out>) at ../src/engine/enginemaster.cpp:249
mixxxdj/mixxx#4921 0x00000000006ba96d in TestEngineMaster::~TestEngineMaster() (this=0x2a7a0c0, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:51
mixxxdj/mixxx#4922 TestEngineMaster::~TestEngineMaster() (this=0x2a7a0c0, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:51
mixxxdj/mixxx#4923 0x00000000008efe6d in BaseSignalPathTest::~BaseSignalPathTest() (this=0x2a56010, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:144
mixxxdj/mixxx#4924 MockedEngineBackendTest::~MockedEngineBackendTest() (this=0x2a56010, __in_chrg=<optimized out>) at ../src/test/mockedenginebackendtest.h:92
mixxxdj/mixxx#4925 (anonymous namespace)::AdjustReplayGainTest::~AdjustReplayGainTest (this=0x2a56010, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:160
mixxxdj/mixxx#4926 (anonymous namespace)::AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test::~AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test (this=0x2a56010, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:162
mixxxdj/mixxx#4927 (anonymous namespace)::AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test::~AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test() (this=0x2a56010, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:162
mixxxdj/mixxx#4928 0x000000000117e35d in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (location=0x14a68f2 "the test fixture's destructor", method=<optimized out>, object=0x2a56010) at ../lib/googletest/googletest/src/gtest.cc:2607
mixxxdj/mixxx#4929 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (object=object@entry=0x2a56010, method=<optimized out>, location=location@entry=0x14a68f2 "the test fixture's destructor") at ../lib/googletest/googletest/src/gtest.cc:2643
mixxxdj/mixxx#4930 0x000000000116c87c in testing::TestInfo::Run() (this=0x29e2690) at ../lib/googletest/googletest/src/gtest.cc:2867
mixxxdj/mixxx#4931 0x000000000116d8c5 in testing::TestInfo::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:2834
mixxxdj/mixxx#4932 testing::TestSuite::Run() (this=0x29e2890) at ../lib/googletest/googletest/src/gtest.cc:3015
mixxxdj/mixxx#4933 0x0000000001170dca in testing::TestSuite::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:2994
mixxxdj/mixxx#4934 testing::internal::UnitTestImpl::RunAllTests() (this=0x29a4680) at ../lib/googletest/googletest/src/gtest.cc:5855
mixxxdj/mixxx#4935 0x000000000116d1ab in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (location=0x14a5b78 "auxiliary test code (environments or event listeners)", method=<optimized out>, object=0x29a4680) at ../lib/googletest/googletest/src/gtest.cc:2588
mixxxdj/mixxx#4936 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (location=0x14a5b78 "auxiliary test code (environments or event listeners)", method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x116e6a0 <testing::internal::UnitTestImpl::RunAllTests()>, object=0x29a4680) at ../lib/googletest/googletest/src/gtest.cc:2643
mixxxdj/mixxx#4937 testing::UnitTest::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:5438
mixxxdj/mixxx#4938 0x00000000005fc901 in RUN_ALL_TESTS() () at ../lib/googletest/googletest/include/gtest/gtest.h:2490
--Type <RET> for more, q to quit, c to continue without paging-- 
mixxxdj/mixxx#4939 main(int, char**) (argc=<optimized out>, argv=0x7ffce62c6c08) at ../src/test/main.cpp:34

coredumpctl -1 gdb has proven to be very helpful.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2021-10-01T20:01:29Z


I think this is because I'm doing slotLoadTrack instead of loadTrack, which waits for the track to actually load. The test is quitting before the caching reader has a chance to finish

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2021-10-01T20:07:18Z


#4345

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2021-10-06T12:59:29Z


Not fixed yet, happened again:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000003 in ?? ()
[Current thread is 1 (Thread 0x7f7237fff640 (LWP 59741))]

Thread 1 (Thread 0x7f7237fff640 (LWP 59741)):
#0  0x0000000000000003 in  ()
mixxxdj/mixxx#4910  0x00007f725dadf3a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4911  0x00000000009f86b0 in ControlProxy::valueChanged(double) (this=<optimized out>, _t1=<optimized out>) at mixxx-lib_autogen/include/moc_controlproxy.cpp:164
mixxxdj/mixxx#4912  0x00007f725dadf3a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4913  0x00000000009ebe1d in ControlDoublePrivate::valueChanged(double, QObject*) (_t2=<optimized out>, _t1=<optimized out>, this=0x3665b30) at mixxx-lib_autogen/include/moc_control.cpp:145
mixxxdj/mixxx#4914  ControlDoublePrivate::setInner(double, QObject*) (this=0x3665b30, value=0, pSender=<optimized out>) at ../src/control/control.cpp:280
mixxxdj/mixxx#4915  0x00007f725dadf3a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4916  0x00000000009ecc72 in ControlDoublePrivate::valueChangeRequest(double) (_t1=<optimized out>, this=0x3665b30) at mixxx-lib_autogen/include/moc_control.cpp:152
mixxxdj/mixxx#4917  ControlDoublePrivate::set(double, QObject*) (this=0x3665b30, value=<optimized out>, pSender=0x3665a90) at ../src/control/control.cpp:265
mixxxdj/mixxx#4918  0x0000000000ab6c66 in ControlObject::set(double) (value=<optimized out>, this=<optimized out>) at ../src/control/controlobject.h:82
mixxxdj/mixxx#4919 EngineBuffer::slotTrackLoading() (this=0x365df70) at ../src/engine/enginebuffer.cpp:528
mixxxdj/mixxx#4920 0x00007f725dadf3a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4921 0x00007f725dadf3a9 in void doActivate<false>(QObject*, int, void**) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4922 0x0000000000a87fc0 in CachingReaderWorker::trackLoading() (this=0x3661428) at mixxx-lib_autogen/include/moc_cachingreaderworker.cpp:178
mixxxdj/mixxx#4923 CachingReaderWorker::loadTrack(std::shared_ptr<Track> const&) (this=0x3661428, pTrack=std::shared_ptr<Track> (use count 3, weak count 0) = {...}) at ../src/engine/cachingreader/cachingreaderworker.cpp:148
mixxxdj/mixxx#4924 0x0000000000a8a164 in CachingReaderWorker::run() (this=0x3661428) at ../src/engine/cachingreader/cachingreaderworker.cpp:103
mixxxdj/mixxx#4925 0x00007f725d8ee4a6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4926 0x00007f725d3e1299 in start_thread () at /lib64/libpthread.so.0
mixxxdj/mixxx#4927 0x00007f725d309353 in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f7254a85280 (LWP 59735)):
#0  0x00007f725d30404b in munmap () at /lib64/libc.so.6
mixxxdj/mixxx#4910  0x00007f725d2957fb in free () at /lib64/libc.so.6
mixxxdj/mixxx#4911  0x0000000000ad233f in ReadAheadManager::~ReadAheadManager() (this=0x361f9e0, __in_chrg=<optimized out>) at ../src/engine/readaheadmanager.cpp:35
mixxxdj/mixxx#4912  ReadAheadManager::~ReadAheadManager() (this=0x361f9e0, __in_chrg=<optimized out>) at ../src/engine/readaheadmanager.cpp:36
mixxxdj/mixxx#4913  0x0000000000ac1b29 in EngineBuffer::~EngineBuffer() (this=0x3466dc0, __in_chrg=<optimized out>) at ../src/engine/enginebuffer.cpp:301
mixxxdj/mixxx#4914  0x0000000000ac2049 in EngineBuffer::~EngineBuffer() (this=0x3466dc0, __in_chrg=<optimized out>) at ../src/engine/enginebuffer.cpp:331
--Type <RET> for more, q to quit, c to continue without paging--
mixxxdj/mixxx#4915  0x0000000000ef0035 in EngineDeck::~EngineDeck() (this=0x33bf420, __in_chrg=<optimized out>) at ../src/engine/channels/enginedeck.cpp:47
mixxxdj/mixxx#4916  0x0000000000ef00e9 in EngineDeck::~EngineDeck() (this=0x33bf420, __in_chrg=<optimized out>) at ../src/engine/channels/enginedeck.cpp:49
mixxxdj/mixxx#4917  0x0000000000ac98c3 in EngineMaster::~EngineMaster() (this=0x33cf4f0, __in_chrg=<optimized out>) at ../src/engine/enginemaster.cpp:249
mixxxdj/mixxx#4918  0x00000000006bbcad in TestEngineMaster::~TestEngineMaster() (this=0x33cf4f0, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:51
mixxxdj/mixxx#4919 TestEngineMaster::~TestEngineMaster() (this=0x33cf4f0, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:51
mixxxdj/mixxx#4920 0x00000000008f11ed in BaseSignalPathTest::~BaseSignalPathTest() (this=0x33aaeb0, __in_chrg=<optimized out>) at ../src/test/signalpathtest.h:144
mixxxdj/mixxx#4921 MockedEngineBackendTest::~MockedEngineBackendTest() (this=0x33aaeb0, __in_chrg=<optimized out>) at ../src/test/mockedenginebackendtest.h:92
mixxxdj/mixxx#4922 (anonymous namespace)::AdjustReplayGainTest::~AdjustReplayGainTest (this=0x33aaeb0, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:160
mixxxdj/mixxx#4923 (anonymous namespace)::AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test::~AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test (this=0x33aaeb0, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:162
mixxxdj/mixxx#4924 (anonymous namespace)::AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test::~AdjustReplayGainTest_AdjustReplayGainUpdatesPregain_Test() (this=0x33aaeb0, __in_chrg=<optimized out>) at ../src/test/replaygaintest.cpp:162
mixxxdj/mixxx#4925 0x000000000118253d in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (location=0x14ab0c2 "the test fixture's destructor", method=<optimized out>, object=0x33aaeb0) at ../lib/googletest/googletest/src/gtest.cc:2607
mixxxdj/mixxx#4926 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (object=object@entry=0x33aaeb0, method=<optimized out>, location=location@entry=0x14ab0c2 "the test fixture's destructor") at ../lib/googletest/googletest/src/gtest.cc:2643
mixxxdj/mixxx#4927 0x0000000001170a5c in testing::TestInfo::Run() (this=0x3337650) at ../lib/googletest/googletest/src/gtest.cc:2867
mixxxdj/mixxx#4928 0x0000000001171aa5 in testing::TestInfo::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:2834
mixxxdj/mixxx#4929 testing::TestSuite::Run() (this=0x3337850) at ../lib/googletest/googletest/src/gtest.cc:3015
mixxxdj/mixxx#4930 0x0000000001174faa in testing::TestSuite::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:2994
mixxxdj/mixxx#4931 testing::internal::UnitTestImpl::RunAllTests() (this=0x32f9710) at ../lib/googletest/googletest/src/gtest.cc:5855
mixxxdj/mixxx#4932 0x000000000117138b in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (location=0x14aa348 "auxiliary test code (environments or event listeners)", method=<optimized out>, object=0x32f9710) at ../lib/googletest/googletest/src/gtest.cc:2588
mixxxdj/mixxx#4933 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (location=0x14aa348 "auxiliary test code (environments or event listeners)", method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x1172880 <testing::internal::UnitTestImpl::RunAllTests()>, object=0x32f9710) at ../lib/googletest/googletest/src/gtest.cc:2643
mixxxdj/mixxx#4934 testing::UnitTest::Run() (this=<optimized out>) at ../lib/googletest/googletest/src/gtest.cc:5438
mixxxdj/mixxx#4935 0x00000000005fd501 in RUN_ALL_TESTS() () at ../lib/googletest/googletest/include/gtest/gtest.h:2490
mixxxdj/mixxx#4936 main(int, char**) (argc=<optimized out>, argv=0x7ffe74b3a308) at ../src/test/main.cpp:34

Thread 5 (Thread 0x7f72454ba640 (LWP 59740)):
#0  0x00007f725d30407b in mprotect () at /lib64/libc.so.6
mixxxdj/mixxx#4910  0x00007f725d2926c7 in sysmalloc () at /lib64/libc.so.6
mixxxdj/mixxx#4911  0x00007f725d2941ee in _int_malloc () at /lib64/libc.so.6
mixxxdj/mixxx#4912  0x00007f725d2948ba in _int_realloc () at /lib64/libc.so.6
mixxxdj/mixxx#4913  0x00007f725d295cd7 in realloc () at /lib64/libc.so.6
mixxxdj/mixxx#4914  0x00007f725e553f54 in av_realloc_f () at /lib64/libavutil.so.56
mixxxdj/mixxx#4915  0x00007f725e82fe03 in ffio_rewind_with_probe_data () at /lib64/libavformat.so.58
mixxxdj/mixxx#4916  0x00007f725e85ec5b in av_probe_input_buffer2 () at /lib64/libavformat.so.58
mixxxdj/mixxx#4917  0x00007f725e952572 in avformat_open_input () at /lib64/libavformat.so.58
mixxxdj/mixxx#4918  0x0000000000d59edd in mixxx::(anonymous namespace)::openInputFile (fileName=...) at ../src/sources/soundsourceffmpeg.cpp:249
mixxxdj/mixxx#4919 mixxx::SoundSourceFFmpeg::tryOpen(mixxx::AudioSource::OpenMode, mixxx::AudioSource::OpenParams const&) (this=0x7f723c005180, params=...) at ../src/sources/soundsourceffmpeg.cpp:495
mixxxdj/mixxx#4920 0x0000000000c19126 in mixxx::AudioSource::open(mixxx::AudioSource::OpenMode, mixxx::AudioSource::OpenParams const&) (this=0x7f723c005180, mode=mode@entry=mixxx::AudioSource::OpenMode::Strict, params=...) at ../src/sources/audiosource.cpp:40
mixxxdj/mixxx#4921 0x0000000000c2a6dd in SoundSourceProxy::openAudioSource(mixxx::AudioSource::OpenParams const&) (this=this@entry=0x7f72454b91c0, params=...) at ../src/sources/soundsourceproxy.cpp:782
mixxxdj/mixxx#4922 0x0000000000a880db in CachingReaderWorker::loadTrack(std::shared_ptr<Track> const&) (this=0x33a4b58, pTrack=std::shared_ptr<Track> (use count 3, weak count 0) = {...}) at ../src/engine/cachingreader/cachingreaderworker.cpp:167
mixxxdj/mixxx#4923 0x0000000000a8a164 in CachingReaderWorker::run() (this=0x33a4b58) at ../src/engine/cachingreader/cachingreaderworker.cpp:103
mixxxdj/mixxx#4924 0x00007f725d8ee4a6 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
mixxxdj/mixxx#4925 0x00007f725d3e1299 in start_thread () at /lib64/libpthread.so.0
mixxxdj/mixxx#4926 0x00007f725d309353 in clone () at /lib64/libc.so.6

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2021-10-06T16:27:35Z


Ah, the loadTrack function waits for "istrackloaded", which returns true because the old track was already loaded. It doesn't actually wait to see if the new track is loaded. This is just a problem with signalpathtest.h. I'll fix.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2021-10-06T18:22:50Z


#4362

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Committed.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 2.4.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant