qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH] char-pty: fix glib assert
Date: Mon, 29 Jan 2018 17:17:08 +0100	[thread overview]
Message-ID: <20180129161708.13616-1-quintela@redhat.com> (raw)

I am having this assert over and over:

(process:30804): GLib-CRITICAL **: g_source_unref: assertion 'source != NULL' failed

gdb points to the line changed on this patch, and my reading of
commit:

2c716ba1506769c9be2caa02f0f6d6e7c00f4304

is that it should be timer_src what is unrefered there.

But I don't claim to fully understand this code, so ....

Any comment?

Thanks, Juan.

Signed-off-by: Juan Quintela <quintela@redhat.com>
CC: Peter Xu <peterx@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>


---
 chardev/char-pty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index 89315e6807..c26e02bce8 100644
--- a/chardev/char-pty.c
+++ b/chardev/char-pty.c
@@ -57,8 +57,8 @@ static gboolean pty_chr_timer(gpointer opaque)
     PtyChardev *s = PTY_CHARDEV(opaque);
 
     qemu_mutex_lock(&chr->chr_write_lock);
+    g_source_unref(s->timer_src);
     s->timer_src = NULL;
-    g_source_unref(s->open_source);
     s->open_source = NULL;
     if (!s->connected) {
         /* Next poll ... */
-- 
2.14.3

             reply	other threads:[~2018-01-29 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 16:17 Juan Quintela [this message]
2018-01-29 16:40 ` [Qemu-devel] [PATCH] char-pty: fix glib assert Laurent Vivier
2018-01-30  1:29   ` Peter Xu

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=20180129161708.13616-1-quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@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).