qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] qemu-char issues (was Re: [PULL 00/15] vhost, pc: fixes for
Date: Thu, 26 Nov 2015 17:38:57 +0000	[thread overview]
Message-ID: <CAFEAcA8gnBh4-rg1S_yWfiG4xnYsaviE6kt3sMvsdN7xV3VGYw@mail.gmail.com> (raw)
In-Reply-To: <20151126170122.GA25998@redhat.com>

On 26 November 2015 at 17:01, Michael S. Tsirkin <mst@redhat.com> wrote:
> Last note:
> https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#mainloop-memory-management
> suggests two ways to manage memory for sources.
> We seem to do neither, opting for a different approach.

We seem to pretty much be using what that doc calls the "preferred
approach": we record the tag we get back from g_source_attach
(this happens in io_add_watch_poll()).  Then on object destruction
we call remove_fd_in_watch() with that tag, which calls
io_remove_watch_poll(), which does a g_source_destroy(). And
it looks like g_source_destroy() is the "works on any GMainContext"
version of g_source_remove().

So I guess the question is: when this bug happens, have we
called g_source_destroy() before we got the callback from
glib, or is the problem that we didn't actually call
g_source_destroy() on everything we should have as part
of the destructor?

It's getting a bit late here now but I can have a look at
this tomorrow if nobody else gets there first.

thanks
-- PMM

      reply	other threads:[~2015-11-26 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 17:01 [Qemu-devel] qemu-char issues (was Re: [PULL 00/15] vhost, pc: fixes for Michael S. Tsirkin
2015-11-26 17:38 ` Peter Maydell [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=CAFEAcA8gnBh4-rg1S_yWfiG4xnYsaviE6kt3sMvsdN7xV3VGYw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).