Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp520212pxa; Tue, 11 Aug 2020 08:34:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM7Rhp4RatxYXBsuKGgIsAVl5BUcqMuOI1hM5QmKUC3mQGZgByyw7kvL05ccVDOmgpAIrO X-Received: by 2002:aa7:de09:: with SMTP id h9mr26155863edv.277.1597160076907; Tue, 11 Aug 2020 08:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597160076; cv=none; d=google.com; s=arc-20160816; b=gMvhf1vtDQ5Zw/ibhQHkuKXX57oLlqPTuBgoEx+Qjo6Lp0kaeS2rRTttPcpcJ9wNAc /9ExiQ0ZohW4d7aD7V2hYgPp9cKQxf58Md14VQg96oKr9bmHrfAa1g8+vBmR1XlKF4/q 3rsP0yjQH9ewo3VUJyCuaGYWP0FnIDJw0gI6GVlbXBsMHiZ8YGzhYH1squUgCtQcRBDM YgD/DeI4mhouhF2Hz6/is7n2a2WK7JZJ9hjRQaFfXEzypxY+OocVxv3V3KpMomueAPbG QZOJgi7T30Ok8yegwiE50mbYxH3H6423Ar6PD7JMzjLevxyfq+YuhhdQJtGAgLKMnUpT XGcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=37WdC2DpKlpkgPtRRbtnkLSeSTMLbkdYcrwujx0kflA=; b=l46ji7qdRyxxz1vnNwkXGkLiomcDi4FWjzWl/nm5kCv/wW2EWkMvXcgBlBYinrmdKK KvqbB/q4hYXX3DscbN8pS1IFOxED5q++YtGihE8LsWoIflyZBoqiCSUFrvCY3LUQDWeB apwIbIN2t/LMrKWUrZrilOrt4YAvFa6UaSSjO4JgTf7qiTodF2KASakcgHWpazSqKzhA 4uBZP2p1nLB8orFXfrYf0FG9CulH8OmnWhIYns444j5EClT70gihb+UsXQM9ygjIEtXw EtjNLG+fS9yWVd0gzaOSuOTtOvZy66gm83as52U1XzWP4S/OVK5DM1qOIvn9aCiHfNt3 4QvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WRxdEfgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si12828958eju.9.2020.08.11.08.34.13; Tue, 11 Aug 2020 08:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WRxdEfgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgHKPdC (ORCPT + 99 others); Tue, 11 Aug 2020 11:33:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728859AbgHKPdA (ORCPT ); Tue, 11 Aug 2020 11:33:00 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85E66C06174A; Tue, 11 Aug 2020 08:33:00 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id d188so7818997pfd.2; Tue, 11 Aug 2020 08:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=37WdC2DpKlpkgPtRRbtnkLSeSTMLbkdYcrwujx0kflA=; b=WRxdEfgwABYCWPxNXFQkp2sWJHfpiD+vbzCJPapYWGU8+JMlX0rUFqbPjg8MN1lxKn iR7TMR8XzsWTPuJwdfzL464B6YS/406anYjnJ4agumJ4vW1aRln8gXduhVnUbjqu6vKe FzAuPXHLDEt1O9qeiWz83rMO6Ovvikdc+StC2EDkV8/oJwRWiiF71jQrjY3OkduC/RGH dIy1N/HW8TjSLG/RUE7ZiIeY627GxEUbT9yZFl1YvDwE05Mt4h+tuO6x+sc9VLwwZv/i fY5bJb/i+LeDzCFy66/XuRPpFCnkTS/CxcYtFuFnIoNXCVIFrSIFcrAHpu8dcTfpz7gZ evIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=37WdC2DpKlpkgPtRRbtnkLSeSTMLbkdYcrwujx0kflA=; b=aHkm0BjGP1OtTN6AIZJtP6P/sFEZVZDsqt7TPDNqJMsEfEwD/q3upkzPedeJlCRlrS /4JZDnYjWiDiuciq8t8XEIhJGZ2M/UgxdrWRLOL0oYPvptdF0HTNKnLrBjtSlEkcvO4O ZTYW4Y7Yt91V2JfNF+27v/zHrw5+Sm2c6V8OH+YSjSWaX7qafQnRp51liO69QbUCtBb4 5YHvl0GChR1LM8rk+a1DL/K3VGH/mRzL3CIlpifEj/sewhPL50Ex2dHlkOhVuXe+fumk DTUC5ABnEbxJ8IC/10z3Irjil4q71C+LVvdBLOM9xijEt+m4e1SIs18yGtg4dXdZMxWF 23kQ== X-Gm-Message-State: AOAM530c6LbJAY7c+R7dMS4zRoKGgtVJj3sMYjgakajAa9GrZZIPuVww sJEVJAHtY3UoNXSBwzrlZztQz6ir X-Received: by 2002:aa7:968b:: with SMTP id f11mr6655235pfk.63.1597159980059; Tue, 11 Aug 2020 08:33:00 -0700 (PDT) Received: from [10.1.10.11] (c-73-241-150-58.hsd1.ca.comcast.net. [73.241.150.58]) by smtp.gmail.com with ESMTPSA id m4sm2937988pfh.129.2020.08.11.08.32.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 08:32:59 -0700 (PDT) Subject: Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode To: Jason Xing , Eric Dumazet Cc: Greg Kroah-Hartman , Neal Cardwell , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML , liweishi , Shujin Li References: <20200602080425.93712-1-kerneljasonxing@gmail.com> <20200604090014.23266-1-kerneljasonxing@gmail.com> From: Eric Dumazet Message-ID: Date: Tue, 11 Aug 2020 08:32:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/20 3:37 AM, Jason Xing wrote: > Hi everyone, > > Could anyone take a look at this issue? I believe it is of high-importance. > Though Eric gave the proper patch a few months ago, the stable branch > still hasn't applied or merged this fix. It seems this patch was > forgotten :( Sure, I'll take care of this shortly. Thanks. > > Thanks, > Jason > > On Thu, Jun 4, 2020 at 9:47 PM Jason Xing wrote: >> >> On Thu, Jun 4, 2020 at 9:10 PM Eric Dumazet wrote: >>> >>> On Thu, Jun 4, 2020 at 2:01 AM wrote: >>>> >>>> From: Jason Xing >>>> >>>> When using BBR mode, too many tcp socks cannot be released because of >>>> duplicate use of the sock_hold() in the manner of tcp_internal_pacing() >>>> when RTO happens. Therefore, this situation maddly increases the slab >>>> memory and then constantly triggers the OOM until crash. >>>> >>>> Besides, in addition to BBR mode, if some mode applies pacing function, >>>> it could trigger what we've discussed above, >>>> >>>> Reproduce procedure: >>>> 0) cat /proc/slabinfo | grep TCP >>>> 1) switch net.ipv4.tcp_congestion_control to bbr >>>> 2) using wrk tool something like that to send packages >>>> 3) using tc to increase the delay and loss to simulate the RTO case. >>>> 4) cat /proc/slabinfo | grep TCP >>>> 5) kill the wrk command and observe the number of objects and slabs in >>>> TCP. >>>> 6) at last, you could notice that the number would not decrease. >>>> >>>> v2: extend the timer which could cover all those related potential risks >>>> (suggested by Eric Dumazet and Neal Cardwell) >>>> >>>> Signed-off-by: Jason Xing >>>> Signed-off-by: liweishi >>>> Signed-off-by: Shujin Li >>> >>> That is not how things work really. >>> >>> I will submit this properly so that stable teams do not have to guess >>> how to backport this to various kernels. >>> >>> Changelog is misleading, this has nothing to do with BBR, we need to be precise. >>> >> >> Thanks for your help. I can finally apply this patch into my kernel. >> >> Looking forward to your patchset :) >> >> Jason >> >>> Thank you.