Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • 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)



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



  • @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.



  • @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...


Log in to reply