Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess::start and GDB leading to missing symbols / ?? in stack
Forum Updated to NodeBB v4.3 + New Features

QProcess::start and GDB leading to missing symbols / ?? in stack

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 836 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Uriel Elias
    wrote on last edited by
    #1

    I am currently having some trouble debugging a program that starts processes via QProcess. Simply executing the binary without dbg works just fine but when I try to debug the executable with gdb I am getting a SIGTRAP when the process has started. After that the stack always shows '??' instead of function names. When continuing I get a SIGILL.

    In my project I also get following output:

    Probes-based dynamic linker interface failed.
    

    I am not sure whether this is related to loaded plugins or libraries.
    The problem can be reproduced (except from the " Probes-based dynamic linker interface failed." output) with the following code:

    #include <QCoreApplication>
    
    #include <QProcess>
    #include <QDebug>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        QProcess proc;
        QString exe = "echo";
        QStringList arguments;
        arguments << "Test";
    
        proc.start(exe, arguments);
        if (!proc.waitForFinished()) {
            qDebug() << "failed to start" << proc.exitCode() << proc.errorString();
        }
    
        qDebug() << "process finished";
        qDebug() << proc.readAllStandardOutput();
    
        return a.exec();
    }
    

    My OS is arch linux (up to date)

    • Qt5: qt5-base 5.15.1-1
    • GDB: gdb 9.2-1
    • clang++: clang 10.0.1-1

    Does anybody have an idea what is causing the SIGTRAP when debugging with dbg?

    (This is a copy of my question on stackoverflow: https://stackoverflow.com/questions/63968813/why-do-qprocess-qt-5-15-1-and-gdb-lead-to-missing-symbols)

    1 Reply Last reply
    1
    • U Offline
      U Offline
      Uriel Elias
      wrote on last edited by
      #2

      I found out that the trap is not caused when no breakpoint is set.

      JonBJ 1 Reply Last reply
      0
      • U Uriel Elias

        I found out that the trap is not caused when no breakpoint is set.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Uriel-Elias
        I don't know what the cause/solution is, but for Probes-based dynamic linker interface failed you probably need to read https://dustri.org/b/solving-warning-probes-based-dynamic-linker-interface-failed-in-gdb.html and https://github.com/matrix-construct/construct/issues/58 to see where others are reporting it.

        1 Reply Last reply
        1
        • U Offline
          U Offline
          Uriel Elias
          wrote on last edited by
          #4

          @JonB thank you for your answer!
          I found these two posts too but I am not sure whether my issue is related to my main problem: Crashing when starting a subprocess.
          Maybe this might explain my problems with "Probes-based dynamic linker interface failed" but I am afraid that the subprocess issue might be a little more tricky...

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Luca Ottaviano
            wrote on last edited by
            #5

            @Uriel-Elias I'm pretty sure I'm hitting a similar issue. Did you find a solution?

            1 Reply Last reply
            0
            • U Offline
              U Offline
              Uriel Elias
              wrote on last edited by
              #6

              Yes and no - it seems to have been solved in an update.
              I checked it right now and the issue does not persist.

              I did not really find out what caused the problems.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved