From nobody Mon Sep 8 21:39:51 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1748341754; cv=none; d=zohomail.com; s=zohoarc; b=QxcgXgJpUfK3t4EWlTPj14WjvnpOdq1tk9FUO57uswxMxCBeHmbokyuqW9ptrrlUl5QLdE0o6VxELvTViMl7x71vEwXX982+AqFh4MLoOx0Hyw/MQ1/1aEZ/U0k7OdZWeitqq0wht4fkjAr9wCf//QjGiJYzdzw8hHdnZy3PGnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748341754; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=ubN2k/ikYTxpBHImlbePUkh0SEHw7l7s6F23jtT6/Fc=; b=Qd4edTqanJbmizEt+g1y3DWPF3gayJFeQJZ/RcrPOS0KsbREXaywnCmLP06MRDryMdgoETrS2MW51fJ0C6gP/3PegsXKcrxtvkujnOK6OnnH71CeOg085NpKXVff3LBxBBwwHDRmp3Ed0ezmG0Le3uQa3ahQCQGtCf+nocg6rIo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1748341754628159.6081414805053; Tue, 27 May 2025 03:29:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id A592E1376; Tue, 27 May 2025 06:29:13 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B3A3216DA; Tue, 27 May 2025 06:28:49 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5C14D1527; Tue, 27 May 2025 06:28:45 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 2F26D1527 for ; Tue, 27 May 2025 06:28:41 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-Qy4f81tPPoywGFIkNbE8zg-1; Tue, 27 May 2025 06:28:38 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C024E19560BC for ; Tue, 27 May 2025 10:28:37 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2CBE71955F1B for ; Tue, 27 May 2025 10:28:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748341720; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=4Bbwtico1KL+nsWYrq89GudWmloTzJw0uPjiiWOn9Sk=; b=byveciiKU4DWm7FdhPT3fkOKwo07edtvzyebqEkSY24XxKSsvTbg0Ea6tyZ3md3xwh1pNr JyJLHNqNTpuMBx+vrU4epGrvFtbsDrLktrf8fpAKqKBraY7ePQRM7O0ZWUuic2GhTEwvdB txnV+74+lnqY1mvGgV1aKjRQF4lZbCc= X-MC-Unique: Qy4f81tPPoywGFIkNbE8zg-1 X-Mimecast-MFC-AGG-ID: Qy4f81tPPoywGFIkNbE8zg_1748341717 To: devel@lists.libvirt.org Subject: [PATCH 1/2] qemu: Fix crash when resuming failed post-copy migration Date: Tue, 27 May 2025 12:28:20 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pbX-Fk1mp9hB47d6i1eu-KqvZntRD77HELnTHk2DtdI_1748341717 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3BHFSG4IVGPWBWZGMJVQRSXHG3VMK6G6 X-Message-ID-Hash: 3BHFSG4IVGPWBWZGMJVQRSXHG3VMK6G6 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1748341756920116600 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark Since commit 28a06215280 (released in 11.2.0) resuming a failed post-copy migration calls qemuProcessIncomingDefNew with fd =3D=3D NULL rather than -1. The function does not expect to be called with NULL file descriptor and tries to dereference it causing virtqemud on the destination host to crash. Fixes: 28a06215280b99708ed8dc2d183f62ba7b34ccf8 Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2a01ca58bd..1f91ad1117 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3642,6 +3642,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver, virDomainJobStatus status; virDomainObj *vm; int ret =3D -1; + int nofd =3D -1; =20 VIR_DEBUG("name=3D%s, origname=3D%s, protocol=3D%s, port=3D%hu, " "listenAddress=3D%s, flags=3D0x%x", @@ -3684,7 +3685,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver, priv->origname =3D g_strdup(origname); =20 if (!(incoming =3D qemuMigrationDstPrepare(driver, vm, false, protocol, - listenAddress, port, NULL))) + listenAddress, port, &nofd))) goto cleanup; =20 if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_IN) < 0) --=20 2.49.0 From nobody Mon Sep 8 21:39:51 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1748341769; cv=none; d=zohomail.com; s=zohoarc; b=mnth6pJclVzZnjjNlNnKLTmbtYx1FWQvg9kWHO3A8UmmsNYVWpb4v+/ThWEOuHR+n6F+Pbs+OT4FuoRWdkc8ShEzk6PBb8Ufjo6jK28KK5qjJ+h383SRXyafVFOQIf9DptT5HX/ZqckALb1usYakb+oUjenlGoY0l1XZdlx5MYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748341769; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Av40SgLITC1izDHzox6JwY6+Xu/tVRtnfiSnsRJ1IUg=; b=RwdqZ55cIBOwgW/xuL2TQeyEt4bNwbK/wvTllmm1HuYpk0pj0d3iONYeuudX5VBqkOMpP2CuleFGaUUHf7CcTpb7jMqejdt4MDgcqQ2K75TmjMZrWPpaxa247XIBeGUSRH+q094AkrCYl3cmjn0cgEIFlzOigxCg1ZDgjEPh7ss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1748341769344808.0817341680472; Tue, 27 May 2025 03:29:29 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 564711380; Tue, 27 May 2025 06:29:28 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 9A59D1788; Tue, 27 May 2025 06:28:53 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6731F1379; Tue, 27 May 2025 06:28:49 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3AB5C1379 for ; Tue, 27 May 2025 06:28:42 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-213-3YJEaACnM2mzlG2IchtAfw-1; Tue, 27 May 2025 06:28:40 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CCD30195608E for ; Tue, 27 May 2025 10:28:39 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4E3CE1956095 for ; Tue, 27 May 2025 10:28:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748341721; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=ncPygznFuzRXsaFvX7nijV0bvLHNN5dW2sHZn1YHT6M=; b=HY/lXbJBp+Olq6KIii2FGNc4+suoe3bqEpYEwYZOlrwSZya4fl8DKGR1Qz8a8hvBGUbYZr R8etdSIZjLc6i5CCZLdJOyGgve4za+ZjdG8+IrUjFw6L66KaWhCs2N8f7+X2JP3yK/bwjZ KCyIxrt/IcEKQZi1NhaNy8BPQyUD+nw= X-MC-Unique: 3YJEaACnM2mzlG2IchtAfw-1 X-Mimecast-MFC-AGG-ID: 3YJEaACnM2mzlG2IchtAfw_1748341719 To: devel@lists.libvirt.org Subject: [PATCH 2/2] NEWS: Fix virtqemud crash when resuming failed post-copy migration Date: Tue, 27 May 2025 12:28:21 +0200 Message-ID: <3c718dd83c1a6082deefa021cdc706f28c6fed40.1748341678.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Q0-JegqdXro99folNf_JDwkMhB6kkwWAF6XCBw8K5kc_1748341719 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OHBFEVGO26QLONSN3DFGEJAMHQ75HTX3 X-Message-ID-Hash: OHBFEVGO26QLONSN3DFGEJAMHQ75HTX3 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1748341771082116600 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- NEWS.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 636fcbd573..a880524ca2 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -42,6 +42,13 @@ v11.4.0 (unreleased) =20 The only workaround is to avoid the broken versions. =20 + * qemu: Fix virtqemud crash when resuming failed post-copy migration + + A regression introduced in ``libvirt-11.2.0`` caused virtqemud on the + destination host to crash when trying to resume failed post-copy + migration. + + v11.3.0 (2025-05-02) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.49.0