LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: ORC unwinder bad backtrace
Date: Tue, 1 May 2018 09:28:00 -0500	[thread overview]
Message-ID: <20180501142800.x2jfiluokkfgik35@treble> (raw)
In-Reply-To: <20180418154548.eh5oq5inz3l3agyu@treble>

On Wed, Apr 18, 2018 at 10:45:48AM -0500, Josh Poimboeuf wrote:
> On Wed, Apr 18, 2018 at 06:54:38AM -0700, Matthew Wilcox wrote:
> > f81061192 <pte_clear.constprop.18>:
> > ...
> > ffffffff810611bf:       90                      nop
> > ffffffff810611c0 <perf_trace_x86_exceptions>:
> > 
> > I suspect an off-by-one error; you don't really mean to point to the
> > byte before perf_trace_x86_exception, you mean to point to byte 0 of
> > perf_trace_x86_exception.
> > 
> > I'm going to archive up this compilation in case there's anything useful
> > I can extract for you from it later.
> 
> Thanks for reporting this.  So there are really two issues:
> 
> 1) The question marks mean the ORC unwinder got confused (and had to
>    fall back to the crude "just print all text addresses on the stack").
>    This is the real issue.
> 
> 2) As you found, what should be "perf_trace_x86_exceptions+0x0" is
>    actually printed as "pte_clear.constprop.18+0x2e".  I don't think
>    this is fixable, because this is printed by the oops fallback code
>    which just blindly prints out all the text addresses it finds on the
>    stack when the unwinder fails.  It can't know whether the address was
>    a call return address (the usual case) or was something else (in this
>    case I suspect it's just a function pointer which just happens to be
>    on the stack), so it assumes the former, and prints it accordingly.
>    This isn't fixable per se -- but it will be "fixed" when we fix #1,
>    which will give a deterministic stack trace instead of using the dumb
>    fallback code.
> 
> Is it possible for you to copy the vmlinux somewhere?  That would be the
> easiest option for debugging.
> 
> Otherwise I may ask for some specifics for you to gather from it.
> 
> Is it recreatable?  Once I come up with a fix, it would be helpful to
> test with the same scenario.
> 
> Also has the root cause of the stack recursion been found?  It looks
> like the perf_trace_x86_exceptions() tracepoint code is doing something
> bad.

Matthew, ping?

-- 
Josh

      reply	other threads:[~2018-05-01 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 13:54 Matthew Wilcox
2018-04-18 15:45 ` Josh Poimboeuf
2018-05-01 14:28   ` Josh Poimboeuf [this message]

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=20180501142800.x2jfiluokkfgik35@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    --subject='Re: ORC unwinder bad backtrace' \
    /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

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).