From: dong <bauers@126.com>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
bugzilla-daemon@bugzilla.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re:Re: [Bug 201699] New: kmemleak in memcg_create_kmem_cache
Date: Sun, 18 Nov 2018 08:44:14 +0800 (CST) [thread overview]
Message-ID: <433c2924.f6c.16724466cd8.Coremail.bauers@126.com> (raw)
In-Reply-To: <20181116175005.3dcfpyhuj57oaszm@esperanza>
[-- Attachment #1: Type: text/plain, Size: 3533 bytes --]
First of all,I can see memory leak when I run ‘free -g’ command. So I enabled kmemleak. I got the messages above. When I run ‘cat /sys/kernel/debug/kmemleak’, nothing came up. Instead, the ‘dmesg’ command show me the leak messages. So the messages is not the leak reason?How can I detect the real memory leak?Thanks!
--
发自我的网易邮箱手机智能版
<br/><br/><br/>
----- Original Message -----
From: "Vladimir Davydov" <vdavydov.dev@gmail.com>
To: bauers@126.com
Cc: "Michal Hocko" <mhocko@kernel.org>, "Johannes Weiner" <hannes@cmpxchg.org>, bugzilla-daemon@bugzilla.kernel.org, linux-mm@kvack.org, "Andrew Morton" <akpm@linux-foundation.org>
Sent: Fri, 16 Nov 2018 20:50:05 +0300
Subject: Re: [Bug 201699] New: kmemleak in memcg_create_kmem_cache
On Thu, Nov 15, 2018 at 01:06:46PM -0800, Andrew Morton wrote:
> > On debian OS, when systemd restart a failed service periodically. It will cause
> > memory leak. When I enable kmemleak, the message comes up.
What made you think there was a memory leak in the first place?
> >
> >
> > [ 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
This doesn't look like kmemleak reporting a leak to me, although this
does look weird. What does /sys/kernel/debug/kmemleak show?
[-- Attachment #2: Type: text/html, Size: 6405 bytes --]
next prev parent reply other threads:[~2018-11-18 0:46 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
2018-11-16 3:37 ` dong
2018-11-16 17:50 ` Vladimir Davydov
2018-11-18 0:44 ` dong [this message]
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=433c2924.f6c.16724466cd8.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