All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: Robin Murphy <robin.murphy@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Oscar Salvador <osalvador@suse.de>,
	Wei Yang <richard.weiyang@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Sri Krishna chowdary <schowdary@nvidia.com>,
	Qian Cai <cai@lca.pw>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: kmemleak panic
Date: Sat, 19 Jan 2019 13:28:33 +0000	[thread overview]
Message-ID: <20190119132832.GA29881@MBP.local> (raw)
In-Reply-To: <b7629ecf-757c-f8b5-df83-ba83d7036b2f@free.fr>

On Fri, Jan 18, 2019 at 04:36:59PM +0100, Marc Gonzalez wrote:
> mount -t debugfs nodev /sys/kernel/debug/ 
> echo scan > /sys/kernel/debug/kmemleak
> 
> Unable to handle kernel paging request at virtual address ffffffc021e00000
[...]
> Call trace:
>  scan_block+0x70/0x190
>  scan_gray_list+0x108/0x1c0
>  kmemleak_scan+0x33c/0x7c0
>  kmemleak_write+0x410/0x4b0

As per Robin's remark, this address seems to be pretty easy to
reproduce. It also happens via scan_gray_list() which indicates an
object kmemleak was informed about via kmemleak_alloc() (so this
excludes the pfn that Qian noticed).

Can you configure the kernel with CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN off
just to avoid the bug being triggered early and run:

  mount -t debugfs nodev /sys/kernel/debug/
  echo dump=0xffffffc021e00000 > /sys/kernel/debug/kmemleak

Then run another scan to make sure this is the address that triggered
the page fault:

  echo scan > /sys/kernel/debug/kmemleak

The above should tell us where the object that kmemleak is trying to
scan came from.

Of course, ideally we should bisect this but I haven't been able to
reproduce it.

-- 
Catalin

  parent reply	other threads:[~2019-01-19 13:28 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 13:36 kmemleak panic Marc Gonzalez
2019-01-18 14:10 ` Marc Gonzalez
2019-01-18 14:34 ` Catalin Marinas
2019-01-18 15:36   ` Marc Gonzalez
2019-01-18 16:14     ` Qian Cai
2019-01-18 17:05       ` Marc Gonzalez
2019-01-18 17:38         ` Qian Cai
2019-01-19 10:21           ` Marc Gonzalez
2019-01-18 19:12     ` Robin Murphy
2019-01-19 13:28     ` Catalin Marinas [this message]
2019-01-21 11:57       ` Marc Gonzalez
2019-01-21 12:19         ` Robin Murphy
2019-01-21 13:35           ` Rob Herring
2019-01-21 13:54             ` Marc Gonzalez
2019-01-22  8:20               ` Prateek Patel
2019-01-21 14:37             ` Catalin Marinas
2019-01-21 15:42               ` Rob Herring
2019-01-21 15:53                 ` Robin Murphy
2019-01-21 17:42                 ` Mike Rapoport
2019-01-22 14:02                   ` Marc Gonzalez
2019-01-22 14:12                     ` Marc Gonzalez
2019-01-23  5:54                       ` Mike Rapoport
2019-01-23  7:05                         ` Prateek Patel
2019-01-23  7:28                         ` Marek Szyprowski
2019-01-23 12:31                           ` [PATCH v2] of: fix kmemleak crash (was: Re: kmemleak panic) Mike Rapoport
2019-02-01 16:23                             ` [PATCH v2] of: fix kmemleak crash Marc Gonzalez
2019-02-04 10:10                               ` Marc Gonzalez
2019-02-04 15:25                                 ` Greg Kroah-Hartman
2019-02-04 16:41                                   ` Rob Herring
2019-02-04 14:37                             ` [RESEND PATCH v2] of: fix kmemleak crash caused by imbalance in early memory reservation Marc Gonzalez
     [not found]                               ` <20190207163214.45C1B218D3@mail.kernel.org>
2019-02-08 10:02                                 ` Mike Rapoport
2019-02-11 16:47                               ` Marc Gonzalez
2019-02-12 16:03                                 ` Rob Herring
2019-02-12 21:50                                   ` Stephen Rothwell
2019-02-12 21:52                                     ` Andrew Morton
2019-02-12 22:12                                     ` Rob Herring
2019-02-13  6:57                                       ` Mike Rapoport
2019-02-13  6:57                                         ` Mike Rapoport
2019-02-13  9:27                                         ` Marc Gonzalez
2019-02-13 16:30                                           ` Mike Rapoport
2019-03-06  2:12                                       ` Guenter Roeck
2019-03-06 13:39                                         ` Rob Herring
2019-03-06 16:18                                           ` Guenter Roeck
2019-01-21 12:22         ` kmemleak panic Marc Gonzalez

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=20190119132832.GA29881@MBP.local \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=cai@lca.pw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=mark.rutland@arm.com \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=richard.weiyang@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=schowdary@nvidia.com \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.