From nobody Mon Apr 29 07:45:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600872222; cv=none; d=zohomail.com; s=zohoarc; b=GYuuxBne0bDr0MsBXT5c2sdC6vjrfcRemyoNw7qXZe7OKufdUu8IlZh/mBAETlQ7VVHNWBE7fkUz6kBOr2qyLGm1n2EB8VkuIZppQ2IHXFCF7gu7z94a8ND5j4yqycSnBNjEW8BBr+pDFQG2VRIxFMdQ5MUiQOPqakSKKyW3e0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600872222; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=9o7AwhcjYtF7O5M4a0IHQ27k6MPl7MwUGd+bYCbRKqQ=; b=RRwkySK17YiIcLjvATha9Ur8lOjt7Hx9TonThGRB2ohRvJY2A6PtcKc1S/4rP94HowcT/gpL6FLynrcXo3aXmydj565Y+VxvCu51zpvKkNo6SOL16VG0t2ugk/QeEOkM4P4MTqZnzqi1VupR74aBQ8U6v5rz10wJa5EbpU5vqnw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1600872222856702.1973077259572; Wed, 23 Sep 2020 07:43:42 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-378-gr9IMjMdM1q_6CJ58CdIhQ-1; Wed, 23 Sep 2020 10:43:39 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E501BAD680; Wed, 23 Sep 2020 14:43:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DEB819C4F; Wed, 23 Sep 2020 14:43:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BBEE1183D040; Wed, 23 Sep 2020 14:43:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08NEdJ6l022386 for ; Wed, 23 Sep 2020 10:39:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 23C4D55764; Wed, 23 Sep 2020 14:39:19 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95A7C2C31E for ; Wed, 23 Sep 2020 14:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600872221; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9o7AwhcjYtF7O5M4a0IHQ27k6MPl7MwUGd+bYCbRKqQ=; b=d0N/UA4AMOcUHlzyaLu7U5NL0HxGU8VpF7ZCNhxIaF0Gukyfq4DRaXRoHr7g10qrDUNvob 0yuwv0nG/5CsHtXCRjDQFUz24EwVUd1X+7tL2L1TxoZn+mIM0j7FipezQSpB0PepePmQ9R FzeNcKG0cke66WrX7aV+oaCrssIRxoQ= X-MC-Unique: gr9IMjMdM1q_6CJ58CdIhQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] util: do not unref event thread after joining it Date: Wed, 23 Sep 2020 16:39:13 +0200 Message-Id: <5668bdd9e3d7e6c906114e564220713f11d7ed05.1600871950.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) =3D=3D295055=3D=3D Invalid read of size 4 =3D=3D295055=3D=3D at 0x4DA4AE4: g_thread_unref (in /usr/lib64/libglib-2= .0.so.0.6400.5) =3D=3D295055=3D=3D by 0x491D5FA: vir_event_thread_finalize (vireventthre= ad.c:47) =3D=3D295055=3D=3D by 0x4E6BCFF: g_object_unref (in /usr/lib64/libgobjec= t-2.0.so.0.6400.5) =3D=3D295055=3D=3D by 0x22F35CF4: qemuProcessQMPFree (qemu_process.c:852= 5) =3D=3D295055=3D=3D by 0x22E71B58: glib_autoptr_clear_qemuProcessQMP (qem= u_process.h:237) ... =3D=3D295055=3D=3D by 0x22E98A29: qemuDomainPostParseDataAlloc (qemu_dom= ain.c:5476) =3D=3D295055=3D=3D by 0x49ABF83: virDomainDefPostParse (domain_conf.c:60= 23) =3D=3D295055=3D=3D Address 0x2acb1c68 is 24 bytes inside a block of size 8= 8 free'd =3D=3D295055=3D=3D at 0x483B9F5: free (vg_replace_malloc.c:538) =3D=3D295055=3D=3D by 0x4D80A4C: g_free (in /usr/lib64/libglib-2.0.so.0.= 6400.5) ... =3D=3D295055=3D=3D by 0x491D5F1: vir_event_thread_finalize (vireventthre= ad.c:46) =3D=3D295055=3D=3D by 0x4E6BCFF: g_object_unref (in /usr/lib64/libgobjec= t-2.0.so.0.6400.5) =3D=3D295055=3D=3D by 0x22F35CF4: qemuProcessQMPFree (qemu_process.c:852= 5) =3D=3D295055=3D=3D by 0x22E71B58: glib_autoptr_clear_qemuProcessQMP (qem= u_process.h:237) ... =3D=3D295055=3D=3D Block was alloc'd at =3D=3D295055=3D=3D at 0x483A809: malloc (vg_replace_malloc.c:307) =3D=3D295055=3D=3D by 0x4D80958: g_malloc (in /usr/lib64/libglib-2.0.so.= 0.6400.5) ... =3D=3D295055=3D=3D by 0x4DA4C32: g_thread_try_new (in /usr/lib64/libglib= -2.0.so.0.6400.5) =3D=3D295055=3D=3D by 0x491D3BC: virEventThreadStart (vireventthread.c:1= 59) =3D=3D295055=3D=3D by 0x491D3BC: virEventThreadNew (vireventthread.c:185) ... Signed-off-by: J=C3=A1n Tomko Fixes: f4fc3db9204407874181117085756c9ced78adad Reviewed-by: Peter Krempa --- src/util/vireventthread.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/vireventthread.c b/src/util/vireventthread.c index 1bca2aa57a..8342f420f6 100644 --- a/src/util/vireventthread.c +++ b/src/util/vireventthread.c @@ -44,7 +44,6 @@ vir_event_thread_finalize(GObject *object) if (evt->thread) { g_main_loop_quit(evt->loop); g_thread_join(evt->thread); - g_thread_unref(evt->thread); } =20 g_main_loop_unref(evt->loop); --=20 2.26.2