From nobody Wed Jan 15 00:01:37 2025 X-Original-To: wireless@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 4YXmPZ1G1Bz5kcjH for ; Wed, 15 Jan 2025 00:01:38 +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 4YXmPZ05qgz3VKT for ; Wed, 15 Jan 2025 00:01:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736899298; 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=vBPx6QdyEF/eaiO8s1iDXb4prne8V6SY90MgKDw+HdY=; b=lggMEGTIe9r01HsdDOQ01/SqdoFtesRWfhQAWqZ0fFwlr89twdQ1EaoelfVxfvluqu7eug NYewmShYJqsyRCW/Kce00LtgPCBiKlp+0EtMooTC6D5WTRc6KbYsgNN55ve/SzJjTvBbgI Ms+MeYHXtV+r20WC68bnMjq2oBpxKI1c+msrvSHzGoOf+jLoID6vYvhplf/qabs0MN5LOf /4DIShBkwKFGS3W1TE4tTuGUGjqwCKsUUxfHCdmQ3bmQLJ2XyhwWo1TLyaDu6MFwLFUX2e AQuL6QDnianoCsJXVGaBFmXZxR2/DZUxyI2fUsaziXd7dWTR+uxYU7Chp9lulw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736899298; 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=vBPx6QdyEF/eaiO8s1iDXb4prne8V6SY90MgKDw+HdY=; b=DJY4tGtkX7iBheRCgeiIIFOseMfKVyrHSsQY1B7phSqu14tS3K7Y/TCpKm1Lgoy9tPLZq5 Rh0wA2NsPOq68Ke9INuTUWlPyohAlaIG2EQ5bxJ8tIApYxtFfNWFID527aEmoLbREAIBPh 9dPlK2ybCtelvL4dsIi+VHGftRWieBpX61QiTEoaN7AhvkJCo9Il123aX7VBkxSsDis1y8 w1A+kysFmrOf1R9FwDexO0mHhUb+hxZb0yO63Xq3Tlru5dIbLgEfSNlHwrUyaqE8SmPpbe dILRTgUptexptK/ZqeT0ZMKyHWxnMVZ2zgMvrd+XsxNo637gSghzFO98PzMZLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736899298; a=rsa-sha256; cv=none; b=hXDZFpiWwd/iw65CgKL7SfxHA9r4zdl9bpz0ybrb1e1S7VWpCvUcZkuNuyLdUUON9ppNyH W+BdUx60NArqq6ZJhu5y1sF/IoRJ+nY+3LShcOkCVVS/bm0hzmz5RJHsteRMid2xSvAMfG 55NA4//im6JVQI2bbvcjnnjeALYegzdrxVgJaB7tAsOSXZfEG9Fxk1HHydCdO1yw6Q7quZ cxA2sQWU64aCptCXsSiR45B2M+BdXbbX3bYhGlJ9UYYxAS8y29jhehlMewAfwgHDX1BZqr OD37qGGzoQswh/H56anffiU+KWqzPPMutcJdaKCIVoNIJhIeR3xCC8AFIjlivQ== 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 4YXmPY5FXLz7DF for ; Wed, 15 Jan 2025 00:01:37 +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 50F01bgN067346 for ; Wed, 15 Jan 2025 00:01:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50F01b40067344 for wireless@FreeBSD.org; Wed, 15 Jan 2025 00:01:37 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: wireless@FreeBSD.org Subject: [Bug 283903] rtw88: possible skb leak Date: Wed, 15 Jan 2025 00:01:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: guillaume-freebsd@outters.eu X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bz@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: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-wireless@freebsd.org Sender: owner-freebsd-wireless@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283903 --- Comment #9 from Guillaume Outters --- OK, I was wrong thinking the compiler eating mem induced rtw88 into error: now I'm convinced that rtw88 ate so much mem that clang hadn't enough anymo= re. Twice this week I observed lpkiskb going rogue, unfortunately without detec= ting the precise moment it became Mr Hyde. But (as seen in https://bz-attachments.freebsd.org/attachment.cgi?id=3D2567= 04), I managed to test a loop of a 2 MB scp every minute, while watching vmstat = -m | grep lkpiskb, with surprising results: A. Before going rogue Each scp added to the req counter, but memory stayed remarkably stable, at = 16 MB. I didn't even noticed any temporary increase of mem use during scps (and statistically, my probe every 10 seconds should have happened multiple times simultaneously with my 4 seconds lasting download). B. After having gone rogue Now the reqs are still there (hopefully!), but **mem use increases of ~ 3,4 MB** per scp of 2 MB (/!\ those are file bytes, not bandwidth; and I don't = know the bandwidth / file bytes ratio of scp) And having the server lag helped saw something more interesting, due to multiple probes occurring during the transfer: the 3,4 MB didn't follow a monotonic growth, but instead the mem use increa= sed considerably, and _only some_ mem got freed once scp finished.=20=20 ---------------------------------------------------------------------------= ----- Here a one-go increase (probes at :45 and :56, scp occured around between := 47 and :51) (+ 3,4 MB): 2025-01-14 01:06:45 lkpiskb 329256 1361215488 9513310=20= =20=20=20=20=20=20=20 +2 +8192 +212 2025-01-14 01:06:56 lkpiskb 330093 1364643840 9517636=20= =20=20=20=20=20=20=20 +837 +3428352 +4326 2025-01-14 01:07:06 lkpiskb 330095 1364652032 9517845=20= =20=20=20=20=20=20=20 +2 +8192 +209 Here a two-go (+ 5 MB - 1,6 MB): 2025-01-14 01:07:47 lkpiskb 330115 1364733952 9518743=20= =20=20=20=20=20=20=20 +5 +20480 +223 2025-01-14 01:07:57 lkpiskb 331360 1369833472 9522027=20= =20=20=20=20=20=20=20 +1245 +5099520 +3284 2025-01-14 01:08:07 lkpiskb 330958 1368186880 9523298=20= =20=20=20=20=20=20=20 -402 -1646592 +1271 2025-01-14 01:08:17 lkpiskb 330964 1368211456 9523527=20= =20=20=20=20=20=20=20 +6 +24576 +229 Another one-go (+ 6,8 MB - 3,4 MB): 2025-01-14 01:10:00 lkpiskb 331828 1371750400 9529814=20= =20=20=20=20=20=20=20 +2 +8192 +217 2025-01-14 01:10:10 lkpiskb 333506 1378623488 9534152=20= =20=20=20=20=20=20=20 +1678 +6873088 +4338 2025-01-14 01:10:20 lkpiskb 332671 1375203328 9534368=20= =20=20=20=20=20=20=20 -835 -3420160 +216 2025-01-14 01:10:30 lkpiskb 332674 1375215616 9534584=20= =20=20=20=20=20=20=20 +3 +12288 +216 Here periodic security on the server made it really hard for scp to finish,= and let rtw88 free its mem: 2025-01-14 07:21:34 lkpiskb 586598 2415288320 11209247=20= =20=20=20=20=20=20 +291 +1191936 +933 2025-01-14 07:21:57 lkpiskb 587114 2417401856 11210910=20= =20=20=20=20=20=20 +516 +2113536 +1663 2025-01-14 07:22:23 lkpiskb 587579 2419306496 11212416=20= =20=20=20=20=20=20 +465 +1904640 +1506 2025-01-14 07:22:45 lkpiskb 587877 2420527104 11213510=20= =20=20=20=20=20=20 +298 +1220608 +1094 2025-01-14 07:23:07 lkpiskb 588170 2421727232 11214571=20= =20=20=20=20=20=20 +293 +1200128 +1061 2025-01-14 07:23:29 lkpiskb 588474 2422972416 11215673=20= =20=20=20=20=20=20 +304 +1245184 +1102 2025-01-14 07:23:49 lkpiskb 587441 2418741248 11216292=20= =20=20=20=20=20=20 -1033 -4231168 +619 ---------------------------------------------------------------------------= ----- while true ; do date "+%Y-%m-%d %H:%M:%S" ; vmstat -m | grep lkpi ; sleep 1= 0 ; done | tee -a ~/tmp/depuisboot.log awk < ~/tmp/depuisboot.log '/^2025-/{h=3D$0}/lkpiskb/{variation=3D"+"(-use+$2)"\t+"(-mem+$3)"\t+"(-req= +$4);gsub(/[+]-/,"-",variation);gsub(/ +/,"\t");print h"\t"$0"\t"variation;use=3D0+$2;mem=3D0+$3;req=3D0+$4}' | le= ss --=20 You are receiving this mail because: You are on the CC list for the bug.=