Details
Description
[Edited]
I see the following on my new machine, fresh setup of Ubuntu 20.04.1 LTS, and a self-build Qt 5.15. I don't see it with pre-build binaries from https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.15.0-focal:
Change 22f0905b4ac1a ( https://codereview.qt-project.org/c/qt/qtbase/+/108456 ) ill-affects the ability to debug code like
#include <QCoreApplication> #include <QProcess> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QProcess p; p.start("/bin/ls", {"--version"}); p.waitForStarted(); p.waitForFinished(); qDebug() << p.readAllStandardOutput(); return 0; }
For gdb (tested 9.1 and some version from 2017) there was before:
$ gdb ./untitled -ex run -ex quit -batch [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 89575] "ls (GNU coreutils) 8.30\nCopyright (C) 2018 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nWritten by Richard M. Stallman and David MacKenzie.\n" [Inferior 1 (process 89571) exited normally]
Afterwards:
$ gdb ./untitled -ex run -ex quit -batch [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff50ce780 (LWP 88899)] process 88895 is executing new program: /usr/bin/ls warning: Probes-based dynamic linker interface failed. Reverting to original interface. Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to LWP 88899] 0x00007ffff7fd37a5 in ?? () from /lib64/ld-linux-x86-64.so.2 A debugging session is active. Inferior 1 [process 88895] will be killed.
Not exactly the same, but also bad for LLDB.
Before:
(lldb) target create "/tmp/untitled/untitled" Current executable set to '/tmp/untitled/untitled' (x86_64). (lldb) r Process 396885 launched: '/tmp/untitled/untitled' (x86_64) Process 396885 stopped and restarted: thread 1 received signal: SIGCHLD "ls (GNU coreutils) 8.30\nCopyright (C) 2018 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nWritten by Richard M. Stallman and David MacKenzie.\n" Process 396885 exited with status = 0 (0x00000000)
Afterwards:
(lldb) target create "/tmp/untitled/untitled" Current executable set to '/tmp/untitled/untitled' (x86_64). (lldb) r Process 396365 launched: '/tmp/untitled/untitled' (x86_64) Process 396365 stopped * thread #1, name = 'untitled', stop reason = signal SIGSTOP frame #0: 0xffffffffffffffff QProcess: Destroyed while process ("/bin/ls") is still running.
Attachments
Issue Links
- is duplicated by
-
QTBUG-86704 (Remote) debugging in conjunction with QProcess not possible (gdbserver: PID mismatch!)
- Closed
- relates to
-
QTCREATORBUG-25228 Debugger bugreport checklist
- Reported
- replaces
-
QTBUG-86983 QProcess::start() causes SIGTRAP and then SISSEGV under GDB
- Closed
For Gerrit Dashboard: QTBUG-86319 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
312486,1 | Disable use of forkfd / CLONE_PIDFD until Qt 6.4 | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
313535,4 | forkfd/Linux: ask clone() to use the SIGCHLD as the termination signal | dev | qt/qtbase | Status: MERGED | +2 | 0 |
314049,2 | forkfd/Linux: ask clone() to use the SIGCHLD as the termination signal | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |