All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Bandan Das <bsd@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] ERROR:qom/object.c:907:object_unref: assertion failed (obj->ref > 0): (0 > 0)
Date: Thu, 15 Feb 2018 10:15:12 +0000	[thread overview]
Message-ID: <20180215101512.GD3322@redhat.com> (raw)
In-Reply-To: <jpg4lmj2gb5.fsf@linux.bootlegged.copy>

On Wed, Feb 14, 2018 at 08:27:10PM -0500, Bandan Das wrote:
> 
> I get the error mentioined in the subject line when using vncviewer with
> commit 13e1d0e71e78a925848258391a6e616b6b5ae219:
> 
> Author: Daniel P. Berrange <berrange@redhat.com>
> Date:   Thu Feb 1 16:45:14 2018 +0000
> 
>     ui: convert VNC server to QIONetListener
>     
>     The VNC server already has the ability to listen on multiple sockets.
>     Converting it to use the QIONetListener APIs though, will reduce the
>     amount of code in the VNC server and improve the clarity of what is
>     left.
>     
>     Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>     Message-id: 20180201164514.10330-1-berrange@redhat.com
>     Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> 
> 
> It appears to be related to the unconditional unref in vnc_listen_io:
> static void vnc_listen_io(QIONetListener *listener,
>                           QIOChannelSocket *cioc,
>                           void *opaque)
> {
>     VncDisplay *vd = opaque;
>     bool isWebsock = listener == vd->wslistener;
> 
>     qio_channel_set_name(QIO_CHANNEL(cioc),
>                          isWebsock ? "vnc-ws-server" : "vnc-server");
>     qio_channel_set_delay(QIO_CHANNEL(cioc), false);
>     vnc_connect(vd, cioc, false, isWebsock);
>     object_unref(OBJECT(cioc));
> }

[snip]

> So, it looks like the unref is already being handled as part of the event
> handling stuff when the window is closed. Is this a known issue/Is the
> object_unref above required ?

Yeah, my bad. The vnc_listen_io fnuc does *not* own the reference it is
given in the cioc parameter, so should not be unref'ing it.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

      reply	other threads:[~2018-02-15 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15  1:27 [Qemu-devel] ERROR:qom/object.c:907:object_unref: assertion failed (obj->ref > 0): (0 > 0) Bandan Das
2018-02-15 10:15 ` Daniel P. Berrangé [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=20180215101512.GD3322@redhat.com \
    --to=berrange@redhat.com \
    --cc=bsd@redhat.com \
    --cc=kraxel@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 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.