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

QProcess does not work with thread sanitizer

    XMLWordPrintable

Details

    • Linux/X11
    • a0a29695a (dev), 8ef3ff1c6 (6.6), 7c4e271fe (dev), 9962441bf (6.7), f0e4f50fd (6.6)

    Description

      Compiling and running the attached code with thread sanitizer leads to a failure in the forkfd repository.

      ThreadSanitizer: CHECK failed: tsan_rtl.cpp:250 "((!thr->slot)) != (0)" (0x0, 0x0) (tid=213749)
          #0 __tsan::CheckUnwind() /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_rtl.cpp:672 (libtsan.so.2+0x96228) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
          #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_termination.cpp:86 (libtsan.so.2+0xd2500) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
          #2 FindSlotAndLock /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_rtl.cpp:250 (libtsan.so.2+0x97fee) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
          #3 __tsan::SlotAttachAndLock(__tsan::ThreadState*) /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_rtl.cpp:293 (libtsan.so.2+0x97fee)
          #4 ForkAfter /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_rtl.cpp:840 (libtsan.so.2+0x98330) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
          #5 clone /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:2274 (libtsan.so.2+0x48bbf) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
          #6 system_vforkfd(int, int*, int (*)(void*), void*, int*) /home/jonas/Code/qt-dev/qtbase/src/corelib/../3rdparty/forkfd/forkfd_linux.c:172 (libQt6Core.so.6+0x90edcb) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #7 vforkfd /home/jonas/Code/qt-dev/qtbase/src/corelib/io/../../3rdparty/forkfd/forkfd.c:814 (libQt6Core.so.6+0x90eb84) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #8 (anonymous namespace)::QChildProcess::startChild(int*) /home/jonas/Code/qt-dev/qtbase/src/corelib/io/qprocess_unix.cpp:324 (libQt6Core.so.6+0x8bbd9d) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #9 QProcessPrivate::startProcess() /home/jonas/Code/qt-dev/qtbase/src/corelib/io/qprocess_unix.cpp:699 (libQt6Core.so.6+0x8bb1e3) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #10 QProcessPrivate::start(QFlags<QIODeviceBase::OpenModeFlag>) /home/jonas/Code/qt-dev/qtbase/src/corelib/io/qprocess.cpp:2402 (libQt6Core.so.6+0x8a4e83) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #11 QProcess::start(QString const&, QList<QString> const&, QFlags<QIODeviceBase::OpenModeFlag>) /home/jonas/Code/qt-dev/qtbase/src/corelib/io/qprocess.cpp:2210 (libQt6Core.so.6+0x8a48f4) (BuildId: b4b6edc9cc90d01534d824173b62af353a4aacf9)
          #12 main /home/jonas/Code/untitled7/main.cpp:8 (untitled7+0x1317) (BuildId: c3716d93bfc93235d636ca68d90a425e540c2203)
          #13 <null> <null> (libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
          #14 __libc_start_main <null> (libc.so.6+0x27d89) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
          #15 _start <null> (untitled7+0x1194) (BuildId: c3716d93bfc93235d636ca68d90a425e540c2203)

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              jokarlss Jonas Karlsson
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes