All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Stefan Reiter <s.reiter@proxmox.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Wolfgang Bumiller <w.bumiller@proxmox.com>,
	Michael Roth <michael.roth@amd.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [PATCH] monitor/qmp: fix race with clients disconnecting early
Date: Thu, 14 Oct 2021 07:40:26 +0200	[thread overview]
Message-ID: <87k0igkvud.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <bc5f180d-3161-59c0-2ded-0808a150dec7@proxmox.com> (Stefan Reiter's message of "Wed, 13 Oct 2021 17:44:31 +0200")

Stefan Reiter <s.reiter@proxmox.com> writes:

> On 10/12/21 11:27 AM, Markus Armbruster wrote:
>> Stefan, any thoughts on this?
>> 
>
> Sorry, I didn't get to work on implementing this. Idea 3 does seem very
> reasonable, though I suppose the question is what all should go into the
> per-session state, and also how it is passed down.

Let's start with the state you have shown to be problematic.  To decide
what else to move from monitor state to session state, we'll want to
review monitor state one by one.  Can be done in review of patches
creating the session state.

Most users need the current session state.  So have struct MonitorQMP
hold a pointer to it.

To execute an in-band command in the main thread, we need the command's
session state.  I'd try adding a pointer to QMPRequest.

Then use reference counting to keep the session alive until all its
commands are processed.

Makes sense?

> We did roll out my initial patch to our users in the meantime and got
> some positive feedback (that specific error disappeared), however another
> one (reported at the same time) still exists, so I was trying to diagnose
> - it might also turn out to be monitor related and resolved by the more
> thorough fix proposed here, but unsure.

That would be lovely.

Thanks!



      reply	other threads:[~2021-10-14  7:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 10:11 [PATCH] monitor/qmp: fix race with clients disconnecting early Stefan Reiter
2021-08-23 15:05 ` Philippe Mathieu-Daudé
2021-08-25 15:54 ` Markus Armbruster
2021-08-26 13:50   ` Markus Armbruster
2021-08-26 15:15     ` Stefan Reiter
2021-08-31 15:45       ` Markus Armbruster
2021-09-02 12:05         ` Markus Armbruster
2021-09-02 12:45         ` Markus Armbruster
2021-10-12  9:27           ` Markus Armbruster
2021-10-13 15:44             ` Stefan Reiter
2021-10-14  5:40               ` Markus Armbruster [this message]

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=87k0igkvud.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=s.reiter@proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    --cc=w.bumiller@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.