From nobody Fri May 3 18:50:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com ARC-Seal: i=1; a=rsa-sha256; t=1565021041; cv=none; d=zoho.com; s=zohoarc; b=Zk53EA1ZdMuvCw8mGoUz1dx8XgDew0C0GXHLov6MG7VZnPUTynE3D/r41xwQ5SOBflmZempLtaKfjiWqQjc6UN/Taix3mgNpI6x+YKE6jYM5UA+WbOxYlNFD2aQzBBLNWpr78eFJTClzCycxVE/Cl05ejPISqpygpB+1ZDyD9o4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565021041; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=CdWOANkM1axfPHjZHbBQSmGHK1bh2RSeva0ws9U4E2g=; b=SH/LIjaozmtQhO9rX33qKJb5Uly8C62QHrsRgeX42dedwFhrNm1EPEg7eVOKSLF/5va6i88+MYtyHVd+zZddJc10SsbUEuetAyXMaKXhANgjgzR0TZbW4fS1D+2kS0ggECm4odRiphWR3dH2TdrHnMOGWt5/fQ46gSsy8MvWOmg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565021041543117.09977212843444; Mon, 5 Aug 2019 09:04:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E396C3082129; Mon, 5 Aug 2019 16:03:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E029260A97; Mon, 5 Aug 2019 16:03:57 +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 4947846F4A; Mon, 5 Aug 2019 16:03:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x75G3sYA024488 for ; Mon, 5 Aug 2019 12:03:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 944A5608C1; Mon, 5 Aug 2019 16:03:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DE1760A97 for ; Mon, 5 Aug 2019 16:03:52 +0000 (UTC) Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5595C3082A6C for ; Mon, 5 Aug 2019 16:03:51 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 8DE7741206 for ; Mon, 5 Aug 2019 16:03:49 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CKQRFG-J66b9 for ; Mon, 5 Aug 2019 19:03:48 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id AC34E404CB for ; Mon, 5 Aug 2019 19:03:48 +0300 (MSK) Received: from localhost (10.100.1.82) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 5 Aug 2019 19:03:48 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=mta-01; t=1565021028; x= 1566835429; bh=S8xtOsIW/xpzcmPiS/OYj1l0klu5jmxF/X5LVzisXxA=; b=O YdgFkjGb/ovUvvEX1ZtUXAb5Li5/4W4S69bp+reNFGgm16mvwEdt93MDZ9qFalAD oMj87j4yR7hyH7tSC57taWJNguJ4vqW6GbYxPWHVW5CTUsey5onpgeYYwZOV8ZN/ lWJGTgm3bwq7lBxiXFNJhcZgz0eub8YZzsSJkZRkp8= X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Date: Mon, 5 Aug 2019 19:03:45 +0300 Message-ID: <20190805160345.25506-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [10.100.1.82] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) X-Greylist: Sender passed SPF test, ACL 264 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 05 Aug 2019 16:03:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 05 Aug 2019 16:03:51 +0000 (UTC) for IP:'89.207.88.252' DOMAIN:'mta-02.yadro.com' HELO:'mta-01.yadro.com' FROM:'r.bolshakov@yadro.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS) 89.207.88.252 mta-02.yadro.com 89.207.88.252 mta-02.yadro.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Roman Bolshakov Subject: [libvirt] [PATCH] tools: console: Use proper constructor 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 05 Aug 2019 16:04:00 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" "virsh console" on macOS cannot attach to a domain and it doesn't matter if it's local or remote domain: $ ~ virsh console vm Connected to domain vm Escape character is ^] error: internal error: unable to wait on console condition The error comes from pthread_cond_wait that fails with EINVAL. The mutex in the parent is not initialized with pthread_mutex_init and it results in silent failure of pthead_mutex_lock and the attach failure. Fixes: 98361cc3b95 ("tools: console: make console virLockableObject") Signed-off-by: Roman Bolshakov --- tools/virsh-console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-console.c b/tools/virsh-console.c index 826a4afcb2..e16f841e57 100644 --- a/tools/virsh-console.c +++ b/tools/virsh-console.c @@ -367,7 +367,7 @@ virConsoleNew(void) if (virConsoleInitialize() < 0) return NULL; =20 - if (!(con =3D virObjectNew(virConsoleClass))) + if (!(con =3D virObjectLockableNew(virConsoleClass))) return NULL; =20 if (virCondInit(&con->cond) < 0) { --=20 2.20.1 (Apple Git-117) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list