4

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. I found out that the trap is not caused when no breakpoint is set.

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?

robni
  • 904
  • 2
  • 6
  • 20
Elias
  • 41
  • 3
  • I'm having exactly the same issue. Did you find a solution or is this a new bug in Qt? – knro Nov 27 '20 at 14:27
  • Sorry for the late response. I recently had no problems like the one described above. Since the packages were upgraded in the arch linux distribution I assume that the problem is fixed. Unfortunately I do not know what exactly caused the issue. In our software I do not have problems using qprocess and gdb anymore. If you still face this issue it might be interesting which versions you use (if the problem is caused by one of the packages I mentioned). – Elias Dec 06 '20 at 01:55

0 Answers0