public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "liuxu (AJ)" <liuxu156@huawei.com>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>,
	 "Wangqiangdong(Frank, IAS)" <wangqiangdong@huawei.com>,
	"zhangjianwei (D)" <zhangjianwei8@huawei.com>,
	 dingzhuang <dingzhuang1@huawei.com>
Subject: Re: A scenario where Perf cannot unwind the user stack by dwarf with libdw.so
Date: Thu, 23 Feb 2023 11:25:53 +0100	[thread overview]
Message-ID: <c302264f81b9faf1eeb875b91eae5b58754f5ff1.camel@klomp.org> (raw)
In-Reply-To: <20230216224817.GG6028@gnu.wildebeest.org>

Hi,

On Thu, 2023-02-16 at 23:48 +0100, Mark Wielaard wrote:
> On Mon, Feb 13, 2023 at 01:44:39AM +0000, liuxu (AJ) via Elfutils-devel wrote:
> > I am failing to unwind the user stack with libdw on Ubuntu 18.04
> > arm64 environment, the toolchain used is clang 12.0.1.  form the
> > unwinding process, I found that the pc value passing to handle_cfi
> > is 0x760, which is 0x10000 offset from the corresponding cfi address
> > 0x10760.
> > 
> > Futher analysis show that the bias calculated in
> > __libdwfl_elf_address_range for ET_DYN type pick the first PT_LOAD
> > segment, not the segment corresponds to code segment. So the bias
> > result is wrong in current situation.
> 
> I have some problem replicating this because I don't have the same
> toolchain and don't know enough about perf to know how to replicate.

We have discussed this a bit more offlist. But I still haven't been
able to replicate this issue. It seems to depend on a couple of things
I don't fully understand, clang, lld, musl, PIE executables, whether
the fallback frame based unwinder can/is used, etc.

I am hoping someone can sent me a binary to investigate.

Thanks,

Mark

      reply	other threads:[~2023-02-23 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13  1:44 liuxu (AJ)
2023-02-16 22:48 ` Mark Wielaard
2023-02-23 10:25   ` Mark Wielaard [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=c302264f81b9faf1eeb875b91eae5b58754f5ff1.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=dingzhuang1@huawei.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=liuxu156@huawei.com \
    --cc=wangqiangdong@huawei.com \
    --cc=zhangjianwei8@huawei.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).