From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3EFCC4320E for ; Tue, 31 Aug 2021 17:52:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E32160698 for ; Tue, 31 Aug 2021 17:52:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E32160698 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tls.msk.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:37352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL7vr-0000Fb-93 for qemu-devel@archiver.kernel.org; Tue, 31 Aug 2021 13:52:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL7rZ-0007W8-KK; Tue, 31 Aug 2021 13:47:57 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:41457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL7rX-0001js-R1; Tue, 31 Aug 2021 13:47:57 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 65D0040835; Tue, 31 Aug 2021 20:47:43 +0300 (MSK) Received: from [192.168.177.130] (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id 3FEF171; Tue, 31 Aug 2021 20:47:43 +0300 (MSK) Subject: Re: qemu-sockets: account for trailing \0 byte in unix socket pathname To: =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= References: <20210830225449.1509719-1-mjt@msgid.tls.msk.ru> From: Michael Tokarev Message-ID: <5826ad07-380d-b84a-4d16-507312baff08@msgid.tls.msk.ru> Date: Tue, 31 Aug 2021 20:47:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -77 X-Spam_score: -7.8 X-Spam_bar: ------- X-Spam_report: (-7.8 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.932, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel , qemu-stable Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 31.08.2021 20:38, Daniel P. Berrangé wrote: ... >>> So it looks like libvirt provides an unnamed socket there, -- >>> maybe from a socketpair(2)? >>> >> >> Yes > > No, libvirt binds to a named socket path and passes in a pre-opened > FD for the listener socket. There shouldn't be any socketpair involved. Here's some more info from the original bugreport: 31.08.2021 00:20, dann frazier wrote: > Aha! It seems that the important difference is whether or not the > virt-manager GUI window for the VM is active. If it is active, the VM > crashes regardless of how it is started (virsh console start/clicking > "play" button). If the GUI is not active, the VM always works. > > With this knowledge I am able to confidently say that reverting > 4cfd970ec1 *does* reliably avoid the problem. We'll try to figure out the calltrace, where this socket is coming from.. /mjt