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

QtCreator executes external processes at start-up

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Commits:
      b1274d4b9cf2e4d5fc9859f17912fe5281f4d83e (qt-creator/qt-creator/master)

      Description

      At start-up QtCreator seems to search for binaries containing "clang" in their name and run them.

      I have a custom script called target-deploy-clang which deploys clang libraries to an embedded target. After upgrading to QtCreator 4.9 I have noticed that it starts up much longer than before. strace has shown that QtCreator actually runs this script each time it starts up.

      How To Reproduce

      1. Create /usr/local/bin/custom-clang with this content
        #!/usr/bin/env bash
        echo WHY AM I RUN???
        cat /dev/zero
        
      2. Execute qtcreator.
      3. It executes the script and runs out of memory.

      STrace Output

      statx(AT_FDCWD, "/usr/libexec/python3-sphinx/custom-clang", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffc4dca2550) = -1 ENOENT (No such file or directory)
      statx(AT_FDCWD, "/usr/share/Modules/bin/custom-clang", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffc4dca2550) = -1 ENOENT (No such file or directory)
      statx(AT_FDCWD, "/usr/local/bin/custom-clang", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=56, ...}) = 0
      access("/usr/local/bin/custom-clang", X_OK) = 0
      ...
      clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa97ad1fad0) = 15364
      ...
      read(29, "WHY AM I RUN???\n", 16)       = 16
      ...
      read(29, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536
      ...
      read(29, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536
      ...
      write(2, "terminate called after throwing "..., 48terminate called after throwing an instance of ') = 48
      write(2, "std::bad_alloc", 14std::bad_alloc)          = 14
      

      Backtrace

      #0  0x00007ffff669aeb5 in raise () at /lib64/libc.so.6
      #1  0x00007ffff6685895 in abort () at /lib64/libc.so.6
      #2  0x00007ffff68e06da in  () at /lib64/libstdc++.so.6
      #3  0x00007ffff68ec61c in  () at /lib64/libstdc++.so.6
      #4  0x00007ffff68ec677 in  () at /lib64/libstdc++.so.6
      #5  0x00007ffff68ec8d9 in  () at /lib64/libstdc++.so.6
      #6  0x00007ffff6ae5e59 in qTerminate() () at /lib64/libQt5Core.so.5
      #7  0x00007ffff6ae8828 in  () at /lib64/libQt5Core.so.5
      #8  0x00007ffff6b2a138 in QByteArray::append(QByteArray const&) () at /lib64/libQt5Core.so.5
      #9  0x00007ffff7e4d606 in QByteArray::operator+=(QByteArray const&) (a=..., this=0x555556b840b8) at /usr/include/qt5/QtCore/qbytearray.h:593
      #10 0x00007ffff7e4d606 in Utils::ChannelBuffer::append(QByteArray const&, bool) (this=0x555556b840a8, text=..., emitSignals=<optimized out>) at synchronousprocess.cpp:245
      #11 0x00007ffff7e4d6f0 in Utils::SynchronousProcess::processStdOut(bool) (this=<optimized out>, emitSignals=<optimized out>) at synchronousprocess.cpp:627
      #12 0x00007ffff6ced6f0 in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
      #13 0x00007ffff6c4e8de in QProcess::readyReadStandardOutput(QProcess::QPrivateSignal) () at /lib64/libQt5Core.so.5
      #14 0x00007ffff6c54819 in  () at /lib64/libQt5Core.so.5
      #15 0x00007ffff6c5ac50 in  () at /lib64/libQt5Core.so.5
      #16 0x00007ffff6c4f231 in QProcess::waitForFinished(int) () at /lib64/libQt5Core.so.5
      #17 0x00007ffff7e4e0ef in Utils::SynchronousProcess::runBlocking(QString const&, QStringList const&) (this=this@entry=0x7fffffffc3d0, binary=..., args=...) at synchronousprocess.cpp:516
      #18 0x00007fffcb724ea8 in ProjectExplorer::runGcc(Utils::FileName const&, QStringList const&, QStringList const&) (gcc=..., arguments=..., env=...) at gcctoolchain.cpp:91
      #19 0x00007fffcb725f6c in ProjectExplorer::gccPredefinedMacros(Utils::FileName const&, QStringList const&, QStringList const&) (gcc=..., args=..., env=...) at gcctoolchain.cpp:108
      #20 0x00007fffcb728eb7 in ProjectExplorer::Internal::GccToolChainFactory::autoDetectToolChain(Utils::FileName const&, Core::Id, ProjectExplorer::Abi const&)
          (this=0x555555e1fe10, compilerPath=..., language=..., requiredAbi=...) at gcctoolchain.cpp:992
      #21 0x00007fffcb729a02 in ProjectExplorer::Internal::GccToolChainFactory::autoDetectToolchains(Utils::FileName const&, ProjectExplorer::Abi const&, Core::Id, Core::Id, QList<ProjectExplorer::ToolChain*> const&)
          (this=0x555555e1fe10, compilerPath=..., requiredAbi=..., language=..., requiredTypeId=..., alreadyKnown=...) at gcctoolchain.cpp:978
      #22 0x00007fffcb72a083 in ProjectExplorer::Internal::GccToolChainFactory::versionProbe(QString const&, Core::Id, Core::Id, QList<ProjectExplorer::ToolChain*>&, QList<ProjectExplorer::ToolChain*>&, QSet<QString> const&) (this=0x555555e1fe10, name=..., language=..., type=..., tcs=..., known=..., filteredNames=...) at gcctoolchain.cpp:892
      #23 0x00007fffcb72abad in ProjectExplorer::Internal::ClangToolChainFactory::autoDetect(QList<ProjectExplorer::ToolChain*> const&) (this=0x555555e1fe10, alreadyKnown=...) at /usr/include/qt5/QtCore/qstring.h:687
      #24 0x00007fffcb84e8e6 in ProjectExplorer::Internal::autoDetectToolChains (alreadyKnownTcs=...) at toolchainsettingsaccessor.cpp:74
      #25 0x00007fffcb84e8e6 in ProjectExplorer::Internal::ToolChainSettingsAccessor::restoreToolChains(QWidget*) const (this=this@entry=0x555555704230, parent=0x555555747450) at toolchainsettingsaccessor.cpp:208
      #26 0x00007fffcb84792e in ProjectExplorer::ToolChainManager::restoreToolChains() () at toolchainmanager.cpp:122
      #27 0x00007fffcb6e3ee9 in ProjectExplorer::ProjectExplorerPlugin::restoreKits() (this=<optimized out>) at projectexplorer.cpp:1810
      #28 0x00007ffff6cf9dc6 in  () at /lib64/libQt5Core.so.5
      #29 0x00007ffff6cee3c5 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
      #30 0x00007ffff77d9ad6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
      #31 0x00007ffff77e2f50 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
      #32 0x00007ffff6cc32e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
      #33 0x00007ffff6d176b3 in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
      #34 0x00007ffff6d17f6c in  () at /lib64/libQt5Core.so.5
      #35 0x00007ffff5412fd0 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
      #36 0x00007ffff5413368 in  () at /lib64/libglib-2.0.so.0
      #37 0x00007ffff5413413 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
      #38 0x00007ffff6d183f5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
      #39 0x00007ffff6cc22bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
      #40 0x00007ffff6cc9fd6 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
      #41 0x000055555555fd94 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at main.cpp:631
      

        Attachments

        For Gerrit Dashboard: QTCREATORBUG-22439
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              kandeler Christian Kandeler
              Reporter:
              kane Antons Jeļkins
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes