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

Data race in tst_qurl::testThreading() detected by Thread Sanitizer

    XMLWordPrintable

    Details

      Description

      I see some data races from the place that shouldn't have them. This specific issue seems to cause test failures e.g. in QEMU that runs in the CI.

      Running tst_qurl locally (specifically, tst_qurl::testThreading()) gives the following:

      ==================
      WARNING: ThreadSanitizer: data race (pid=6647)
        Write of size 8 at 0x7b5000020c90 by thread T3:
          #0 memset <null> (libtsan.so.0+0x368af)
          #1 g_slice_alloc0 <null> (libglib-2.0.so.0+0x69f4d)
          #2 QEventDispatcherGlib::QEventDispatcherGlib(QObject*) /home/ag/work/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:364 (libQt6Core.so.6+0x6e1b2a)
          #3 QThreadPrivate::createEventDispatcher(QThreadData*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:258 (libQt6Core.so.6+0x54a820)
          #4 QThreadData::createEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread.cpp:126 (libQt6Core.so.6+0x4300f8)
          #5 QThreadData::ensureEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_p.h:254 (libQt6Core.so.6+0x228a74)
          #6 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:310 (libQt6Core.so.6+0x54aa79)
          #7 <null> <null> (libtsan.so.0+0x2c34f)
      
        Previous write of size 8 at 0x7b5000020c90 by thread T2:
          #0 posix_memalign <null> (libtsan.so.0+0x2f579)
          #1 <null> <null> (libglib-2.0.so.0+0x69206)
          #2 QEventDispatcherGlib::QEventDispatcherGlib(QObject*) /home/ag/work/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:364 (libQt6Core.so.6+0x6e1b2a)
          #3 QThreadPrivate::createEventDispatcher(QThreadData*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:258 (libQt6Core.so.6+0x54a820)
          #4 QThreadData::createEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread.cpp:126 (libQt6Core.so.6+0x4300f8)
          #5 QThreadData::ensureEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_p.h:254 (libQt6Core.so.6+0x228a74)
          #6 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:310 (libQt6Core.so.6+0x54aa79)
          #7 <null> <null> (libtsan.so.0+0x2c34f)
      
        Location is heap block of size 496 at 0x7b5000020c00 allocated by thread T2:
          #0 posix_memalign <null> (libtsan.so.0+0x2f579)
          #1 <null> <null> (libglib-2.0.so.0+0x69206)
          #2 QEventDispatcherGlib::QEventDispatcherGlib(QObject*) /home/ag/work/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:364 (libQt6Core.so.6+0x6e1b2a)
          #3 QThreadPrivate::createEventDispatcher(QThreadData*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:258 (libQt6Core.so.6+0x54a820)
          #4 QThreadData::createEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread.cpp:126 (libQt6Core.so.6+0x4300f8)
          #5 QThreadData::ensureEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_p.h:254 (libQt6Core.so.6+0x228a74)
          #6 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:310 (libQt6Core.so.6+0x54aa79)
          #7 <null> <null> (libtsan.so.0+0x2c34f)
      
        Thread T3 (tid=6651, running) created by main thread at:
          #0 pthread_create <null> (libtsan.so.0+0x5d445)
          #1 QThread::start(QThread::Priority) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:715 (libQt6Core.so.6+0x54b8ef)
          #2 QThreadPoolPrivate::startThread(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:268 (libQt6Core.so.6+0x556271)
          #3 QThreadPoolPrivate::tryStart(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:202 (libQt6Core.so.6+0x555c4f)
          #4 QThreadPool::start(QRunnable*, int) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:505 (libQt6Core.so.6+0x556e8b)
          #5 QtConcurrent::RunFunctionTaskBase<void>::start(QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrunbase.h:96 (tst_qurl+0x55478)
          #6 QtConcurrent::NonPromiseTaskResolver<void (tst_QUrl::*)(), tst_QUrl*>::run(std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&, QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:208 (tst_qurl+0x512f1)
          #7 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(QThreadPool*, void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:83 (tst_qurl+0x513f0)
          #8 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:100 (tst_qurl+0x51493)
          #9 tst_QUrl::testThreading() /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4131 (tst_qurl+0x4b2d0)
          #10 tst_QUrl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/corelib/io/qurl/tst_qurl_autogen/include/tst_qurl.moc:682 (tst_qurl+0x4df91)
          #11 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const /home/ag/work/qt5/qtbase/src/corelib/kernel/qmetaobject.cpp:2340 (libQt6Core.so.6+0x234cd3)
          #12 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qmetaobject.h:125 (libQt6Test.so.6+0x3d419)
          #13 QTest::TestMethods::invokeTestOnData(int) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:934 (libQt6Test.so.6+0x343cc)
          #14 QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1163 (libQt6Test.so.6+0x3515d)
          #15 QTest::TestMethods::invokeTests(QObject*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1506 (libQt6Test.so.6+0x36ac7)
          #16 QTest::qRun() /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1933 (libQt6Test.so.6+0x3746c)
          #17 QTest::qExec(QObject*, int, char**) /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1841 (libQt6Test.so.6+0x36e23)
          #18 main /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4258 (tst_qurl+0x4d5c1)
      
        Thread T2 'Thread (pooled)' (tid=6650, running) created by main thread at:
          #0 pthread_create <null> (libtsan.so.0+0x5d445)
          #1 QThread::start(QThread::Priority) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:715 (libQt6Core.so.6+0x54b8ef)
          #2 QThreadPoolPrivate::startThread(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:268 (libQt6Core.so.6+0x556271)
          #3 QThreadPoolPrivate::tryStart(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:174 (libQt6Core.so.6+0x555ac2)
          #4 QThreadPool::start(QRunnable*, int) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:505 (libQt6Core.so.6+0x556e8b)
          #5 QtConcurrent::RunFunctionTaskBase<void>::start(QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrunbase.h:96 (tst_qurl+0x55478)
          #6 QtConcurrent::NonPromiseTaskResolver<void (tst_QUrl::*)(), tst_QUrl*>::run(std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&, QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:208 (tst_qurl+0x512f1)
          #7 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(QThreadPool*, void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:83 (tst_qurl+0x513f0)
          #8 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:100 (tst_qurl+0x51493)
          #9 tst_QUrl::testThreading() /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4131 (tst_qurl+0x4b2d0)
          #10 tst_QUrl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/corelib/io/qurl/tst_qurl_autogen/include/tst_qurl.moc:682 (tst_qurl+0x4df91)
          #11 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const /home/ag/work/qt5/qtbase/src/corelib/kernel/qmetaobject.cpp:2340 (libQt6Core.so.6+0x234cd3)
          #12 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qmetaobject.h:125 (libQt6Test.so.6+0x3d419)
          #13 QTest::TestMethods::invokeTestOnData(int) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:934 (libQt6Test.so.6+0x343cc)
          #14 QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1163 (libQt6Test.so.6+0x3515d)
          #15 QTest::TestMethods::invokeTests(QObject*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1506 (libQt6Test.so.6+0x36ac7)
          #16 QTest::qRun() /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1933 (libQt6Test.so.6+0x3746c)
          #17 QTest::qExec(QObject*, int, char**) /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1841 (libQt6Test.so.6+0x36e23)
          #18 main /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4258 (tst_qurl+0x4d5c1)
      
      SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x368af) in memset
      ==================
      ==================
      WARNING: ThreadSanitizer: data race (pid=6647)
        Write of size 8 at 0x7b4000040360 by thread T9:
          #0 memset <null> (libtsan.so.0+0x368af)
          #1 g_slice_alloc0 <null> (libglib-2.0.so.0+0x69f4d)
          #2 QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>, int) /home/ag/work/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1300 (libQt6Core.so.6+0x20b0bc)
          #3 QTest::qWait(int) /home/ag/work/qt5/qtbase/src/corelib/kernel/qtestsupport_core.cpp:119 (libQt6Core.so.6+0x2fd04e)
          #4 tst_QUrl::testThreadingHelper() /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4118 (tst_qurl+0x4b01a)
          #5 void std::__invoke_impl<void, void (tst_QUrl::*&)(), tst_QUrl*&>(std::__invoke_memfun_deref, void (tst_QUrl::*&)(), tst_QUrl*&) /usr/include/c++/10/bits/invoke.h:73 (tst_qurl+0x60c3d)
          #6 std::__invoke_result<void (tst_QUrl::*&)(), tst_QUrl*&>::type std::__invoke<void (tst_QUrl::*&)(), tst_QUrl*&>(void (tst_QUrl::*&)(), tst_QUrl*&) /usr/include/c++/10/bits/invoke.h:95 (tst_qurl+0x60a6c)
          #7 std::invoke_result<void (tst_QUrl::*&)(), tst_QUrl*&>::type std::invoke<void (tst_QUrl::*&)(), tst_QUrl*&>(void (tst_QUrl::*&)(), tst_QUrl*&) /usr/include/c++/10/functional:88 (tst_qurl+0x608d3)
          #8 QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::*)(), tst_QUrl*)#1}::operator()(void (tst_QUrl::*)(), tst_QUrl*) const include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:152 (tst_qurl+0x606f4)
          #9 void std::__invoke_impl<void, QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, void (tst_QUrl::*)(), tst_QUrl*>(std::__invoke_other, QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, void (tst_QUrl::*&&)(), tst_QUrl*&&) /usr/include/c++/10/bits/invoke.h:60 (tst_qurl+0x60b87)
          #10 std::__invoke_result<QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, void (tst_QUrl::*)(), tst_QUrl*>::type std::__invoke<QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, void (tst_QUrl::*)(), tst_QUrl*>(std::__invoke_result&&, (QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1})...) /usr/include/c++/10/bits/invoke.h:95 (tst_qurl+0x609e9)
          #11 decltype(auto) std::__apply_impl<QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, std::tuple<void (tst_QUrl::*)(), tst_QUrl*>, 0ul, 1ul>(QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&, std::integer_sequence<unsigned long, 0ul, 1ul>) /usr/include/c++/10/tuple:1727 (tst_qurl+0x6077c)
          #12 decltype(auto) std::apply<QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, std::tuple<void (tst_QUrl::*)(), tst_QUrl*> >(QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor()::{lambda(void (tst_QUrl::* const&)(), tst_QUrl*)#1}, std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&) /usr/include/c++/10/tuple:1738 (tst_qurl+0x607e3)
          #13 QtConcurrent::StoredFunctionCall<void (tst_QUrl::*)(), tst_QUrl*>::runFunctor() include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:156 (tst_qurl+0x6084f)
          #14 QtConcurrent::RunFunctionTaskBase<void>::run() include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrunbase.h:112 (tst_qurl+0x6057e)
          #15 QThreadPoolThread::run() /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:99 (libQt6Core.so.6+0x555399)
          #16 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:330 (libQt6Core.so.6+0x54abdb)
          #17 <null> <null> (libtsan.so.0+0x2c34f)
      
        Previous write of size 8 at 0x7b4000040360 by thread T8:
          #0 posix_memalign <null> (libtsan.so.0+0x2f579)
          #1 <null> <null> (libglib-2.0.so.0+0x69206)
          #2 QEventDispatcherGlib::QEventDispatcherGlib(QObject*) /home/ag/work/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:364 (libQt6Core.so.6+0x6e1b2a)
          #3 QThreadPrivate::createEventDispatcher(QThreadData*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:258 (libQt6Core.so.6+0x54a820)
          #4 QThreadData::createEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread.cpp:126 (libQt6Core.so.6+0x4300f8)
          #5 QThreadData::ensureEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_p.h:254 (libQt6Core.so.6+0x228a74)
          #6 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:310 (libQt6Core.so.6+0x54aa79)
          #7 <null> <null> (libtsan.so.0+0x2c34f)
      
        Location is heap block of size 240 at 0x7b4000040300 allocated by thread T8:
          #0 posix_memalign <null> (libtsan.so.0+0x2f579)
          #1 <null> <null> (libglib-2.0.so.0+0x69206)
          #2 QEventDispatcherGlib::QEventDispatcherGlib(QObject*) /home/ag/work/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:364 (libQt6Core.so.6+0x6e1b2a)
          #3 QThreadPrivate::createEventDispatcher(QThreadData*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:258 (libQt6Core.so.6+0x54a820)
          #4 QThreadData::createEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread.cpp:126 (libQt6Core.so.6+0x4300f8)
          #5 QThreadData::ensureEventDispatcher() /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_p.h:254 (libQt6Core.so.6+0x228a74)
          #6 QThreadPrivate::start(void*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:310 (libQt6Core.so.6+0x54aa79)
          #7 <null> <null> (libtsan.so.0+0x2c34f)
      
        Thread T9 'Thread (pooled)' (tid=6659, running) created by main thread at:
          #0 pthread_create <null> (libtsan.so.0+0x5d445)
          #1 QThread::start(QThread::Priority) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:715 (libQt6Core.so.6+0x54b8ef)
          #2 QThreadPoolPrivate::startThread(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:268 (libQt6Core.so.6+0x556271)
          #3 QThreadPoolPrivate::tryStart(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:202 (libQt6Core.so.6+0x555c4f)
          #4 QThreadPool::start(QRunnable*, int) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:505 (libQt6Core.so.6+0x556e8b)
          #5 QtConcurrent::RunFunctionTaskBase<void>::start(QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrunbase.h:96 (tst_qurl+0x55478)
          #6 QtConcurrent::NonPromiseTaskResolver<void (tst_QUrl::*)(), tst_QUrl*>::run(std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&, QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:208 (tst_qurl+0x512f1)
          #7 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(QThreadPool*, void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:83 (tst_qurl+0x513f0)
          #8 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:100 (tst_qurl+0x51493)
          #9 tst_QUrl::testThreading() /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4131 (tst_qurl+0x4b2d0)
          #10 tst_QUrl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/corelib/io/qurl/tst_qurl_autogen/include/tst_qurl.moc:682 (tst_qurl+0x4df91)
          #11 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const /home/ag/work/qt5/qtbase/src/corelib/kernel/qmetaobject.cpp:2340 (libQt6Core.so.6+0x234cd3)
          #12 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qmetaobject.h:125 (libQt6Test.so.6+0x3d419)
          #13 QTest::TestMethods::invokeTestOnData(int) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:934 (libQt6Test.so.6+0x343cc)
          #14 QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1163 (libQt6Test.so.6+0x3515d)
          #15 QTest::TestMethods::invokeTests(QObject*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1506 (libQt6Test.so.6+0x36ac7)
          #16 QTest::qRun() /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1933 (libQt6Test.so.6+0x3746c)
          #17 QTest::qExec(QObject*, int, char**) /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1841 (libQt6Test.so.6+0x36e23)
          #18 main /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4258 (tst_qurl+0x4d5c1)
      
        Thread T8 'Thread (pooled)' (tid=6658, running) created by main thread at:
          #0 pthread_create <null> (libtsan.so.0+0x5d445)
          #1 QThread::start(QThread::Priority) /home/ag/work/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:715 (libQt6Core.so.6+0x54b8ef)
          #2 QThreadPoolPrivate::startThread(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:268 (libQt6Core.so.6+0x556271)
          #3 QThreadPoolPrivate::tryStart(QRunnable*) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:202 (libQt6Core.so.6+0x555c4f)
          #4 QThreadPool::start(QRunnable*, int) /home/ag/work/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:505 (libQt6Core.so.6+0x556e8b)
          #5 QtConcurrent::RunFunctionTaskBase<void>::start(QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrunbase.h:96 (tst_qurl+0x55478)
          #6 QtConcurrent::NonPromiseTaskResolver<void (tst_QUrl::*)(), tst_QUrl*>::run(std::tuple<void (tst_QUrl::*)(), tst_QUrl*>&&, QtConcurrent::TaskStartParameters const&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentstoredfunctioncall.h:208 (tst_qurl+0x512f1)
          #7 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(QThreadPool*, void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:83 (tst_qurl+0x513f0)
          #8 auto QtConcurrent::run<void (tst_QUrl::*)(), tst_QUrl*>(void (tst_QUrl::*&&)(), tst_QUrl*&&) include/QtConcurrent/../../../../qt5/qtbase/src/concurrent/qtconcurrentrun.h:100 (tst_qurl+0x51493)
          #9 tst_QUrl::testThreading() /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4131 (tst_qurl+0x4b2d0)
          #10 tst_QUrl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/corelib/io/qurl/tst_qurl_autogen/include/tst_qurl.moc:682 (tst_qurl+0x4df91)
          #11 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const /home/ag/work/qt5/qtbase/src/corelib/kernel/qmetaobject.cpp:2340 (libQt6Core.so.6+0x234cd3)
          #12 QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qmetaobject.h:125 (libQt6Test.so.6+0x3d419)
          #13 QTest::TestMethods::invokeTestOnData(int) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:934 (libQt6Test.so.6+0x343cc)
          #14 QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1163 (libQt6Test.so.6+0x3515d)
          #15 QTest::TestMethods::invokeTests(QObject*) const /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1506 (libQt6Test.so.6+0x36ac7)
          #16 QTest::qRun() /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1933 (libQt6Test.so.6+0x3746c)
          #17 QTest::qExec(QObject*, int, char**) /home/ag/work/qt5/qtbase/src/testlib/qtestcase.cpp:1841 (libQt6Test.so.6+0x36e23)
          #18 main /home/ag/work/qt5/qtbase/tests/auto/corelib/io/qurl/tst_qurl.cpp:4258 (tst_qurl+0x4d5c1)
      
      SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x368af) in memset
      ==================
      

      My setup: Ubuntu 18.04, GCC 10, cmake with -DFEATURE_sanitize_thread=ON

        Attachments

        For Gerrit Dashboard: QTBUG-93176
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            cnn Qt Core & Network
            Reporter:
            agolubev Andrei Golubev
            PM Owner:
            Alex Blasche Alex Blasche
            RnD Owner:
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes