From: Stefan Berger <stefanb@linux.ibm.com>
To: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Subject: Re: tpm-tis-device-swtpm-test timeout
Date: Tue, 15 Oct 2024 21:52:30 -0400 [thread overview]
Message-ID: <68423739-272e-4826-a9c9-50e4755cc8a4@linux.ibm.com> (raw)
In-Reply-To: <eee403f1-058f-4222-902f-eb1e78ab54e0@linux.ibm.com>
On 10/15/24 7:35 PM, Stefan Berger wrote:
>
>
> On 10/15/24 6:02 PM, Fabiano Rosas wrote:
>> Stefan Berger <stefanb@linux.ibm.com> writes:
>>
>>>
>>
>> Yes, I've been using that method to reproduce live migration race
>> conditions as well. It's quite effective.
>>
>> If you don't think you'll be able to find the root cause due to the
>> unreproducibility on your side, maybe we could at least add an assert
>> that bcount is not larger than rsp_size. I think that would at least
>> give an explicit error instead of a buffer overflow.
>>
>> I can also try to dig deeper into this when I get some time. At the
>> moment I know nothing about the tpm device emulation.
>>
>
> The loop has run 3000 times by itself so that part is stable. However,
> it seems there is some other test case that the loop cannot run in
> parallel with. So, yes there is 'something'. ... ... Just having all
> CPUs in a system busy requires waiting for migration to be complete on
> the dst_qemu side as well. Can you try it with this patch:
>
> diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c
> index fb94496bbd..b52cd44841 100644
> --- a/tests/qtest/tpm-tests.c
> +++ b/tests/qtest/tpm-tests.c
> @@ -115,6 +115,7 @@ void tpm_test_swtpm_migration_test(const char
> *src_tpm_path,
>
> tpm_util_migrate(src_qemu, uri);
> tpm_util_wait_for_migration_complete(src_qemu);
> + tpm_util_wait_for_migration_complete(dst_qemu);
>
> tpm_util_pcrread(dst_qemu, tx, tpm_pcrread_resp,
> sizeof(tpm_pcrread_resp));
>
Only waiting on the destination side is also possible:
diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c
index fb94496bbd..197714f8d9 100644
--- a/tests/qtest/tpm-tests.c
+++ b/tests/qtest/tpm-tests.c
@@ -114,7 +114,7 @@ void tpm_test_swtpm_migration_test(const char
*src_tpm_path,
sizeof(tpm_pcrread_resp));
tpm_util_migrate(src_qemu, uri);
- tpm_util_wait_for_migration_complete(src_qemu);
+ tpm_util_wait_for_migration_complete(dst_qemu);
tpm_util_pcrread(dst_qemu, tx, tpm_pcrread_resp,
sizeof(tpm_pcrread_resp));
next prev parent reply other threads:[~2024-10-16 1:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 18:11 tpm-tis-device-swtpm-test timeout Fabiano Rosas
2024-10-15 18:58 ` Stefan Berger
2024-10-15 19:22 ` Fabiano Rosas
2024-10-15 19:32 ` Stefan Berger
2024-10-15 19:57 ` Fabiano Rosas
2024-10-15 20:57 ` Stefan Berger
2024-10-15 22:02 ` Fabiano Rosas
2024-10-15 23:35 ` Stefan Berger
2024-10-16 1:52 ` Stefan Berger [this message]
2024-10-16 14:03 ` Fabiano Rosas
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=68423739-272e-4826-a9c9-50e4755cc8a4@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=farosas@suse.de \
--cc=qemu-devel@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).