netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Subject: Fw: [Bug 211375] New: Memory leak about TCP slab which have too big used sockets
Date: Fri, 29 Jan 2021 10:23:04 -0800	[thread overview]
Message-ID: <20210129102304.7e013cf6@hermes.local> (raw)

This is a quite old kernel version, probably already fixed...

Begin forwarded message:

Date: Wed, 27 Jan 2021 01:48:33 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 211375] New: Memory leak about TCP slab which have too big used sockets


https://bugzilla.kernel.org/show_bug.cgi?id=211375

            Bug ID: 211375
           Summary: Memory leak about TCP slab which have too big used
                    sockets
           Product: Networking
           Version: 2.5
    Kernel Version: 4.18.16
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: IPV4
          Assignee: stephen@networkplumber.org
          Reporter: 390231410@qq.com
        Regression: No

Memory leak occurred in linux of 4.18.16, we use nginx as a server, I found
some problems related to TCP as following:
1. slabtop a:
OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
14081971 13980986 99% 2.06K 938799 15 30041568K TCP

2. cat /proc/meminfo
SUnreclaim: 31405028 kB

3. cat /proc/net/sockstat
sockets: used 13976123
TCP: inuse 18 orphan 0 tw 44 alloc 18 mem 1
UDP: inuse 54 mem 45
UDPLITE: inuse 0 RAW: inuse 9
FRAG: inuse 0 memory 0

4. lsof
there are 19000 line, it seems like ok.

As above, it seems that tcp sk memory leak, "sockets: used 13976123" illustrate
that "net->core.sock_inuse" is too big, which increase in inet_create(socket
create) or sk_clone_lock(child socket create) and decrease in __sk_free, I kill
almost all of application layer program, but the "sockets: used" almostly not
reduce.

Do you have any suggestions for this problem, Thanks.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2021-01-29 18:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210129102304.7e013cf6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).