From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE319606A31A for ; Wed, 2 Dec 2026 15:06:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=aFCSxSo0 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYlty-0001n5-Eo; Wed, 02 Dec 2026 10:05:46 -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 1xYltw-0001ke-1Q for qemu-devel@nongnu.org; Wed, 02 Dec 2026 10:05:44 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xYltt-0004im-KQ for qemu-devel@nongnu.org; Wed, 02 Dec 2026 10:05:43 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4bb6adaf0f1so110395815e9.0 for ; Wed, 02 Dec 2026 07:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796223939; x=1796828739; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to:content-type; bh=VAY+A6rGr3hycVONgavu2Jv3kd0rzx6cV2AUO4HfgM4=; b=aFCSxSo05TS0QLaJO2qIhx746doOIYNiomAuFEs9unU7Zs1bdi6DjIx7t/rZCUMF43 +ZiZdcsYsDBSxSGnpAySug1SM2cona9oecvZlLWOOVmuZxuKP9H3wDlHyh4Dm0o/62yY pnmYXZLGYTCJhzNy/Cqt3VGb/z5LnYw0W+mepsFeG3ojDFOZl+mIqhs5lE5W+Rb7ztog yDARIH/6hGzJgW/ZFsR+BvGA5EafD/LEFuNYgJMnPbWVWJivKEqHe5xrVp2RTkjN+IGL 6sLghsdvksu/rYhcty3YCctKB6WpGCeT8dG5V8q6HQuinyGzW0i6tQGmoXh0l1oHsmDu 62gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796223939; x=1796828739; h=content-transfer-encoding:content-type:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VAY+A6rGr3hycVONgavu2Jv3kd0rzx6cV2AUO4HfgM4=; b=fgHtE5/MoiAqWXtPwn2r9+ZHna2B97Cbfwi6NzpbA/6QZXJhfM0h5TimTJ0V9heE/M vZvW5XZzBC5qm2tR2bVOFKbnQEmDzztqL1ZF5O6szddbtqMWxTI27S5x/9wx1auk6nsn TVG+MDyaRFYyw1cOMiLiwOFy4L6MiFur4ylX+9DQH2vVvQC5E8pH5yB0WYqFO0uQKaHs 9sV/OPZJN2yQMjgr3pl38A0cpDHMcuw876djhLZ4iSkrSEth0ViDVnzmWQNN21eGOo38 0vrgYWP4js90mcYuWP8cXbsne2eZPMdTQzJmKcgDacN3YPxdErouA9V+rFkVFSGLmUWi j7Pw== X-Gm-Message-State: APuU4Z9i8cjE3u2ENmckooysJwyApF1as+DZGucZCQ3KZZEr70nG/e1J tRfRriHUbam73aWSbqEtrSpvsWU/VnL6QDz7rrPjYk7J7UXRhwnQKanlcRfJMKM4IUY= X-Gm-Gg: AZFdTZfPWdANdtvgqK3xJqcQxbNOs3Xa+hs7POvhpKkSbIyMVmRyOIzbW5d9AVUZijy q4lLOdJv6OjamcHsLDnaYBr6YfTS5fkPW0IUO50mt0yWR/9Cavdh2ME6E1zV7Jp1804SBJzjggy hWDS2Xj1aidOo52bjf22U265DCYY+bEMqivd/bhTpaYhXcTxvSz/d5x/6eQj40JBN4A+NAWuQ4b cweE4iHDgfyGzmNNtAUgtpjP8+I2co6VN4qyCYfkRe8FPxvyT9oLpj/+1LSj0NpOK/TOVL+37tm vwZgaGvGrm8sd+A8bVwE/Z2cE7VTzqHGmAf135fEH5z1zhUqUwz/kHR5KnAxjijinr6L8jt1i4Q 6fwIzdIGZtNL41PYURajlCS+CTniI3/SSLCzAvwtOu40Vo7LwLXCTlAsDxVHVUbOBgPHOQZQxmD vhbaIDt0HO5mMPz/zEa3MJmS6W0zJGGWMaXDKjKRROrW5p8DwnLsr89i7+4Ko6WIm6pRyfaEtXn r758pBjiY3hCnK5P7KTTA+CuALpAS6eVIMTsjGAjuq+qoYV54H9BHJVy7XYt9sF660xexMdazm9 IOFKtah9sPLyLVZyls+svqEayYEb9kaonQ8e37SLUlSY1j0dHw== X-Received: by 2002:a05:600c:4e0b:b0:4bb:6f45:2a79 with SMTP id 5b1f17b1804b1-4bb88817920mr876915625e9.22.1796223939352; Wed, 02 Dec 2026 07:05:39 -0800 (PST) Received: from draig.lan ([185.124.0.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6b205443sm82966637f8f.39.2026.12.02.07.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 07:05:37 -0800 (PST) Received: from draig (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E7BB75F9CE; Wed, 02 Dec 2026 15:05:35 +0000 (GMT) From: =?utf-8?Q?Alex_Benn=C3=A9e?= To: Alexander Mikhalitsyn Cc: qemu-devel@nongnu.org, peterx@redhat.com, =?utf-8?Q?St=C3=A9phane?= Graber , Zhao Liu , Klaus Jensen , Keith Busch , Paolo Bonzini , Fabiano Rosas , Jesper Devantier , qemu-block@nongnu.org Subject: Re: [PATCH] tests/functional/x86_64: fix race in NVMe live migration test In-Reply-To: <99e96424636a55eb9c897ab03c04d1a47666eb3c.camel@amutable.com> (Alexander Mikhalitsyn's message of "Wed, 02 Dec 2026 09:40:35 +0100") References: <20261121184301.21112-1-alex@amutable.com> <99e96424636a55eb9c897ab03c04d1a47666eb3c.camel@amutable.com> User-Agent: mu4e 1.14.5-pre2; emacs 30.1 Date: Wed, 02 Dec 2026 15:05:35 +0000 Message-ID: <875wxb3eps.fsf@draig.linaro.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Alexander Mikhalitsyn writes: > On Sat, 2026-11-21 at 19:43 +0100, Alexander Mikhalitsyn wrote: >> 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). >>=20 >> 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). >>=20 >> 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. >>=20 >> Link: >> https://lore.kernel.org/all/20260921190345.1709227-1-alex.bennee@linaro.= org/ >> Reported-by: Alex Benn=C3=A9e >> Tested-by: Peter Xu >> Signed-off-by: Alexander Mikhalitsyn >> --- >> =C2=A0tests/functional/x86_64/test_nvme_migration.py | 2 ++ >> =C2=A01 file changed, 2 insertions(+) >>=20 >> diff --git a/tests/functional/x86_64/test_nvme_migration.py >> b/tests/functional/x86_64/test_nvme_migration.py >> index 890f0aab6d..a8fb5f9e81 100755 >> --- a/tests/functional/x86_64/test_nvme_migration.py >> +++ b/tests/functional/x86_64/test_nvme_migration.py >> @@ -94,6 +94,8 @@ def launch_source_vm(self, vm): >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 prompt, vm=3Dvm) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exec_command_and_wait_f= or_pattern(self, 'mount -t sysfs >> sysfs /sys', >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 prompt, vm=3Dvm) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exec_command_and_wait_for_pa= ttern(self, 'mount -t tmpfs >> tmpfs /tmp', >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 prompt, vm=3Dvm) >> =C2=A0 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Run workload before m= igration to check if it continues >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # to run properly after= migration. > > Gentle ping Sorry I did look at this when you posted but I ran into errors but didn't have time to diagnose: =E2=9E=9C ./run meson test --suite thorough func-x86_64-nvme_migration ninja: Entering directory `/home/alex/lsrc/qemu.git/builds/all' [2/2] Generating pyvenv/pyvenv_functests_group with a custom command mkvenv: checking for pygdbmi>=3D0.11.0.0 mkvenv: checking for pylint>=3D3.0.0 mkvenv: installing pygdbmi=3D=3D0.11.0.0 1/1 qemu:func-thorough+func-x86_64-thorough+thorough / func-x86_64-nvme_m= igration ERROR 48.29s exit status 1 >>> QEMU_TEST_QEMU_IMG=3D/home/alex/lsrc/qemu.git/builds/all/qemu-img UBS= AN_OPTIONS=3Dhalt_on_error=3D1:abort_on_error=3D1:print_summary=3D1:print_s= tacktrace=3D1 MSAN_OPTIONS=3Dhalt_on_error=3D1:abort_on_error=3D1:print_sum= mary=3D1:print_stacktrace=3D1 MALLOC_PERTURB_=3D232 ASAN_OPTIONS=3Dhalt_on_= error=3D1:abort_on_error=3D1:print_summary=3D1 QEMU_TEST_QEMU_BINARY=3D/hom= e/alex/lsrc/qemu.git/builds/all/qemu-system-x86_64 LD_LIBRARY_PATH=3D/home/= alex/lsrc/qemu.git/builds/all/contrib/plugins:/home/alex/lsrc/qemu.git/buil= ds/all/tests/tcg/plugins:/home/alex/src/emacs/install/lib/x86_64-linux-gnu:= /home/alex/src/emacs/install/lib:/home/alex/.local/lib MESON_TEST_ITERATION= =3D1 QEMU_TEST_GDB=3D/usr/bin/gdb-multiarch PYTHONPATH=3D/home/alex/lsrc/qe= mu.git/python:/home/alex/lsrc/qemu.git/tests/functional:/home/alex/lsrc/qem= u.git/python:/home/alex/lsrc/qemu.git/tests/functional RUST_BACKTRACE=3D1 /= home/alex/lsrc/qemu.git/builds/all/pyvenv/bin/python3 /home/alex/lsrc/qemu.= git/tests/functional/x86_64/test_nvme_migration.py Ok: 0=20=20=20 Expected Fail: 0=20=20=20 Fail: 1=20=20=20 Unexpected Pass: 0=20=20=20 Skipped: 0=20=20=20 Timeout: 0=20=20=20 Full log written to /home/alex/lsrc/qemu.git/builds/all/meson-logs/testlo= g.txt >From the log: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1/1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D test: qemu:func-thorough+func-x86_64-thorough+thorough / func-x86= _64-nvme_migration start time: 14:52:19 duration: 48.29s result: exit status 1 command: QEMU_TEST_QEMU_IMG=3D/home/alex/lsrc/qemu.git/builds/all/qe= mu-img UBSAN_OPTIONS=3Dhalt_on_error=3D1:abort_on_error=3D1:print_summary= =3D1:print_stacktrace=3D1 MSAN_OPTIONS=3Dhalt_on_error=3D1:abort_on_error= =3D1:print_summary=3D1:print_stacktrace=3D1 MALLOC_PERTURB_=3D232 ASAN_OPTI= ONS=3Dhalt_on_error=3D1:abort_on_error=3D1:print_summary=3D1 QEMU_TEST_QEMU= _BINARY=3D/home/alex/lsrc/qemu.git/builds/all/qemu-system-x86_64 LD_LIBRARY= _PATH=3D/home/alex/lsrc/qemu.git/builds/all/contrib/plugins:/home/alex/lsrc= /qemu.git/builds/all/tests/tcg/plugins:/home/alex/src/emacs/install/lib/x86= _64-linux-gnu:/home/alex/src/emacs/install/lib:/home/alex/.local/lib MESON_= TEST_ITERATION=3D1 QEMU_TEST_GDB=3D/usr/bin/gdb-multiarch PYTHONPATH=3D/hom= e/alex/lsrc/qemu.git/python:/home/alex/lsrc/qemu.git/tests/functional:/home= /alex/lsrc/qemu.git/python:/home/alex/lsrc/qemu.git/tests/functional RUST_B= ACKTRACE=3D1 /home/alex/lsrc/qemu.git/builds/all/pyvenv/bin/python3 /home/a= lex/lsrc/qemu.git/tests/functional/x86_64/test_nvme_migration.py ----------------------------------- stdout ------------------------------= ----- TAP version 13 ok 1 test_nvme_migration.X8664NVMeMigrationTest.test_migration_with_exec not ok 2 test_nvme_migration.X8664NVMeMigrationTest.test_migration_with_t= cp_localhost ok 3 test_nvme_migration.X8664NVMeMigrationTest.test_migration_with_unix 1..3 It looks like it is not completing: Traceback (most recent call last): File "/home/alex/lsrc/qemu.git/tests/functional/x86_64/test_nvme_migrat= ion.py", line 158, in test_migration_with_tcp_localhost self.migration_with_tcp_localhost() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/home/alex/lsrc/qemu.git/tests/functional/migration.py", line 94,= in migration_with_tcp_localhost self.migrate(dst_uri) ~~~~~~~~~~~~^^^^^^^^^ File "/home/alex/lsrc/qemu.git/tests/functional/migration.py", line 78,= in migrate self.migrate_vms(dst_uri, src_uri, dst_vm, src_vm) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alex/lsrc/qemu.git/tests/functional/migration.py", line 62,= in migrate_vms self.assert_migration(src_vm, dst_vm) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/home/alex/lsrc/qemu.git/tests/functional/migration.py", line 38,= in assert_migration self.assertEqual(src_vm.cmd('query-migrate')['status'], 'completed') ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 'active' !=3D 'completed' - active + completed It does pass sometimes although the run time seems to vary wildly: retry.py -n 10 -c -- ./run env QEMU_TEST_QEMU_BINARY=3D/home/alex/lsrc/qe= mu.git/builds/all/qemu-system-x86_64 /home/alex/lsrc/qemu.git/builds/all/py= venv/bin/python3 /home/alex/lsrc/qemu.git/tests/functional/x86_64/test_nvme= _migration.py -k test_nvme_migration.X8664NVMeMigrationTest.test_migration_= with_tcp_localhost=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ... Results summary: 0: 6 times (60.00%), avg time 16.634 (26.36 varience/5.13 deviation) 1: 4 times (40.00%), avg time 61.842 (5159.11 varience/71.83 deviation) Ran command 10 times, 6 passes > > Kind regards, > Alex --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro