qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 14:58:16 -0400	[thread overview]
Message-ID: <077cee03-efd0-4716-865a-b9990afb91a3@linux.ibm.com> (raw)
In-Reply-To: <87jze9qlrp.fsf@suse.de>



On 10/15/24 2:11 PM, Fabiano Rosas wrote:
> Hi Stefan,
> 
> I see the tpm-tis-device-swtpm test timing out, could you take a look?
> 
> qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test time out (After 60.0 seconds)
> 135/138 qemu:qtest+qtest-aarch64 /
> qtest-aarch64/tpm-tis-device-swtpm-test TIMEOUT 60.01s killed by signal 11 SIGSEGV

Is this something new or been happening for a while? Does it happen 
consistently? I just build the master branch and ran the tests on a very 
old machine, I mean 13 years old. The host runs Fedora 40 with 
libtpms-0.96-6 + swtpm-0.9.0 from the distro:

104/473 qemu:qtest+qtest-aarch64 / 
qtest-aarch64/tpm-tis-device-swtpm-test           OK               2.32s 
   2 subtests passed

I see some other non-TPM tests timing out but not this one. Same result 
for TIS test on 2nd run.

104/473 qemu:qtest+qtest-aarch64 / 
qtest-aarch64/tpm-tis-device-swtpm-test           OK               2.51s 
   2 subtests passed

3rd run:

104/473 qemu:qtest+qtest-aarch64 / 
qtest-aarch64/tpm-tis-device-swtpm-test           OK               2.37s 
   2 subtests passed

4th run:

104/473 qemu:qtest+qtest-aarch64 / 
qtest-aarch64/tpm-tis-device-swtpm-test           OK               2.63s 
   2 subtests passed



If I run it as a single test on the command line like this then it 
consistently works here - I ran it >10 times now.

$ QTEST_QEMU_BINARY=build/qemu-system-aarch64 
./build/tests/qtest/tpm-tis-device-swtpm-test
TAP version 13
# random seed: R02S8155b3cf024c2696e895e5f548396138
1..2
# Start of aarch64 tests
# Start of tpm tests
# Start of tis-swtpm tests
# starting QEMU: exec build/qemu-system-aarch64 -qtest 
unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev 
socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon 
chardev=char0,mode=control -display none -audio none -machine 
virt,gic-version=max -accel tcg -chardev 
socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/sock 
-tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev 
-accel qtest
ok 1 /aarch64/tpm/tis-swtpm/test
# slow test /aarch64/tpm/tis-swtpm/test executed in 0.66 secs
# End of tis-swtpm tests
# Start of tis-swtpm-migration tests
# starting QEMU: exec build/qemu-system-aarch64 -qtest 
unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev 
socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon 
chardev=char0,mode=control -display none -audio none -machine 
virt,gic-version=max -accel tcg -chardev 
socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/sock 
-tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev 
-accel qtest
# starting QEMU: exec build/qemu-system-aarch64 -qtest 
unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev 
socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon 
chardev=char0,mode=control -display none -audio none -machine 
virt,gic-version=max -accel tcg -chardev 
socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.V9TOV2/sock 
-tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev 
-incoming unix:/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/migsocket 
-accel qtest
ok 2 /aarch64/tpm/tis-swtpm-migration/test
# slow test /aarch64/tpm/tis-swtpm-migration/test executed in 1.10 secs
# End of tis-swtpm-migration tests
# End of tpm tests
# End of aarch64 tests




> 
> (gdb) bt
> #0 0x00005654e7ac4872 in tpm_tis_transfer (s=0x5654e7dec570, req=0x5654e7b42410 <tpm_pcrread> "\200\001", req_size=21, rsp=0x7ffd2295ca00 '\377' <repeats 200 times>..., rsp_size=1024) at ../tests/qtest/tpm-tis-util.c:490
> #1 0x00005654e7ac1879 in tpm_util_pcrread (s=0x5654e7dec570, tx=0x5654e7ac467a <tpm_tis_transfer>, exp_resp=0x5654e7b42620 <tpm_pcrread_resp> "\200\001", exp_resp_size=63) at ../tests/qtest/tpm-util.c:96
> #2 0xffffffffffffffff in ?? ()
> ...
> 
> (gdb) l
> 485         sts = qtest_readl(s, TIS_REG(0, TPM_TIS_REG_STS));
> 486         bcount = (sts >> 8) & 0xffff;
> 487
> 488         memset(rsp, 0, rsp_size);
> 489         for (i = 0; i < bcount; i++) {
> 490             rsp[i] = qtest_readb(s, TIS_REG(0, TPM_TIS_REG_DATA_FIFO));
> 491         }
> 492
> 493         /* relinquish use of locality 0 */
> 494         qtest_writeb(s, TIS_REG(0, TPM_TIS_REG_ACCESS),
> (gdb) p rsp_size
> $5 = 1024
> (gdb) p bcount
> $6 = 65535
> 
> Thanks!
> 


  reply	other threads:[~2024-10-15 18:59 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 [this message]
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
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=077cee03-efd0-4716-865a-b9990afb91a3@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).