From: Cyrill Gorcunov <gorcunov@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
linux-mm@kvack.org, Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [BUG -tip] kmemleak and stacktrace cause page faul
Date: Tue, 22 Oct 2019 17:23:25 +0300 [thread overview]
Message-ID: <20191022142325.GD12121@uranus.lan> (raw)
In-Reply-To: <20191019114421.GK9698@uranus.lan>
On Sat, Oct 19, 2019 at 02:44:21PM +0300, Cyrill Gorcunov wrote:
...
>
> I nailed it down to the following kmemleak code
>
> create_object
> ...
> object->trace_len = __save_stack_trace(object->trace);
>
> if I drop this line out it boots fine. Just wanted to share the observation,
> probably it is known issue already.
>
> Sidenote: The last -tip kernel which I've been working with is dated Sep 18
> so the changes which cause the problem should be introduced last month.
I've just tried to boot with fresh -tip
commit c2e50c28eeb90c0f3309d43c2ce0bd292a6751b3 (HEAD -> master, origin/master, origin/HEAD)
Merge: aec1ea9d4f48 27a0a90d6301
Author: Ingo Molnar <mingo@kernel.org>
Date: Tue Oct 22 01:16:59 2019 +0200
Merge branch 'perf/core'
Conflicts:
tools/perf/check-headers.sh
but got the same issue. So I tried to go deeper, and here is a result: we're failing
in arch/x86/kernel/dumpstack_64.c:in_exception_stack routine, precisely at line
ep = &estack_pages[k];
/* Guard page? */
if (!ep->size)
return false;
so I added a logline here
[ 0.082275] stk 0x1010 k 1 begin 0x0 end 0xd000 estack_pages 0xffffffff82014880 ep 0xffffffff82014888
[ 0.084951] BUG: unable to handle page fault for address: 0000000000001ff0
[ 0.086724] #PF: supervisor read access in kernel mode
[ 0.088506] #PF: error_code(0x0000) - not-present page
[ 0.090265] PGD 0 P4D 0
[ 0.090846] Oops: 0000 [#2] PREEMPT SMP PTI
[ 0.091734] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.0-rc4-00258-gc2e50c28eeb9-dirty #114
[ 0.093514] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014
[ 0.096993] RIP: 0010:get_stack_info+0xdc/0x173
[ 0.097994] Code: 84 48 01 82 66 85 c0 74 27 42 8b 14 f5 80 48 01 82 49 01 d5 42 0f b7 14 f5 86 48 01 82 4c 01 e8 4c 89 6b 08 89 13 48 89 43 10 <48> 8b 40 f0 eb 2b 65 48 8b 05 16 f4 f9 7e 48 8d 90 00 c0 ff ff 48
I presume the kmemleak tries to save stack trace too early when estack_pages are not
yet filled.
next prev parent reply other threads:[~2019-10-22 14:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 11:44 [BUG -tip] kmemleak and stacktrace cause page faul Cyrill Gorcunov
2019-10-22 14:23 ` Cyrill Gorcunov [this message]
2019-10-22 14:56 ` Cyrill Gorcunov
2019-10-23 13:21 ` Thomas Gleixner
2019-10-23 13:32 ` Cyrill Gorcunov
2019-10-23 13:38 ` Thomas Gleixner
2019-10-23 13:44 ` Cyrill Gorcunov
2019-10-23 13:47 ` Thomas Gleixner
2019-10-23 13:53 ` Cyrill Gorcunov
2019-10-23 13:59 ` Cyrill Gorcunov
2019-10-23 18:05 ` [PATCH] x86/dumpstack/64: Don't evaluate exception stacks before setup Thomas Gleixner
2019-10-23 18:31 ` Matthew Wilcox
2019-10-23 18:43 ` Cyrill Gorcunov
2019-10-23 21:27 ` Thomas Gleixner
2019-10-23 19:17 ` Josh Poimboeuf
2019-11-04 23:56 ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
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=20191022142325.GD12121@uranus.lan \
--to=gorcunov@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.