From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=eGCxuf3Y; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 754DC5A0262 for ; Fri, 22 May 2026 07:45:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779428701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Awa/AwPMpchqHrgOiqd/c6O2U+v/kjo0HXk+EwaeRM=; b=eGCxuf3Y7z4GD+Fvt3LuUSmFNR6vHGqfm9qog2zexkQU+OkTuFx9U6Cn7nCf+6j9BY1Vt9 DHxNa30S33vm2e5kUua5KcUsrELI+Z68ofGtNT0Hezskf3GmNs2GYV/zlqQtqTEUa/WhY0 DWMSTm7UIA0YE7vOmsKUi2TiVzptKyw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-nFqtxLQYOmeSnygDiePQlg-1; Fri, 22 May 2026 01:44:59 -0400 X-MC-Unique: nFqtxLQYOmeSnygDiePQlg-1 X-Mimecast-MFC-AGG-ID: nFqtxLQYOmeSnygDiePQlg_1779428698 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-48fd2b502e2so58791585e9.2 for ; Thu, 21 May 2026 22:44:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779428698; x=1780033498; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6Awa/AwPMpchqHrgOiqd/c6O2U+v/kjo0HXk+EwaeRM=; b=hyPC8dVAj3exZHMhZwCcy9SIDaIYVoMYlLYOn3v0YSi+ykzfKaFWWE1ffsedb1Kbin y5ncuZrU43Iwvt9UDLIXg3um/7h6Rceqn3fU9uddQF26Qwaqk0eGYWHaO5neXkTG+db/ Zoz+2GObBHsA2K5Zm6pX4/Mw/LDoWO3qSdPFR7fDg6DolbFz4jWN1od+LGfRmXePqKaV 3NaoUZ3uuYJZ2VnaBUGK5gRDC0GtYfbLa37jzspKQky8+WVUG4tisQ+s8wFxThrnXa6d C3Ig/79N0wnybiddgvuveEerws4EG74qHfV62MBoj6quLUOpp0MejdeSrBWKii+YeOQh XVzg== X-Gm-Message-State: AOJu0YwUjB2saoSZNqnIxhqw2nd1/ltoawEeJjMyRFbOmgkMJX3ygQM0 wahrwgOnGBj0TlpgonaNdc+C8lpx8oWNfJPtca2cFjRjVyMgogRMX0Un152RlHP5/NNTwy4rATe MM7XiPDEj2MaDXFUpQAN8nPXD0rjuEvkLRjiF9hCFYpLLdtJyWtL0sg== X-Gm-Gg: Acq92OGIg0xb3dqjc+6gxwIRRvA705drukBP455Kvd+UP+drZ7m/A/SXlVJii/rYMda PLSr89kBmmwXpaPp/Cohxw/ljywZNSKUWPNThJQG458C7MH77T3+Z88GuufJX/KVpv1LGJlj40G tp2Uw5331L7Bm1AaILDCPHKK7rL/cGOEcXJl9hwJwHdDrB53XVfvfCASAHj2EA5/gE7XGdn/dEN jgmny4yIxAlNObUXZGOzq0+BNG+bxuzf6s6RgDFCi9s1e43DEO5PuIglU0LDHZdpKes0xLPVfHV hpMSc+4QbxsZG8a9XU0iIyeziKKbW++AnJtnq1y3mprFAjdflHD0Rh+VkKNelrECxeLxzm8qYDJ UdBqUxII1F4WkvycmMjG6zHHjHqVDVBH6Y4V3F11S9Pe8PdOraA== X-Received: by 2002:a05:600c:3547:b0:48a:7b55:12a6 with SMTP id 5b1f17b1804b1-4904224b05emr24788295e9.0.1779428698368; Thu, 21 May 2026 22:44:58 -0700 (PDT) X-Received: by 2002:a05:600c:3547:b0:48a:7b55:12a6 with SMTP id 5b1f17b1804b1-4904224b05emr24787835e9.0.1779428697835; Thu, 21 May 2026 22:44:57 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490454ea134sm22194915e9.8.2026.05.21.22.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 22:44:57 -0700 (PDT) From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v4 00/10] vhost-user: Preparatory series for multiple iovec entries per virtqueue element Message-ID: <20260522074455.15e6cc3e@elisabeth> In-Reply-To: <20260522062239.4fcd3314@elisabeth> References: <20260513115218.1662850-1-lvivier@redhat.com> <20260520173445.0658dfef@elisabeth> <20260520180708.275ec4de@elisabeth> <20260520181852.1f0119ff@elisabeth> <20260520225340.54490a21@elisabeth> <50d79312-0493-4af0-b0bc-7c590885cbd2@redhat.com> <20260522062239.4fcd3314@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Fri, 22 May 2026 07:44:56 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: grLyLBjqexyF9glkW1ND2uHiVCNWy7XHcm4UtAn5Fk0_1779428698 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QHFBSPRFDHQEADVVLGCKLXFBB5BKLIUX X-Message-ID-Hash: QHFBSPRFDHQEADVVLGCKLXFBB5BKLIUX X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Jon Maloy , David GIbson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 22 May 2026 06:22:39 +0200 Stefano Brivio wrote: > On Fri, 22 May 2026 01:13:33 +0200 > Laurent Vivier wrote: >=20 > > On 5/21/26 10:30, Laurent Vivier wrote: =20 > > > On 5/20/26 22:53, Stefano Brivio wrote: =20 > > >> On Wed, 20 May 2026 18:18:52 +0200 > > >> Stefano Brivio wrote: > > >> =20 > > >>> On Wed, 20 May 2026 18:07:08 +0200 > > >>> Stefano Brivio wrote: > > >>> =20 > > >>>> On Wed, 20 May 2026 17:34:45 +0200 > > >>>> Stefano Brivio wrote: =20 > > >>>>> On Wed, 13 May 2026 13:52:08 +0200 > > >>>>> Laurent Vivier wrote: =20 > > >>>>>> Currently, the vhost-user path assumes each virtqueue element co= ntains > > >>>>>> exactly one iovec entry covering the entire frame.=C2=A0 This as= sumption > > >>>>>> breaks as some virtio-net drivers (notably iPXE) provide descrip= tors where the > > >>>>>> vnet header and the frame payload are in separate buffers, resul= ting in > > >>>>>> two iovec entries per virtqueue element. > > >>>>>> > > >>>>>> This series refactors the vhost-user data path so that frame len= gths, > > >>>>>> header sizes, and padding are tracked and passed explicitly rath= er than > > >>>>>> being derived from iovec sizes.=C2=A0 This decoupling is a prere= quisite for > > >>>>>> correctly handling padding of multi-buffer frames. =20 > > >>>>> > > >>>>> Sorry to bring (likely) bad news, but this series seems to introd= uce a > > >>>>> regression: I got the migration/rampstream_in tests fail twice in= a > > >>>>> row, which I've never saw happening (I think I saw a single failu= re a > > >>>>> long time ago when the machine had a high CPU load, but nothing e= lse). > > >>>>> > > >>>>> I'm currently bisecting and the bisect seems to point towards the= end > > >>>>> of the series (probably 10/10), but I haven't finished yet. I'll = keep > > >>>>> you posted. I haven't spotted anything that might cause issues th= ere. =20 > > >>>> > > >>>> Yeah, that's the one :( > > >>>> > > >>>> $ git bisect bad > > >>>> db798fc60f4c5869cb53168354e068fb4dabd91a is the first bad commit > > >>>> commit db798fc60f4c5869cb53168354e068fb4dabd91a > > >>>> Author: Laurent Vivier > > >>>> Date:=C2=A0=C2=A0 Wed May 13 13:52:18 2026 +0200 > > >>>> > > >>>> =C2=A0=C2=A0=C2=A0=C2=A0 vhost-user: Centralise Ethernet frame pad= ding in vu_collect() and vu_pad() =20 > > >=20 > > > I checked on my system with the commit previous to this series, > > > bcc3d37a6e01 ("util: Fix changes to assert_with_msg()") and rampstrea= m_in fails too (not=20 > > > everytime). > > > =20 > > > > TCP/IPv4: sequence check, ramps, inbound =20 > > > ...failed. > > >=20 > > > and rampstream_out hangs sometime too. > > >=20 > > > I'm going to try with ealier commits. =20 > >=20 > > For me the problem can happen with any commit... > >=20 > > As it depends on the execution path and on the load and speed of the sy= stem it looks like=20 > > a race condition. =20 >=20 > Hah, thanks for checking. Maybe... >=20 > > Did you try to test on a host with a kernel patched with > > "[PATCH net v2 0/2] Fix race condition between TCP_REPAIR dump and data= receive" ? =20 >=20 > Now I tried, and yes, the test doesn't hang anymore! I seem to have an > issue with teardown functions on recent kernels (current net.git HEAD > more or less): >=20 > --- > + teardown_migrate > + cat /tmp/passt-tests-VVtLn0/migrate/qemu_1.pid > + /home/sbrivio/passt/test/nstool exec /tmp/passt-tests-VVtLn0/migrate/ns= 1.hold -- kill 16 > qemu-system-x86_64: terminating on signal 15 from pid 34 () > + cat /tmp/passt-tests-VVtLn0/migrate/qemu_2.pid > + /home/sbrivio/passt/test/nstool exec /tmp/passt-tests-VVtLn0/migrate/ns= 1.hold -- kill 15 > 18.8974: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Vhost user mess= age =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 18.8974: Request: VHOST_USER_GET_VRING_BASE (11) > 18.8974: Flags: 0x1 > 18.8974: Size: 8 > 18.8974: State.index: 0 > 18.8975: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Vhost user mess= age =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 18.8975: Request: VHOST_USER_GET_VRING_BASE (11) > 18.8975: Flags: 0x1 > 18.8975: Size: 8 > 18.8975: State.index: 1 > qemu-system-x86_64: terminating on signal 15 from pid 35 () > 18.7961: Client connection closed > 18.7962: Closing TCP_REPAIR helper socket > + context_wait qemu_1 > + __name=3Dqemu_1 > + __pidfile=3D/tmp/passt-tests-VVtLn0/migrate/context_qemu_1.pid > + cat /tmp/passt-tests-VVtLn0/migrate/context_qemu_1.pid > + rc=3D0 > + rm /tmp/passt-tests-VVtLn0/migrate/context_passt_repair_2.stdout.9pwpVb= Qr /tmp/passt-tests-VVtLn0/migrate/context_passt_repair_2.stderr.dSY5hBu1 > + __pid=3D67766 > + rm /tmp/passt-tests-VVtLn0/migrate/context_qemu_1.pid > + [ 1 -eq 1 ] > + echo [Exit code: 0] > + echo -n passt_repair_2$=20 > + return 0 > 18.9016: Client connection closed > 18.9018: Closing TCP_REPAIR helper socket > + wait 67766 > + rc=3D0 > + rm /tmp/passt-tests-VVtLn0/migrate/context_passt_repair_1.stdout.JEyDGx= Xe /tmp/passt-tests-VVtLn0/migrate/context_passt_repair_1.stderr.WU550iEI > + [ 1 -eq 1 ] > + echo [Exit code: 0] > + echo -n passt_repair_1$=20 > + return 0 > + rc=3D0 > + rm /tmp/passt-tests-VVtLn0/migrate/context_qemu_2.stdout.Dm8EAhfl /tmp/= passt-tests-VVtLn0/migrate/context_qemu_2.stderr.207qJYPA > + [ 1 -eq 1 ] > + echo [Exit code: 0] > + echo -n qemu_2$=20 > + return 0 > 2026/05/22 04:08:23 socat[73089] E connect(5, AF=3D40 cid:94558 port:22, = 16): Connection timed out > Connection closed by UNKNOWN port 65535 > ... > --- >=20 > it looks like we stop QEMU a bit too early. But it should be unrelated. >=20 > I'm now trying to find some kind of workaround for existing (not fixed) > kernel versions. Maybe stopping rampstream_in for a moment or something > like that. For some weird reason even very blatant throttling (100 ms - 1 s delays every 10000 ramps, or an explicit 500 ms pause via signal before migration) doesn't help. So it doesn't seem to be *that* kind of race. I should probably check the same exact kernel version with fix and without... --=20 Stefano