From: Peter Maydell <peter.maydell@linaro.org>
To: QEMU Developers <qemu-devel@nongnu.org>
Cc: Thomas Huth <thuth@redhat.com>
Subject: Re: test harness hang running functional test
Date: Thu, 7 Nov 2024 16:18:39 +0000 [thread overview]
Message-ID: <CAFEAcA8mPFGX-aUUvJ5NXyyb2a9LFo=k+fBigHKdpoNj32QtCw@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-4cf+yub8bsgtsdFOJD_9HziY3tekCN5s=+JcWEpw3Nw@mail.gmail.com>
On Thu, 7 Nov 2024 at 16:09, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> I was trying to track down why one of the functional tests was
> hanging, so I tried running it directly:
>
> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1
> QEMU_TEST_QEMU_BINARY=build/clang/qemu-system-loongarch64
> PYTHONPATH=./build/clang/pyvenv:./python time
> ./build/clang/pyvenv/bin/python3
> ./tests/functional/test_loongarch64_virt.py
>
> (This is with a QEMU built with the undefined-behaviour
> sanitizer.)
>
> Mostly this seems to succeed, but this time it's hung. Looking
> at the process tree:
>
> petmay01 3616444 0.0 0.0 4768 1124 pts/2 S+ 15:53 0:00
> \_ time ./build/clang/pyvenv/bin/python3
> ./tests/functional/test_loongarch64_virt.py
> petmay01 3616445 99.8 0.0 38480 23620 pts/2 R+ 15:53 13:20
> \_ ./build/clang/pyvenv/bin/python3
> ./tests/functional/test_loongarch64_virt.py
> petmay01 3616448 0.0 0.0 0 0 pts/2 Z+ 15:53 0:00
> \_ [qemu-system-loo] <defunct>
>
> The QEMU process itself has exited, but the test harness has
> not yet noticed or reaped the zombie process. Instead it's sitting
> there eating CPU. Presumably this is a bug in the test harness?
Eventually I hit ^C and got this backtrace:
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/./tests/functional/test_loongarch64_virt.py",
line 62, in <module>
QemuSystemTest.main()
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/functional/qemu_test/testcase.py",
line 71, in main
unittest.main(module = None, testRunner = tr, argv=["__dummy__", path])
File "/usr/lib/python3.10/unittest/main.py", line 101, in __init__
self.runTests()
File "/usr/lib/python3.10/unittest/main.py", line 271, in runTests
self.result = testRunner.run(self.test)
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/pyvenv/lib/python3.10/site-packages/pycotap/__init__.py",
line 156, in run
test(result)
File "/usr/lib/python3.10/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.10/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.10/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.10/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.10/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.10/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.10/unittest/case.py", line 650, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/usr/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/functional/test_loongarch64_virt.py",
line 57, in test_loongarch64_devices
self.wait_for_console_pattern('Run /sbin/init as init process')
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/functional/test_loongarch64_virt.py",
line 33, in wait_for_console_pattern
wait_for_console_pattern(self, success_message,
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/functional/qemu_test/cmd.py",
line 152, in wait_for_console_pattern
_console_interaction(test, success_message, failure_message, None, vm=vm)
File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/functional/qemu_test/cmd.py",
line 101, in _console_interaction
msg = console.readline().decode().strip()
File "/usr/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
Something has gone wrong if we can be blocked waiting for
guest input when the QEMU process has already exited...
-- PMM
next prev parent reply other threads:[~2024-11-07 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 16:09 test harness hang running functional test Peter Maydell
2024-11-07 16:18 ` Peter Maydell [this message]
2024-11-11 10:37 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA8mPFGX-aUUvJ5NXyyb2a9LFo=k+fBigHKdpoNj32QtCw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).