Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.0
-
None
Description
Steps to reproduce:
- prepare a debug VM for qtxmlpatterns, dev branch, Ubuntu 20.04, armv7 target
- ssh into the VM and run tst_xmlpatterns as such:
qt@10-215-100-167:~$ export QEMU_LD_PREFIX=/opt/yocto-armv7/sysroots/armv7at2hf-neon-poky-linux-gnueabi qt@10-215-100-167:~$ cd /home/qt/work/qt/qtxmlpatterns/tests/auto/xmlpatterns qt@10-215-100-167:~/work/qt/qtxmlpatterns/tests/auto/xmlpatterns$ make -j1 check /home/qt/work/qt/qtxmlpatterns/tests/auto/xmlpatterns/target_wrapper.sh ./tst_xmlpatterns ********* Start testing of tst_XmlPatterns ********* Config: Using QtTest library 6.0.0, Qt 6.0.0 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 8.3.0) SKIP : tst_XmlPatterns::initTestCase() The command line tool (/home/qt/work/install/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run. Loc: [tst_xmlpatterns.cpp(112)] QWARN : tst_XmlPatterns::initTestCase() QProcess: Destroyed while process ("/home/qt/work/install/bin/xmlpatterns") is still running. Connection to 10.215.100.167 closed by remote host. Connection to 10.215.100.167 closed.
There is a 30s wait and then the whole session is killed.
I run the individual test with high verbosity and got:
********* Start testing of tst_XmlPatterns ********* Config: Using QtTest library 6.0.0, Qt 6.0.0 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 8.3.0) INFO : tst_XmlPatterns::initTestCase() entering INFO : tst_XmlPatterns::initTestCase() QVERIFY(m_normalizeTestName.isValid()) Loc: [tst_xmlpatterns.cpp(98)] SKIP : tst_XmlPatterns::initTestCase() The command line tool (/home/qt/work/install/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run. Loc: [tst_xmlpatterns.cpp(112)] QWARN : tst_XmlPatterns::initTestCase() QProcess: Destroyed while process ("/home/qt/work/install/bin/xmlpatterns") is still running. Connection to 10.215.100.167 closed by remote host. Connection to 10.215.100.167 closed.
Even higher verbosity:
$ ./tst_xmlpatterns -v2 -vs ********* Start testing of tst_XmlPatterns ********* Config: Using QtTest library 6.0.0, Qt 6.0.0 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 8.3.0) INFO : tst_XmlPatterns::initTestCase() entering INFO : tst_XmlPatterns::initTestCase() Signal: QThread(f3a87e00) started () INFO : tst_XmlPatterns::initTestCase() QVERIFY(m_normalizeTestName.isValid()) Loc: [tst_xmlpatterns.cpp(98)] INFO : tst_XmlPatterns::initTestCase() Signal: QProcess(f6fda714) stateChanged () INFO : tst_XmlPatterns::initTestCase() Signal: QProcess(f6fda714) stateChanged () INFO : tst_XmlPatterns::initTestCase() Signal: QProcess(f6fda714) started () [ ... hanging for 30s ... ] SKIP : tst_XmlPatterns::initTestCase() The command line tool (/home/qt/work/install/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run. Loc: [tst_xmlpatterns.cpp(112)] QWARN : tst_XmlPatterns::initTestCase() QProcess: Destroyed while process ("/home/qt/work/install/bin/xmlpatterns") is still running. Connection to 10.215.103.239 closed by remote host. Connection to 10.215.103.239 closed
I also run it under strace:
qt@10-215-100-167:~$ export QEMU_LD_PREFIX=/opt/yocto-armv7/sysroots/armv7at2hf-neon-poky-linux-gnueabi qt@10-215-100-167:~$ cd /home/qt/work/qt/qtxmlpatterns/tests/auto/xmlpatterns qt@10-215-100-167:~/work/qt/qtxmlpatterns/tests/auto/xmlpatterns$ strace -t -s 512 -o strace.log ./tst_xmlpatterns ********* Start testing of tst_XmlPatterns ********* Config: Using QtTest library 6.0.0, Qt 6.0.0 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 8.3.0) SKIP : tst_XmlPatterns::initTestCase() The command line tool (/home/qt/work/install/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run. Loc: [tst_xmlpatterns.cpp(112)] QWARN : tst_XmlPatterns::initTestCase() QProcess: Destroyed while process ("/home/qt/work/install/bin/xmlpatterns") is still running. Connection to 10.215.100.167 closed by remote host. Connection to 10.215.100.167 closed.
The last part of the strace log is:
13:16:35 clock_gettime(CLOCK_MONOTONIC, {tv_sec=165851, tv_nsec=350269750}) = 0 13:16:35 clock_gettime(CLOCK_MONOTONIC, {tv_sec=165851, tv_nsec=350344863}) = 0 13:16:35 ppoll([{fd=-1}, {fd=-1}, {fd=-1}, {fd=0, events=POLLIN}], 4, {tv_sec=29, tv_nsec=998000000}, NULL, 8) = 0 (Timeout) 13:17:05 write(1, "SKIP : tst_XmlPatterns::initTestCase() The command line tool (/home/qt/work/install/bin/xmlpatterns) could not be run, possibly because Qt was incompletely built or installed. No tests will be run.\n Loc: [tst_xmlpatterns.cpp(112)]\n", 235) = 235 13:17:05 openat(AT_FDCWD, "/home/qt/work/install/qtlogging.ini", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 13:17:05 newfstatat(AT_FDCWD, "/home/qt/.config/QtProject/qtlogging.ini", 0x7ffe72852360, 0) = -1 ENOENT (No such file or directory) 13:17:05 newfstatat(AT_FDCWD, "/etc/xdg/QtProject/qtlogging.ini", 0x7ffe72852360, 0) = -1 ENOENT (No such file or directory) 13:17:05 clock_gettime(CLOCK_MONOTONIC, {tv_sec=165881, tv_nsec=390698124}) = 0 13:17:05 write(1, "QWARN : tst_XmlPatterns::initTestCase() QProcess: Destroyed while process (\"/home/qt/work/install/bin/xmlpatterns\") is still running.\n", 135) = 135 13:17:05 kill(-1, SIGKILL (END)
Notice a 30s delay, followed by kill(-1). According to man 2 kill:
If pid equals -1, then sig is sent to every process for which the calling process has permission to send signal
Why is the test framework calling kill(-1)? Additionally I noticed very weird behaviour: if I hit ENTER during the 30s wait, then the test just continues (but fails), without any process getting killed.
EDIT: this seems to be happening only on non-native builds. Native build on Ubuntu 20.04 x86_64 doesn't seem to have that problem.
Attachments
Issue Links
- relates to
-
QTBUG-85287 Hanging tst_qprocess test on qemu armv7 CMake builds
- Closed
-
QTBUG-86187 Ubuntu 20.04 has InsignificantTests configurations in the CI
- Closed
-
QTBUG-86198 selftests fail on Linux QEMU (gcc-armv7) on Linux Ubuntu_20_04 (gcc-x86_64)
- Closed
- resulted from
-
QTQAINFRA-3699 Replace Ubuntu 18.04 with Ubuntu 20.04 in Qt6
- Closed
For Gerrit Dashboard: QTBUG-86285 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
313520,6 | Avoid doing kill(-1) in QProcess destructor | dev | qt/qtbase | Status: MERGED | +2 | 0 |
313894,10 | Make usage of forkfd_pidfd in QProcess a configurable feature | dev | qt/qtbase | Status: MERGED | +2 | 0 |
313896,12 | Disable usage of forkfd_pidfd in qemu configurations | dev | qt/qt5 | Status: MERGED | -1 | 0 |
319522,2 | Avoid doing kill(-1) in QProcess destructor | 5.15 | qt/qtbase | Status: ABANDONED | +2 | 0 |