linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: dong  <bauers@126.com>
To: dong <bauers@126.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Michal Hocko <mhocko@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	bugzilla-daemon@bugzilla.kernel.org, linux-mm@kvack.org
Subject: Re:Re:Re: [Bug 201699] New: kmemleak in memcg_create_kmem_cache
Date: Fri, 16 Nov 2018 11:04:21 +0800 (CST)	[thread overview]
Message-ID: <4b99c638.33b5.1671a79fcb0.Coremail.bauers@126.com> (raw)
In-Reply-To: <54b6f6e9.2897.1671a542cb7.Coremail.bauers@126.com>

[-- Attachment #1: Type: text/plain, Size: 9359 bytes --]

When I run `crash /proc/kcore` to check the leak object pointer, I got this. Is there anything else I can offer ?


crash> struct alien_cache -x 0xffff88f914ddc180
struct alien_cache {
  lock = {
    {
      rlock = {
        raw_lock = {
          val = {
            counter = 0x0
          }
        }
      }
    }
  },
  ac = {
    avail = 0x0,
    limit = 0xc,
    batchcount = 0xbaadf00d,
    touched = 0x0,
    entry = 0xffff88f914ddc198
  }
}

Sincerely



At 2018-11-16 10:23:03, "dong" <bauers@126.com> wrote:

When I straced systemd, I found the weird system call ‘kcmp’.  Is that can explain something? 





% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 29.06    0.000077          19         4           close
 16.98    0.000045          23         2           read
 15.47    0.000041          21         2           open
 10.94    0.000029          15         2           recvmsg
  9.43    0.000025           6         4           epoll_wait
  9.06    0.000024           6         4           epoll_ctl
  6.42    0.000017           0        54           kcmp
  2.26    0.000006           2         4           clock_gettime
  0.38    0.000001           1         2           fstat
------ ----------- ----------- --------- --------- ----------------
100.00    0.000265                    78           total


Sincerely

At 2018-11-16 05:06:46, "Andrew Morton" <akpm@linux-foundation.org> wrote:
>
>(switched to email.  Please respond via emailed reply-to-all, not via the
>bugzilla web interface).
>
>On Thu, 15 Nov 2018 06:31:19 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=201699
>> 
>>             Bug ID: 201699
>>            Summary: kmemleak in memcg_create_kmem_cache
>>            Product: Memory Management
>>            Version: 2.5
>>     Kernel Version: 4.20.0-rc2(other version include 4.14.52 etc.)
>>           Hardware: Intel
>>                 OS: Linux
>>               Tree: Mainline
>>             Status: NEW
>>           Severity: high
>>           Priority: P1
>>          Component: Slab Allocator
>>           Assignee: akpm@linux-foundation.org
>>           Reporter: bauers@126.com
>>         Regression: No
>> 
>> On debian OS, when systemd restart a failed service periodically. It will cause
>> memory leak. When I enable kmemleak, the message comes up.
>> 
>> 
>> [ 4658.065578] kmemleak: Found object by alias at 0xffff9d84ba868808
>> [ 4658.065581] CPU: 8 PID: 5194 Comm: kworker/8:3 Not tainted 4.20.0-rc2.bm.1+
>> #1
>> [ 4658.065582] Hardware name: Dell Inc. PowerEdge C6320/082F9M, BIOS 2.1.5
>> 04/12/2016
>> [ 4658.065586] Workqueue: memcg_kmem_cache memcg_kmem_cache_create_func
>> [ 4658.065587] Call Trace:
>> [ 4658.065590]  dump_stack+0x5c/0x7b
>> [ 4658.065594]  lookup_object+0x5e/0x80
>> [ 4658.065596]  find_and_get_object+0x29/0x80
>> [ 4658.065598]  kmemleak_no_scan+0x31/0xc0
>> [ 4658.065600]  setup_kmem_cache_node+0x271/0x350
>> [ 4658.065602]  __do_tune_cpucache+0x18c/0x220
>> [ 4658.065603]  do_tune_cpucache+0x27/0xb0
>> [ 4658.065605]  enable_cpucache+0x80/0x110
>> [ 4658.065606]  __kmem_cache_create+0x217/0x3a0
>> [ 4658.065609]  ? kmem_cache_alloc+0x1aa/0x280
>> [ 4658.065612]  create_cache+0xd9/0x200
>> [ 4658.065614]  memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065616]  memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065619]  process_one_work+0x1d1/0x3d0
>> [ 4658.065621]  worker_thread+0x4f/0x3b0
>> [ 4658.065623]  ? rescuer_thread+0x360/0x360
>> [ 4658.065625]  kthread+0xf8/0x130
>> [ 4658.065627]  ? kthread_create_worker_on_cpu+0x70/0x70
>> [ 4658.065628]  ret_from_fork+0x35/0x40
>> [ 4658.065630] kmemleak: Object 0xffff9d84ba868800 (size 128):
>> [ 4658.065631] kmemleak:   comm "kworker/8:3", pid 5194, jiffies 4296056196
>> [ 4658.065631] kmemleak:   min_count = 1
>> [ 4658.065632] kmemleak:   count = 0
>> [ 4658.065632] kmemleak:   flags = 0x1
>> [ 4658.065633] kmemleak:   checksum = 0
>> [ 4658.065633] kmemleak:   backtrace:
>> [ 4658.065635]      __do_tune_cpucache+0x18c/0x220
>> [ 4658.065636]      do_tune_cpucache+0x27/0xb0
>> [ 4658.065637]      enable_cpucache+0x80/0x110
>> [ 4658.065638]      __kmem_cache_create+0x217/0x3a0
>> [ 4658.065640]      create_cache+0xd9/0x200
>> [ 4658.065641]      memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065642]      memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065644]      process_one_work+0x1d1/0x3d0
>> [ 4658.065646]      worker_thread+0x4f/0x3b0
>> [ 4658.065647]      kthread+0xf8/0x130
>> [ 4658.065648]      ret_from_fork+0x35/0x40
>> [ 4658.065649]      0xffffffffffffffff
>> [ 4658.065650] kmemleak: Not scanning unknown object at 0xffff9d84ba868808
>> [ 4658.065651] CPU: 8 PID: 5194 Comm: kworker/8:3 Not tainted 4.20.0-rc2.bm.1+
>> #1
>> [ 4658.065652] Hardware name: Dell Inc. PowerEdge C6320/082F9M, BIOS 2.1.5
>> 04/12/2016
>> [ 4658.065653] Workqueue: memcg_kmem_cache memcg_kmem_cache_create_func
>> [ 4658.065654] Call Trace:
>> [ 4658.065656]  dump_stack+0x5c/0x7b
>> [ 4658.065657]  kmemleak_no_scan+0xa0/0xc0
>> [ 4658.065659]  setup_kmem_cache_node+0x271/0x350
>> [ 4658.065660]  __do_tune_cpucache+0x18c/0x220
>> [ 4658.065662]  do_tune_cpucache+0x27/0xb0
>> [ 4658.065663]  enable_cpucache+0x80/0x110
>> [ 4658.065664]  __kmem_cache_create+0x217/0x3a0
>> [ 4658.065667]  ? kmem_cache_alloc+0x1aa/0x280
>> [ 4658.065668]  create_cache+0xd9/0x200
>> [ 4658.065670]  memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065671]  memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065673]  process_one_work+0x1d1/0x3d0
>> [ 4658.065675]  worker_thread+0x4f/0x3b0
>> [ 4658.065677]  ? rescuer_thread+0x360/0x360
>> [ 4658.065679]  kthread+0xf8/0x130
>> [ 4658.065681]  ? kthread_create_worker_on_cpu+0x70/0x70
>> [ 4658.065682]  ret_from_fork+0x35/0x40
>> [ 4658.065718] kmemleak: Found object by alias at 0xffff9d8cb36bd288
>> [ 4658.065720] CPU: 8 PID: 5194 Comm: kworker/8:3 Not tainted 4.20.0-rc2.bm.1+
>> #1
>> [ 4658.065721] Hardware name: Dell Inc. PowerEdge C6320/082F9M, BIOS 2.1.5
>> 04/12/2016
>> [ 4658.065722] Workqueue: memcg_kmem_cache memcg_kmem_cache_create_func
>> [ 4658.065722] Call Trace:
>> [ 4658.065724]  dump_stack+0x5c/0x7b
>> [ 4658.065726]  lookup_object+0x5e/0x80
>> [ 4658.065728]  find_and_get_object+0x29/0x80
>> [ 4658.065729]  kmemleak_no_scan+0x31/0xc0
>> [ 4658.065730]  setup_kmem_cache_node+0x271/0x350
>> [ 4658.065732]  __do_tune_cpucache+0x18c/0x220
>> [ 4658.065734]  do_tune_cpucache+0x27/0xb0
>> [ 4658.065735]  enable_cpucache+0x80/0x110
>> [ 4658.065737]  __kmem_cache_create+0x217/0x3a0
>> [ 4658.065739]  ? kmem_cache_alloc+0x1aa/0x280
>> [ 4658.065740]  create_cache+0xd9/0x200
>> [ 4658.065742]  memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065743]  memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065745]  process_one_work+0x1d1/0x3d0
>> [ 4658.065747]  worker_thread+0x4f/0x3b0
>> [ 4658.065750]  ? rescuer_thread+0x360/0x360
>> [ 4658.065751]  kthread+0xf8/0x130
>> [ 4658.065753]  ? kthread_create_worker_on_cpu+0x70/0x70
>> [ 4658.065754]  ret_from_fork+0x35/0x40
>> [ 4658.065755] kmemleak: Object 0xffff9d8cb36bd280 (size 128):
>> [ 4658.065756] kmemleak:   comm "kworker/8:3", pid 5194, jiffies 4296056196
>> [ 4658.065757] kmemleak:   min_count = 1
>> [ 4658.065757] kmemleak:   count = 0
>> [ 4658.065757] kmemleak:   flags = 0x1
>> [ 4658.065758] kmemleak:   checksum = 0
>> [ 4658.065758] kmemleak:   backtrace:
>> [ 4658.065759]      __do_tune_cpucache+0x18c/0x220
>> [ 4658.065760]      do_tune_cpucache+0x27/0xb0
>> [ 4658.065762]      enable_cpucache+0x80/0x110
>> [ 4658.065763]      __kmem_cache_create+0x217/0x3a0
>> [ 4658.065764]      create_cache+0xd9/0x200
>> [ 4658.065765]      memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065766]      memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065768]      process_one_work+0x1d1/0x3d0
>> [ 4658.065770]      worker_thread+0x4f/0x3b0
>> [ 4658.065771]      kthread+0xf8/0x130
>> [ 4658.065772]      ret_from_fork+0x35/0x40
>> [ 4658.065773]      0xffffffffffffffff
>> [ 4658.065774] kmemleak: Not scanning unknown object at 0xffff9d8cb36bd288
>> [ 4658.065775] CPU: 8 PID: 5194 Comm: kworker/8:3 Not tainted 4.20.0-rc2.bm.1+
>> #1
>> [ 4658.065775] Hardware name: Dell Inc. PowerEdge C6320/082F9M, BIOS 2.1.5
>> 04/12/2016
>> [ 4658.065776] Workqueue: memcg_kmem_cache memcg_kmem_cache_create_func
>> [ 4658.065777] Call Trace:
>> [ 4658.065779]  dump_stack+0x5c/0x7b
>> [ 4658.065780]  kmemleak_no_scan+0xa0/0xc0
>> [ 4658.065781]  setup_kmem_cache_node+0x271/0x350
>> [ 4658.065783]  __do_tune_cpucache+0x18c/0x220
>> [ 4658.065784]  do_tune_cpucache+0x27/0xb0
>> [ 4658.065785]  enable_cpucache+0x80/0x110
>> [ 4658.065787]  __kmem_cache_create+0x217/0x3a0
>> [ 4658.065789]  ? kmem_cache_alloc+0x1aa/0x280
>> [ 4658.065790]  create_cache+0xd9/0x200
>> [ 4658.065792]  memcg_create_kmem_cache+0xef/0x120
>> [ 4658.065793]  memcg_kmem_cache_create_func+0x1b/0x60
>> [ 4658.065795]  process_one_work+0x1d1/0x3d0
>> [ 4658.065797]  worker_thread+0x4f/0x3b0
>> [ 4658.065799]  ? rescuer_thread+0x360/0x360
>> [ 4658.065801]  kthread+0xf8/0x130
>> [ 4658.065802]  ? kthread_create_worker_on_cpu+0x70/0x70
>> [ 4658.065804]  ret_from_fork+0x35/0x40
>> 
>> -- 
>> You are receiving this mail because:
>> You are the assignee for the bug.





 

