From nobody Tue Jan 14 08:13:18 2025 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YXMML4nBpz5kM6D for ; Tue, 14 Jan 2025 08:13:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YXMML4JdSz3xvp for ; Tue, 14 Jan 2025 08:13:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736842398; 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=hqaGL4tuvZrErlSNLDSFqXPAMMfPuwV3OQdCXAXci5E=; b=M02QZasYSrkSDF536MfGSlteY/vDAD62F97gTgGjGTAKesI9cG9jgbLMfIP5V4yPUJR2Zq 4OqtPqbEfG7/XnubhHWvcp5ru3rEPNMk9FHZhYW68gQMAmdm5wCidqxlCZFZ+meSgnKb51 tsorB/C302V9YRiVjm13CaqVs5DmLymOIB3LadwQQs0DnIkdYg6JHrRUKq5+vkiUBFG3Dq CTSJO4j3HWph6cn2/XN0JjQ8EUNfWV2gUkRNqnMSK09NrS/PhdOp7FaWj8SECYndoismps KawQBeoAP37qKVWkgsGBXBOFaBahCCaW70YpMipCHWgy/eny2Vs6Qafsbtlvdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736842398; 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=hqaGL4tuvZrErlSNLDSFqXPAMMfPuwV3OQdCXAXci5E=; b=G0XMP2T0AR3WI8TUHGGVrrdsfoOIVNu6t2FjuzqYsN/B/EfqEiAzOE3PJszWvX8OcxS0IX csCKTR5Sl84n+g9bPOM1MMWNRCWRBhomc5DBZdyPkVW6NhZ7PJiouO20nJCVvpH3lPKq/c EWgLJo3eUKwF1RB5vZHg6WyFBjqOHu9KILtXY9a70WAPdMUlZ1l8V0RamlFNbFWxGvaGpS Un/6iOl5xmCcuLcVxs3+C36Ug1VgTHHxXgnTOeO58WhJphF6osQ0N4znYSmom7a6cxGyeS a1N8sqlKeB++98eDAmXHI6qvRrdPIZ/5JaIrtheCMht8RLXJWwL3/SyX8ovcKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736842398; a=rsa-sha256; cv=none; b=QhtPaAs5w7IqWpKlaUeokR4hf8Ta58Hxd5IYnEfwDFGqNokkyJV4NIrYWvNQ0qsexlg4dt cxMbuZuWvsbKQ9kxx1PZTbq5RP7r6BprhPN+qefHlfm14avLWlds/AWuf8dJQpC4ASjJQc jxpO/X4LALqmlDHaB+GiWK4rH5MKPDHna1NEm7sz1hv7iCJPuktUKiBn1RRHK02WDTyBiG 8te2jqYefQg465V3Omk1cxIQVNPiucR6jviwd238ib3+i+L7plzn1qsqE474scxlkuXRSY hQPg9dLh7hAVhiGMckONaWZ2Ni9Og0vd+4UcKP8KhEk4PyCyeU91QQRNJcGFsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YXMML3gGBz17N4 for ; Tue, 14 Jan 2025 08:13:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 50E8DIRh068152 for ; Tue, 14 Jan 2025 08:13:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50E8DIvR068151 for net@FreeBSD.org; Tue, 14 Jan 2025 08:13:18 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 284057] vmxnet3/iflib: crash in vmxnet3_isc_txd_credits_update Date: Tue, 14 Jan 2025 08:13:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284057 --- Comment #3 from Andriy Gapon --- From the data in comment #2 it appears that the faulting access to address 0xfffffe0212a00008 could have been an access to txcd =3D 0xfffffe02129f8000 just beyond the en= d of the array. Given that vxcr_ndesc =3D 2048 and that the size of a descriptor (vmxnet3_txcompdesc) is 16 that produces 32K bytes or 0x8000. Additional 8 bytes is an offset gen and type bit-fields in the descriptor. So, it appears that vxcr_next coudl have been equal to vxcr_ndesc "for a moment". In the crash dump it's zero, but the only explanation for 0xfffffe0212a00008 access is that ti could have overflown. I suspect that the overflow could have resulted from a concurrent (or, perh= aps, recursive) execution of vmxnet3_isc_txd_credits_update. Looking at thread 100073, I can see that it is possible for an RX thread to= end up in TXQ related routines. It seems that there is an execution path to vmxnet3_isc_txd_credits_update: ifmp_ring_enqueue -> ifmp_ring_check_drainage -> r->can_drain() =3D=3D iflib_txq_can_drain -> isc_txd_credits_update. As far as I can see, that execution path does not take any locks. Although thread 100073 (if_io_tqg_7) is for a different set of queues, it's possible that if_io_tqg_1 could have made the same calls "a bit earlier". If such concurrent execution is indeed possible then one thread could mess = up vxcr_next for the other thread. --=20 You are receiving this mail because: You are the assignee for the bug.=