Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86285

tst_xmlpatterns on Ubuntu 20.04 armv7 target, kills all user processes (including Coin or the ssh session)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.0
    • XML: QtXmlPatterns
    • None
    • Linux/Yocto

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              jimis Dimitrios Apostolou
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes