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

Many messages "QThread::wait: Thread tried to wait on itself" when Creator starts new threads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15, 6.2.0 RC2, 6.2, 6.3.0 Feature Freeze
    • Fix Version/s: 5.15.7, 6.2.1, 6.3.0 Alpha
    • Component/s: Core: Threads
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Story Points:
      21
    • Commits:
      52ad59f9eabbe1fc8ca49d117e4955f2d21d50a7 (qt/qtbase/dev) 85ababa213bd03c455306c9af8561e52a77e5a27 (qt/qtbase/6.2) 594791fc54054e2f4e221f218b3b2d56f8fec4f1 (qt/tqtc-qtbase/5.15)
    • Sprint:
      Team 1 Foundation_Sprint 43

      Description

      When running Creator build against Qt 6.2 there are many messages: "QThread::wait: Thread tried to wait on itself" being printed out.

      The call stack:

      1  QThread::wait                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                qthread_unix.cpp  765 0x7ffff5a6faf7 
      2  QThreadPoolPrivate::tryStart                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 qthreadpool.cpp   200 0x7ffff5a76513 
      3  QThreadPool::start                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           qthreadpool.cpp   516 0x7ffff5a773dd 
      4  Utils::Internal::runAsync_internal<std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>>, std::reference_wrapper<Utils::FilePath>>(QThreadPool *, Utils::StackSizeInBytes, QThread::Priority, std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>> &&)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  runextensions.h   411 0x7fffb6f986c7 
      5  Utils::runAsync<std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>>, std::reference_wrapper<Utils::FilePath>>(QThreadPool *, QThread::Priority, std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>> &&)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              runextensions.h   457 0x7fffb6f98327 
      6  Utils::runAsync<std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>>, std::reference_wrapper<Utils::FilePath>>(QThreadPool *, std::reference_wrapper<const Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>> &&)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 runextensions.h   546 0x7fffb6f9809d 
      7  Utils::Internal::MapReduceBase<QList<Utils::FilePath>::iterator, QSharedPointer<Autotest::TestParseResult>, Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, void *, QSharedPointer<Autotest::TestParseResult>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>>::schedule(void)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           mapreduce.h       113 0x7fffb6f9724e 
      8  Utils::Internal::MapReduceBase<QList<Utils::FilePath>::iterator, QSharedPointer<Autotest::TestParseResult>, Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, void *, QSharedPointer<Autotest::TestParseResult>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>>::exec(void)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               mapreduce.h       87  0x7fffb6f960d0 
      9  Utils::Internal::blockingIteratorMapReduce<QList<Utils::FilePath>::iterator, void * ( *)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, QSharedPointer<Autotest::TestParseResult>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void ( *)(void *)>(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, QList<Utils::FilePath>::iterator, QList<Utils::FilePath>::iterator, void *( *&&)(void), struct {...} &&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>> &&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *, int)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           mapreduce.h       293 0x7fffb6f957da 
      10 Utils::Internal::blockingContainerMapReduce<QList<Utils::FilePath>, void * ( *)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, QSharedPointer<Autotest::TestParseResult>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void ( *)(void *)>(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, QList<Utils::FilePath> &&, void *( *&&)(void), struct {...} &&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>> &&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mapreduce.h       305 0x7fffb6f95250 
      11 Utils::Internal::runAsyncQFutureInterfaceDispatch<QSharedPointer<Autotest::TestParseResult>, void ( *)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, QList<Utils::FilePath>&&, void * ( *&&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>&&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>&&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *), QList<Utils::FilePath>, void * ( *)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void ( *)(void *), Utils::MapReduceOption, QThreadPool *>(std::true_type, QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, void ( *&&)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, QList<Utils::FilePath> &&, void *( *&&)(void), struct {...} &&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>> &&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *)) runextensions.h   257 0x7fffb6f99b30 
      12 Utils::Internal::runAsyncMemberDispatch<QSharedPointer<Autotest::TestParseResult>, void ( *)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, QList<Utils::FilePath>&&, void * ( *&&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>&&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>&&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *), QList<Utils::FilePath>, void * ( *)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void ( *)(void *), Utils::MapReduceOption, QThreadPool *>(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, void ( *&&)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, QList<Utils::FilePath> &&, void *( *&&)(void), struct {...} &&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>> &&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *))                           runextensions.h   274 0x7fffb6f99992 
      13 Utils::Internal::runAsyncImpl<QSharedPointer<Autotest::TestParseResult>, void ( *)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, QList<Utils::FilePath>&&, void * ( *&&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>&&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>&&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *), QList<Utils::FilePath>, void * ( *)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void ( *)(void *), Utils::MapReduceOption, QThreadPool *>(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, void ( *&&)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>> &, QList<Utils::FilePath> &&, void *( *&&)(void), struct {...} &&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>> &&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *))                                     runextensions.h   303 0x7fffb6f997db 
      14 Utils::Internal::AsyncJob<QSharedPointer<Autotest::TestParseResult>, void (&)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, QList<Utils::FilePath>&&, void * ( *&&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>&&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>&&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *), QList<Utils::FilePath>&, void * (&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void (&)(void *), Utils::MapReduceOption&, QThreadPool *&>::runHelper<0, 1, 2, 3, 4, 5, 6, 7>(std::index_sequence)                                                                                                                                                                                                                                                                                                                                    runextensions.h   372 0x7fffb6f994e6 
      15 Utils::Internal::AsyncJob<QSharedPointer<Autotest::TestParseResult>, void (&)(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, QList<Utils::FilePath>&&, void * ( *&&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>&&, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>&&, void ( *&&)(void *), Utils::MapReduceOption, QThreadPool *), QList<Utils::FilePath>&, void * (&)(), Autotest::Internal::TestCodeParser::scanForTests(const FilePaths&, const QList<Autotest::ITestParser *>&)::<lambda(QFutureInterface<QSharedPointer<Autotest::TestParseResult>>&, const Utils::FilePath&)>, Utils::Internal::DummyReduce<QSharedPointer<Autotest::TestParseResult>>, void (&)(void *), Utils::MapReduceOption&, QThreadPool *&>::run(void)                                                                                                                                                                                                                                                                                                                                                                                 runextensions.h   352 0x7fffb6f98f9f 
      16 Utils::Internal::RunnableThread::run                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         runextensions.cpp 39  0x7ffff7cd27d7 
      17 QThreadPrivate::start                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        qthread_unix.cpp  336 0x7ffff5a6f017 
      18 start_thread                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0x7ffff52f1299 
      19 clone                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0x7ffff5219353 
      

      It looks like the call to thread->wait() inside QThreadPoolPrivate::tryStart() was introduced in: 7cd69f9af057f4b48b259004b032f241b72f0de9

        Attachments

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

          Activity

            People

            Assignee:
            ievgenii.meshcheriakov Ievgenii Meshcheriakov
            Reporter:
            jkobus Jarek Kobus
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: