Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25073

SIGSTOP when debugged program starts QThread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.15.0-beta1
    • Qt Creator 4.13.3
    • Debugger
    • None
    • Qt 5.15.2
      Fedora 32
      AMD/3970x
      Linux kernel 5.9.11-100.fc32.x86_64
      GCC 10.2.1
      GDB 9.1.6
    • Linux/Wayland, Linux/X11

    Description

      My development system is Fedora 32. After update from kernel 5.8 to 5.9, programs being debugged segfault immediately after starting QThread.

      The crash appears to be originating in the interaction between Qt creator and gdb.

      The following code causes the crash (full project attached). The call to _thread.start() returns, but crashes prior to the onStart signal invocation (see attached screenshots).

      #include "testservice.h"
      #include <QDebug>
      
      TestService::TestService()
      {
          qDebug() << "Construct";
      
          connect(&_thread, &QThread::started, this, &TestService::onStarted);
          connect(&_timer, &QTimer::timeout, this, &TestService::onTimer);
      
          _timer.moveToThread(&_thread);
          moveToThread(&_thread);
      
          qDebug() << "Prior to _thread.start()";
          _thread.start();
          qDebug() << "After call to _thread.start()";
      }
      
      void TestService::onStarted()
      {
          qDebug() << "Start";
      
          _timer.start(1000);
      }
      
      void TestService::onTimer()
      {
          qDebug() << "Timer";
      }
      
      
      

      I first encountered the issue after last nights upgrade to 5.9.11-100.fc32.x86_64.

      The previous working kernel is 5.8.18-200.fc32.x86_64

      GCC Version

      spunak@muadib:~/tmp$ gcc --version
      gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6)

       

      GDB Version

      spunak@muadib:~/tmp$ gdb --version
      GNU gdb (GDB) Fedora 9.1-6.fc32

       

       

       

       

       

      Attachments

        1. qt_creator_crash.png
          qt_creator_crash.png
          297 kB
        2. testcrash.tgz
          1.0 kB
        3. sigstop_01.png
          sigstop_01.png
          337 kB
        4. sigstop_02.png
          sigstop_02.png
          343 kB
        5. sigstop_03.png
          sigstop_03.png
          372 kB
        6. sigstop_01.txt
          31 kB
        7. sigstop_02.txt
          34 kB
        8. sigstop_03.txt
          39 kB

        Issue Links

          Activity

            People

              hjk hjk
              plasticjesus Stephen Punak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: