From nobody Sun Dec 6 20:46:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1796291656; cv=none; d=zohomail.com; s=zohoarc; b=N6D3BuyikdjfnTX5I7OWVdxqjXJHZEOVr7Hmra+4SH6+kdURUvnYu4I9WIr2vGmM7gKjZavYVL04MPD14C8/Z54keSeYS+O7dtpQKVON2R4bM9vz64HVe+FChZ/JiAuuc4fvBdhG/8T9ZpmSlvnm+KBcUOwWvkN1BKCKO6oxkHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796291656; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JJf3jhvhCnTzkOxKqeTtWjzfwliNF5fdyo9aG7xl7mo=; b=UJrL14J3bxvClAcpzVo8cp9w+WVvTXqciWOQvIyht9UpvHhws+isz1VKbIN6aD3JFANVCqZhtZedLhOkcPyybReLmofRaUpNJXvLl/ZqkDXkfW3fk0+Wuu9SJnf++Fv5k0quVdQdQd9RQssjOXlYajljH0M6XMYeERRQ5gi2yrg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1796291655932290.040282294019; Thu, 3 Dec 2026 01:54:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZ3VQ-00062w-ST; Thu, 03 Dec 2026 04:53:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZ3VN-000625-OT for qemu-devel@nongnu.org; Thu, 03 Dec 2026 04:53:34 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xZ3VL-00006J-GO for qemu-devel@nongnu.org; Thu, 03 Dec 2026 04:53:33 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4a3517554f7so125929725e9.2 for ; Thu, 03 Dec 2026 01:53:30 -0800 (PST) Received: from alex-t14g7.lan (p200300cf572c2800ca1012a07db47e3a.dip0.t-ipconnect.de. [2003:cf:572c:2800:ca10:12a0:7db4:7e3a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab69bf680fsm95370962f8f.14.2026.12.03.01.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 01:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amutable-com.20260707.gappssmtp.com; s=20260707; t=1796291609; x=1796896409; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JJf3jhvhCnTzkOxKqeTtWjzfwliNF5fdyo9aG7xl7mo=; b=lU+fmi0u89QFdnAVtG4ICDP+diiEOWYcQKq5cL108rmFKj5Oa+T4T3toFPolGrGKK/ MYAmbNOPk8Yrin61yXzrZBmC2+ZjFwM6kbTLhLnB6ydjmQEA80viecLbGxqlPgGE8IBj nEgsGeqob1Kj7hZNDjmHCTTGKpZSg+lcJut9SgexzSFPq/rrcJZZ4EeVJrXC8Gn4SPWB //3sxWvsV/nnAumWCrO0S8TwMk1Qgj+Hyiutm3f5wbuAsAbJDjvhcmeU6hKQ7ttfEKsR RZDvot7CbkxLIRZrq0foa1AWaBAKqqsm0v36KCAt+FrMhjkCnHAvAGPpezwQPnIT3AtZ l5Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796291609; x=1796896409; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=JJf3jhvhCnTzkOxKqeTtWjzfwliNF5fdyo9aG7xl7mo=; b=b7jUdqM3rZxNFF6X4q1gUB/jeBz7aDazWHfxZMcSfPKpufRzv36y4kFDj546QXhSFL ArTrQJCGbz+7HPfOJtIivbrTHiY7A/Hwo/EMyvS83U+db9ToiITf0aMTkyaL+4N2eg2I +fX1x5TzmzQzqY2LYigMddyTz2tgYOFr7JluWEGQALTmJdznGuzsx0aqKdH8wsu69bQP zGnG+eQbyOR8O/6m3GW86hN8cS5Hw9dj0f6PtMaEWDXSk9N6eyKk7dlfBe/H+cWlHTDJ SaJXVEZwtWNGce2zEiw/LDBrfcFid9m7Pl+gVZ+kgBz0bI+C5eMKsfpfC2pVWNCMVKE7 sg5g== X-Gm-Message-State: APuU4Z9ROoKg/7jKKZhc/hgJjE0tZ2A8AMAbfxwEegsmSkA7TtfhisN7 cCSlOWx8l5PoT8Fh8+9FQqfbDHugGYqEk1gDePd11+Olx6Wy5mQopYnhXfYbi9oKGI/+oBPht7D ArwTu/sfc X-Gm-Gg: AZFdTZfR7Wr9pGpCCSbfRt5R26Uv9SgRsR9RBTpyRHgCkUddGVc46DEs+/c1B8/NhPE 2jCHbdNhHcMeIHI8U73mcCfsKmobYNN4u0d9dF/ratma+TWCrAmttAAMZK6w/qGB1LiWel/KdDN JT059bm16UMuTZRtHD8Fg9Tk+2JIQXw73zqY2F14WP97YF64uuT+9BNkaQF1HgOu2pYvO/Rug7J zxq1LFOI/a2nBvcHURo53Ez+8+ejdL+M/te+dAG6hNBWVh+QHSS0RE1McgxDXJb7RWJptsBMgRw wows53glM6RENWxqe3q/q2ER0AgfdBncrKQYMwnGCY+6l6grO8IK2IWP8cVSOjqXXERJfwAh6jq xzXjXxBJk/UhyZHBQcTQoJYRpB6q/OwPRF+IH5UVoKexBywA9hqJarUiuh3OFj0XNwGz83I/5+p Jcv+ckDzGGRs7CI8ytoKlgz4e5tyk0rTXJGEKQf6I72pr8j0nVeSzpkBD5y4DJlLfVYn39Ab4YF fgeQaSceWCKSFZBxuAvVfoVcq/07sBpaFBVxqoBZUcJf8/JL1KbubLb5JR/x0Yqc3GX2lbyc+MY Fb/QbN0Yg9foZhaClvUqoU2H/1ZbnoHiHGzPsMe2+InoasRDA4S2Yf8quQqo3UGjRXDVFihhSfW UAbUzr/zl9tGwwdgTLQ== X-Received: by 2002:a05:600c:3b99:b0:4a1:777b:8a12 with SMTP id 5b1f17b1804b1-4bb8880b984mr979434495e9.14.1796291609411; Thu, 03 Dec 2026 01:53:29 -0800 (PST) From: Alexander Mikhalitsyn To: qemu-devel@nongnu.org Cc: =?UTF-8?q?St=C3=A9phane=20Graber?= , Jesper Devantier , qemu-block@nongnu.org, Zhao Liu , Fabiano Rosas , Peter Xu , Keith Busch , Klaus Jensen , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Alexander Mikhalitsyn Subject: [PATCH v2] tests/functional/x86_64: fix race in NVMe live migration test Date: Thu, 3 Dec 2026 10:53:27 +0100 Message-ID: <20261203095327.31399-1-alex@amutable.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex@amutable.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amutable-com.20260707.gappssmtp.com) X-ZM-MESSAGEID: 1796291659315158500 This test uses /tmp to hold test_nvme_mig_workload.pid file, which is a PID of a "workload" process (producing heavy read I/O). Earlier I did a mistake and forgot to mount /tmp as tmpfs, instead /tmp was using the same storage as root-filesystem (which lives on NVMe device). The problem here is that for this device we use "snapshot=3Don" mode, so after live migration all data that was written on the underlying disk is lost. It is not critical for the test itself (because it's read-only test by design), but very critical for the test logic that uses /tmp to find out the PID of the workload process to kill it after live migration. Absence of this file causes test to fail spontaneously. Another part of the fix to make test more stable is to set migration parameters downtime-limit and max-bandwith explicitly. As Alex and Peter has reported only with this change test becomes stable enough. [ I personally wasn't able to reproduce the problem on my 2 different amd64 machines. ] Link: https://lore.kernel.org/all/20260921190345.1709227-1-alex.bennee@lina= ro.org/ Reported-by: Alex Benn=C3=A9e Tested-by: Peter Xu Tested-by: Alex Benn=C3=A9e Signed-off-by: Alexander Mikhalitsyn --- tests/functional/x86_64/test_nvme_migration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/x86_64/test_nvme_migration.py b/tests/functio= nal/x86_64/test_nvme_migration.py index 890f0aab6d..a82551309a 100755 --- a/tests/functional/x86_64/test_nvme_migration.py +++ b/tests/functional/x86_64/test_nvme_migration.py @@ -75,6 +75,11 @@ def configure_machine(self, vm): def launch_source_vm(self, vm): vm.launch() =20 + vm.cmd('migrate-set-parameters', **{ + 'downtime-limit': 2000000, + 'max-bandwidth': 10 * 1024**3, + }) + self.wait_for_console_pattern('Entering emergency mode.', vm) prompt =3D '# ' self.wait_for_console_pattern(prompt, vm) @@ -94,6 +99,8 @@ def launch_source_vm(self, vm): prompt, vm=3Dvm) exec_command_and_wait_for_pattern(self, 'mount -t sysfs sysfs /sys= ', prompt, vm=3Dvm) + exec_command_and_wait_for_pattern(self, 'mount -t tmpfs tmpfs /tmp= ', + prompt, vm=3Dvm) =20 # Run workload before migration to check if it continues # to run properly after migration. --=20 2.47.3