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

Thread Sanitizer reports data races in QtConcurrent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.3.0
    • Core: QtConcurrent
    • None
    • 8
    • Foundation Sprint 61, Foundation Sprint 62

    Description

      TSAN support was recently added to Qt Core.

      Running Qt Creator with Thread Sanitizer reports multiple issues in QtConcurrent, with the following summaries:

      SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) /usr/local/Qt-6.4.0/include/QtConcurrent/qtconcurrentmapkernel.h:94 in QtConcurrent::MappedReducedKernel<QList<TextEditor::HighlightingResult>, QList<LanguageClient::ExpandedSemanticToken>::const_iterator, std::function<TextEditor::HighlightingResult (LanguageClient::ExpandedSemanticToken const&)>, QtPrivate::PushBackWrapper, QtConcurrent::ReduceKernel<QtPrivate::PushBackWrapper, QList<TextEditor::HighlightingResult>, TextEditor::HighlightingResult> >::~MappedReducedKernel()
      
      SUMMARY: ThreadSanitizer: data race /usr/local/Qt-6.4.0/include/QtConcurrent/qtconcurrentmapkernel.h:163 in QtConcurrent::MappedReducedKernel<QList<TextEditor::HighlightingResult>, QList<LanguageClient::ExpandedSemanticToken>::const_iterator, std::function<TextEditor::HighlightingResult (LanguageClient::ExpandedSemanticToken const&)>, QtPrivate::PushBackWrapper, QtConcurrent::ReduceKernel<QtPrivate::PushBackWrapper, QList<TextEditor::HighlightingResult>, TextEditor::HighlightingResult> >::shouldThrottleThread()
      
      SUMMARY: ThreadSanitizer: data race /usr/local/Qt-6.4.0/include/QtConcurrent/qtconcurrentreducekernel.h:155 in QtConcurrent::ReduceKernel<QtPrivate::PushBackWrapper, QList<TextEditor::HighlightingResult>, TextEditor::HighlightingResult>::runReduce(QtPrivate::PushBackWrapper&, QList<TextEditor::HighlightingResult>&, QtConcurrent::IntermediateResults<TextEditor::HighlightingResult> const&)
      

      More details can be found in tsan_report8.txt.tgz.

      Attachments

        Issue Links

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

          Activity

            People

              sonakur Sona Kurazyan
              sonakur Sona Kurazyan
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes