From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Nico Boehr" <nrb@linux.ibm.com>,
"Marc Hartmayer" <mhartmay@linux.ibm.com>,
<frankja@linux.ibm.com>, <imbrenda@linux.ibm.com>,
<thuth@redhat.com>
Cc: <kvm@vger.kernel.org>, <linux-s390@vger.kernel.org>
Subject: Re: [kvm-unit-tests PATCH v1] arch-run: Wait for incoming socket being removed
Date: Tue, 12 Mar 2024 15:39:56 +1000 [thread overview]
Message-ID: <CZRJ3MUT6HWP.11KK3F4QNKUGH@wheely> (raw)
In-Reply-To: <170973018238.31923.4497119683216363940@t14-nrb>
On Wed Mar 6, 2024 at 11:03 PM AEST, Nico Boehr wrote:
> Quoting Marc Hartmayer (2024-03-05 19:12:16)
> [...]
> > > diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> > > index 2214d940cf7d..413f3eda8cb8 100644
> > > --- a/scripts/arch-run.bash
> > > +++ b/scripts/arch-run.bash
> > > @@ -237,12 +237,8 @@ do_migration ()
> > > echo > ${dst_infifo}
> > > rm ${dst_infifo}
> > >
> > > - # Ensure the incoming socket is removed, ready for next destination
> > > - if [ -S ${dst_incoming} ] ; then
> > > - echo "ERROR: Incoming migration socket not removed after migration." >& 2
> > > - qmp ${dst_qmp} '"quit"'> ${dst_qmpout} 2>/dev/null
> > > - return 2
> > > - fi
> > > + # Wait for the incoming socket being removed, ready for next destination
> > > + while [ -S ${dst_incoming} ] ; do sleep 0.1 ; done
> >
> > But now, you have removed the erroring out path completely. Maybe wait
> > max. 3s and then bail out?
>
> Well, I was considering that, but:
> - I'm not a huge fan of fine-grained timeouts. Fine-tuning a gazillion
> timeouts is not a fun task, I think you know what I'm talking about :)
> - a number of other places that can potentially get stuck also don't have
> proper timeouts (like waiting for the QMP socket or the migration
> socket), so for a proper solution we'd need to touch a lot of other
> places...
>
> What I think we really want is a migration timeout. That isn't quite simple
> since we can't easily pull $(timeout_cmd) before $(panic_cmd) and
> $(migration_cmd) in run-scripts...
>
> My suggestion: let's fix this issue and work on the timeout as a seperate
> fix.
The migration tests as a whole have big trouble with timeouts already.
The problem is timeouts are implemented with the 'timeout' command but
that is specific to the QEMU process so especially the migration harness
with lots of loops can easily hang.
I tried a few ways to address this like starting a background 'sleep ;
kill' shell, but that gets very complicated to handle interrupts properly
that kill the stuck bits and having the harness report the error
sanely. I'm thinking a subshell that runs the entire test case and start
*that* with 'timeout' might be a better approach.
So I agree, let's take patches that fix behaviour when there are no
timeouts, and address the timeout problem as a whole as a separate
effort rather than worrying too much about individual loops just yet.
(It's a fair review comment to ask though).
Thanks,
Nick
next prev parent reply other threads:[~2024-03-12 5:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 14:11 [kvm-unit-tests PATCH v1] arch-run: Wait for incoming socket being removed Nico Boehr
2024-03-05 18:12 ` Marc Hartmayer
2024-03-06 13:03 ` Nico Boehr
2024-03-12 5:39 ` Nicholas Piggin [this message]
2024-03-12 6:37 ` Nicholas Piggin
2024-03-12 6:45 ` 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=CZRJ3MUT6HWP.11KK3F4QNKUGH@wheely \
--to=npiggin@gmail.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mhartmay@linux.ibm.com \
--cc=nrb@linux.ibm.com \
--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