[-- Attachment #2: Type: text/html, Size: 13505 bytes --]

  reply	other threads:[~2018-11-16  3:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-201699-27@https.bugzilla.kernel.org/>
2018-11-15 21:06 ` Andrew Morton
2018-11-16  2:23   ` dong
2018-11-16  3:04     ` dong [this message]
2018-11-16  3:37       ` dong
2018-11-16 17:50   ` Vladimir Davydov
2018-11-18  0:44     ` dong
2018-11-19  8:30       ` Vladimir Davydov
2018-11-19 10:24         ` Michal Hocko
2018-11-19 11:56         ` dong
2018-11-21  8:46           ` dong
2018-11-21  8:56             ` Vladimir Davydov
2018-11-21  9:06               ` dong
2018-11-21  9:10             ` Michal Hocko
2018-11-21  9:22               ` dong
2018-11-21  9:36                 ` 段熊春
2018-11-21 16:27                   ` Michal Hocko
2018-11-22  2:19                     ` 段熊春
2018-11-22  7:32                       ` Michal Hocko
2018-11-22  2:56                     ` 段熊春
2018-11-22  7:34                       ` Michal Hocko
2018-11-22  8:21                         ` 段熊春
2018-11-23  6:54                         ` 段熊春
2018-11-21  8:52           ` Re: " Vladimir Davydov

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=4b99c638.33b5.1671a79fcb0.Coremail.bauers@126.com \
    --to=bauers@126.com \
    --cc=akpm@linux-foundation.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=vdavydov.dev@gmail.com \
    /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