From nobody Sun Apr 28 10:12:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517242758571171.7192045792076; Mon, 29 Jan 2018 08:19:18 -0800 (PST) Received: from localhost ([::1]:47990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egC9N-0006ZA-KJ for importer@patchew.org; Mon, 29 Jan 2018 11:19:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egC7s-0005lr-7h for qemu-devel@nongnu.org; Mon, 29 Jan 2018 11:17:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egC7m-0005cO-Aq for qemu-devel@nongnu.org; Mon, 29 Jan 2018 11:17:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59790) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1egC7m-0005bM-43 for qemu-devel@nongnu.org; Mon, 29 Jan 2018 11:17:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64BED12B43 for ; Mon, 29 Jan 2018 16:17:37 +0000 (UTC) Received: from secure.mitica (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88B4418AC8; Mon, 29 Jan 2018 16:17:09 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 17:17:08 +0100 Message-Id: <20180129161708.13616-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 29 Jan 2018 16:17:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] char-pty: fix glib assert X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Paolo Bonzini , dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" I am having this assert over and over: (process:30804): GLib-CRITICAL **: g_source_unref: assertion 'source !=3D N= ULL' 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 CC: Peter Xu CC: Paolo Bonzini --- 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 =3D PTY_CHARDEV(opaque); =20 qemu_mutex_lock(&chr->chr_write_lock); + g_source_unref(s->timer_src); s->timer_src =3D NULL; - g_source_unref(s->open_source); s->open_source =3D NULL; if (!s->connected) { /* Next poll ... */ --=20 2.14.3