qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Cc: Eric Farman <farman@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	qemu-s390x <qemu-s390x@nongnu.org>
Subject: Re: getting the console output for s390 cdrom-test?
Date: Thu, 4 Feb 2021 17:08:42 +0100	[thread overview]
Message-ID: <c98d4f43-5a29-afcc-fe7d-a3d92063df3a@redhat.com> (raw)
In-Reply-To: <CAFEAcA8=vG-2Vzrdark8VC5NANe5Fb3qGTpSFk8X94KvXszTbA@mail.gmail.com>

On 22/01/2021 21.32, Peter Maydell wrote:
> Hi; I've been looking at why the s390 cdrom test has an intermittent
> failure on my aarch64 box. Looking at some TCG debug log output
> I think what is happening is that sometimes execution diverges from
> a successful run inside virtio_scsi_setup() and we end up failing
> a vs_assert(), which triggers a "Guest crashed on cpu 0: disabled-wait"
> which then makes the qtest hang until its timeout.
> 
> I think that vs_assert() ought to be printing some information
> to the console about which assert fails when it happens, but
> how do I need to tweak the qtest to get it to capture this
> console log somewhere?

  Hi!

Sorry for the late reply ... did you get any further with this already? 
Anyway, in case I need to get the console of a test, I normally modify the 
test case like this:

diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index 5af944a5fb..52f7ed050d 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -120,7 +120,7 @@ static void test_cdboot(gconstpointer data)
  {
      QTestState *qts;

-    qts = qtest_initf("-accel kvm -accel tcg -no-shutdown %s%s", (const 
char *)data,
+    qts = qtest_initf("-serial file:/tmp/stdio.txt -accel kvm -accel tcg 
-no-shutdown %s%s", (const char *)data,
                        isoimage);
      boot_sector_test(qts);
      qtest_quit(qts);

> PS: it would be nice if "guest BIOS asserts and puts the
> system into a detected-guest-crash state" resulted in the
> test failing rather than hanging :-)

We could maybe check for panic events in boot_sector_test() ... I can have a 
try when time permits...

> (Annoyingly, most of my attempts to get more information about
> where things go wrong seem to cause the bug to stop manifesting
> itself: eg building the s390-ccw.img without -O2; enabling
> TCG 'exec' logging; enabling 'trace:virtio*' tracepoints.
> The failure itself started with commit 7a3d37a3f233 updating
> the s390 bios blobs, but the changes that went into the new
> blobs don't really look like they would be responsible.
> I am starting to have gloomy thoughts about potential missing
> memory barrier insns between the CPU thread and the iothread
> doing the virtio device end of things...)

A Heisen-bug ... ugh ... but I wonder whether it's maybe rather an issue in 
the aarch64 TCG backend, since we've never seen this on other architectures 
before?

  Thomas



  reply	other threads:[~2021-02-04 16:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 20:32 getting the console output for s390 cdrom-test? Peter Maydell
2021-02-04 16:08 ` Thomas Huth [this message]
2021-02-08 10:27   ` Peter Maydell
2021-02-08 11:34     ` Thomas Huth
2021-02-08 12:08       ` Peter Maydell
2021-02-09 14:58         ` Peter Maydell
2021-02-09 17:10           ` Cornelia Huck
2021-02-09 17:17             ` Peter Maydell
2021-02-09 17:24               ` Cornelia Huck
2021-02-09 18:25                 ` Peter Maydell
2021-02-12 11:44                   ` Thomas Huth
2021-02-12 12:05                     ` Peter Maydell
2021-02-12 14:10                       ` 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=c98d4f43-5a29-afcc-fe7d-a3d92063df3a@redhat.com \
    --to=thuth@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /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).