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

QProcess destruction related crashes

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Commits:
      57f5fbbf571016867b0d4a33370489b484ce843b

      Description

      Recently I get

      ==138087== 
      ==138087== Invalid write of size 8
      ==138087==    at 0x6570F93: QProcessPrivate::cleanup() (qprocess.cpp:921)
      ==138087==    by 0x6571AF4: QProcessPrivate::_q_startupNotification() (qprocess.cpp:1218)
      ==138087==    by 0x65741A0: QProcess::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qprocess.cpp:214)
      ==138087==    by 0x6670FF3: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3898)
      ==138087==    by 0x666A00A: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3946)
      ==138087==    by 0x667B42D: QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (moc_qsocketnotifier.cpp:178)
      ==138087==    by 0x667AF5A: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:302)
      ==138087==    by 0x4EA531C: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3630)
      ==138087==    by 0x4EA265D: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:2970)
      ==138087==    by 0x66192A0: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
      ==138087==    by 0x6619D3D: QCoreApplication::sendEvent(QObject*, QEvent*) (qcoreapplication.cpp:1458)
      ==138087==    by 0x66B7425: socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) (qeventdispatcher_glib.cpp:107)
      ==138087==  Address 0x25ef1088 is 216 bytes inside a block of size 416 free'd
      ==138087==    at 0x483D1CF: operator delete(void*, unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==138087==    by 0x6570F62: QProcessPrivate::~QProcessPrivate() (qprocess.cpp:896)
      ==138087==    by 0x6671FB6: QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (qscopedpointer.h:60)
      ==138087==    by 0x666E9F2: QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (qscopedpointer.h:107)
      ==138087==    by 0x6662952: QObject::~QObject() (qobject.cpp:972)
      ==138087==    by 0x652D04B: QIODevice::~QIODevice() (qiodevice.cpp:501)
      ==138087==    by 0x6571D7E: QProcess::~QProcess() (qprocess.cpp:1259)
      ==138087==    by 0x1604D27A: ClangTools::Internal::ClangToolRunner::~ClangToolRunner() (clangtoolrunner.cpp:99)
      ==138087==    by 0x160BFAEF: ClangTools::Internal::ClazyStandaloneRunner::~ClazyStandaloneRunner() (clangtidyclazyrunner.h:43)
      ==138087==    by 0x160BFB0F: ClangTools::Internal::ClazyStandaloneRunner::~ClazyStandaloneRunner() (clangtidyclazyrunner.h:43)
      ==138087==    by 0x16093E85: std::default_delete<ClangTools::Internal::ClangToolRunner>::operator()(ClangTools::Internal::ClangToolRunner*) const (unique_ptr.h:81)
      ==138087==    by 0x1609349A: std::unique_ptr<ClangTools::Internal::ClangToolRunner, std::default_delete<ClangTools::Internal::ClangToolRunner> >::reset(ClangTools::Internal::ClangToolRunner*) (unique_ptr.h:402)
      ==138087==  Block was alloc'd at
      ==138087==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==138087==    by 0x6571BD4: QProcess::QProcess(QObject*) (qprocess.cpp:1246)
      ==138087==    by 0x16021FF2: ClangTools::Internal::ClangToolRunner::ClangToolRunner(QObject*) (clangtoolrunner.h:47)
      ==138087==    by 0x16021338: ClangTools::Internal::ClazyStandaloneRunner::ClazyStandaloneRunner(CppTools::ClangDiagnosticConfig const&, QObject*) (clangtidyclazyrunner.cpp:105)
      ==138087==    by 0x16092ECF: ClangTools::Internal::ClangToolRunner* ClangTools::Internal::DocumentClangToolRunner::createRunner<ClangTools::Internal::ClazyStandaloneRunner>(CppTools::ClangDiagnosticConfig const&, Utils::Environment const&) (documentclangtoolrunner.cpp:372)
      ==138087==    by 0x1608E2CE: ClangTools::Internal::DocumentClangToolRunner::run()::{lambda()#3}::operator()() const (documentclangtoolrunner.cpp:216)
      ==138087==    by 0x16090772: std::_Function_handler<ClangTools::Internal::ClangToolRunner* (), ClangTools::Internal::DocumentClangToolRunner::run()::{lambda()#3}>::_M_invoke(std::_Any_data const&) (std_function.h:285)
      ==138087==    by 0x1604865F: std::function<ClangTools::Internal::ClangToolRunner* ()>::operator()() const (std_function.h:688)
      ==138087==    by 0x1608EAD4: ClangTools::Internal::DocumentClangToolRunner::runNext() (documentclangtoolrunner.cpp:241)
      ==138087==    by 0x1608FC8C: ClangTools::Internal::DocumentClangToolRunner::onFailure(QString const&, QString const&) (documentclangtoolrunner.cpp:332)
      ==138087==    by 0x16098086: QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QString const&, QString const&>, void, void (ClangTools::Internal::DocumentClangToolRunner::*)(QString const&, QString const&)>::call(void (ClangTools::Internal::DocumentClangToolRunner::*)(QString const&, QString const&), ClangTools::Internal::DocumentClangToolRunner*, void**) (qobjectdefs_impl.h:152)
      ==138087==    by 0x16097CB9: void QtPrivate::FunctionPointer<void (ClangTools::Internal::DocumentClangToolRunner::*)(QString const&, QString const&)>::call<QtPrivate::List<QString const&, QString const&>, void>(void (ClangTools::Internal::DocumentClangToolRunner::*)(QString const&, QString const&), ClangTools::Internal::DocumentClangToolRunner*, void**) (qobjectdefs_impl.h:185)
      ==138087== 
      
          #0  0x00007f1c304688a3 in QProcess::setProcessState (this=0x56234c6e9360, state=QProcess::NotRunning) at io/qprocess.cpp:1940
                  d = 0x91
          #1  0x00007f1c30466f8f in QProcessPrivate::cleanup (this=0x56234eaa8d00) at io/qprocess.cpp:903
          No locals.
          #2  0x00007f1c30467af5 in QProcessPrivate::_q_startupNotification (this=0x56234eaa8d00) at io/qprocess.cpp:1218
                  q = 0x56234c6e9390
                  errorMessage = {static null = {<No data fields>}, d = 0x56234eab6b60}
          #3  0x00007f1c304678be in QProcessPrivate::_q_processDied (this=0x56234eaa8d00) at io/qprocess.cpp:1141
                  q = 0x56234c6e9390
                  wasRunning = false
          #4  0x00007f1c3046a1e5 in QProcess::qt_static_metacall (_o=0x56234c6e9390, _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7ffdbb20cf90) at .moc/moc_qprocess.cpp:216
                  _r = false
                  _t = 0x56234c6e9390
          #5  0x00007f1c30567348 in doActivate<false> (sender=0x56234cf2bdf0, signal_index=3, argv=0x7ffdbb20cf90) at kernel/qobject.cpp:3898
                  method_relative = 14
                  callFunction = 0x7f1c30469f4e <QProcess::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>
                  methodIndex = 0
                  receiver = 0x56234c6e9390
                  td = 0x56234aec2e30
                  receiverInSameThread = true
                  senderData = {previous = 0x0, receiver = 0x0, sender = 0x56234cf2bdf0, signal = 3}
                  c = 0x56234eb3a320
                  connections = {d = 0x56234eb2f900}
                  list = 0x56234c612750
                  inSenderThread = true
                  highestConnectionId = 1
                  signalVector = 0x56234c612700
                  currentThreadId = 0x7f1c2caf57c0
                  __PRETTY_FUNCTION__ = "void doActivate(QObject*, int, void**) [with bool callbacks_enabled = false]"
                  sp = 0x56234eab6b60
                  signal_spy_set = 0x0
                  empty_argv = {0x0}
                  senderDeleted = false
          #6  0x00007f1c3056035f in QMetaObject::activate (sender=0x56234cf2bdf0, m=0x7f1c30925ce0 <QSocketNotifier::staticMetaObject>, local_signal_index=0, argv=0x7ffdbb20cf90) at kernel/qobject.cpp:3946
                  signal_index = 3
          #7  0x00007f1c30571782 in QSocketNotifier::activated (this=0x56234cf2bdf0, _t1=..., _t2=QSocketNotifier::Read, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
                  _a = {0x0, 0x7ffdbb20cf84, 0x7ffdbb20cf80, 0x7ffdbb20cf7f}
          #8  0x00007f1c305712af in QSocketNotifier::event (this=0x56234cf2bdf0, e=0x7ffdbb20d500) at kernel/qsocketnotifier.cpp:302
                  alive = {wp = {d = 0x56234e9e9890, value = 0x56234cf2bdf0}}
                  d = 0x56234eab6b60
          #9  0x00007f1c3171531d in QApplicationPrivate::notify_helper (this=0x56234aecbb60, receiver=0x56234cf2bdf0, e=0x7ffdbb20d500) at kernel/qapplication.cpp:3630
                  consumed = false
                  filtered = false
          #10 0x00007f1c3171265e in QApplication::notify (this=0x7ffdbb20d9e0, receiver=0x56234cf2bdf0, e=0x7ffdbb20d500) at kernel/qapplication.cpp:2970
                  d = 0x56234aecbb60
                  __PRETTY_FUNCTION__ = "virtual bool QApplication::notify(QObject*, QEvent*)"
                  res = false
          #11 0x00007f1c3050f5f5 in QCoreApplication::notifyInternal2 (receiver=0x56234cf2bdf0, event=0x7ffdbb20d500) at kernel/qcoreapplication.cpp:1063
                  selfRequired = true
                  result = false
                  cbdata = {0x56234cf2bdf0, 0x7ffdbb20d500, 0x7ffdbb20d446}
                  d = 0x56234eab6b60
                  threadData = 0x56234aec2e30
                  scopeLevelCounter = {threadData = 0x56234aec2e30}
          #12 0x00007f1c30510092 in QCoreApplication::sendEvent (receiver=0x56234cf2bdf0, event=0x7ffdbb20d500) at kernel/qcoreapplication.cpp:1458
          No locals.
          #13 0x00007f1c305ad77a in socketNotifierSourceDispatch (source=0x56234af120b0) at kernel/qeventdispatcher_glib.cpp:107
                  p = 0x56234dfcf120
                  i = 9
                  event = {_vptr.QEvent = 0x7f1c30925730 <vtable for QEvent+16>, static staticMetaObject = {d = {superdata = {direct = 0x0}, stringdata = 0x7f1c30773480 <qt_meta_stringdata_QEvent>, data = 0x7f1c30774f00 <qt_meta_data_QEvent>, static_metacall = 0x0,
                        relatedMetaObjects = 0x0, extradata = 0x0}}, d = 0x0, t = 50, posted = 0, spont = 0, m_accept = 1, reserved = 1152}
                  src = 0x56234af120b0
          #14 0x00007f1c2eb35fbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
          No symbol table info available.
          #15 0x00007f1c2eb36240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
          No symbol table info available.
          #16 0x00007f1c2eb362e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      
      
      

        Attachments

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

          Activity

            People

            Assignee:
            davschul David Schulz
            Reporter:
            hjk hjk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes