public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: wei gong <gongwei833x@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Using systemtap in an Environment with Multiple Versions of glibc
Date: Sat, 29 Jul 2023 20:46:04 +0800	[thread overview]
Message-ID: <CAPqx3PETX5ZDrwjZQDQ7UjtCNahHPtXN71jjibOphLBirSkcoA@mail.gmail.com> (raw)
In-Reply-To: <87cz0bu9g4.fsf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

Frank Ch. Eigler <fche@redhat.com> 于2023年7月29日周六 03:23写道:

>
> wei gong <gongwei833x@gmail.com> writes:
>
> > [...]
> > I am currently experiencing challenges using SystemTap in an environment
> > that includes multiple versions of glibc. I am hoping someone here may
> have
> > encountered a similar issue and might be able to provide guidance.
> > [...]
> > Currently, my environment has glibc-2.17-326.el7_9.x86_64. Because I want
> > to use a newer version of GCC, I installed an additional version of GCC
> and
> > matched it with glibc 2.21, which I placed in the /opt/compiler/gcc-8.2/
> > directory. My software is compiled using this newly installed version of
> > gcc-8.2.
> > [...]
>
> > ./stap -d /path/myapp-DDEBUG_UNWIND -e 'probe
> > process("/path/myapp").function("funtion_name").call
> {print_ubacktrace()}'
> > WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown;
> > retry with -DDEBUG_UNWIND)'
>
> One possibility is that this program, being compiled with your other
> gcc/glibc toolchain, is not getting identified to systemtap for purpose
> of extracting unwind/symbol data.
>
> > WARNING: Missing unwind data for a module, rerun with 'stap -d
> /usr/lib64/
> > libc-2.17.so'
> > WARNING: too many pending (warning) messages
>
> Yeah, that's a hint.  The "-d FILE" and "--ldd" options should let you
> give systemtap enough hints to find the alternate toolchain shared
> libraries.  Try:
>
>    # stap --ldd -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -e 'probe
>      ("myapp").......'
>
> If more missing library names come up as runtime warnings, rerun, and
> add them as -d PATHs too.
>
>
> stap  --ldd  -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -d
/opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2 -d
/opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2 -e 'probe
process("myapp").function("func_name").call {print_ubacktrace()}'
WARNING: module /home/opt/compiler/gcc-8.2/lib/libc-2.21.so --ldd skipped:
unsupported interpreter: /opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2
WARNING: module myapp --ldd skipped: unsupported interpreter:
/opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2

Trigger probe point function

WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown;
retry with -DDEBUG_UNWIND)'
 0x8789b6


> - FChE
>
>

  reply	other threads:[~2023-07-29 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28 13:59 wei gong
2023-07-28 19:21 ` Frank Ch. Eigler
2023-07-29 12:46   ` wei gong [this message]
2023-07-29 13:16     ` Frank Ch. Eigler
2023-07-30  4:32       ` wei gong

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=CAPqx3PETX5ZDrwjZQDQ7UjtCNahHPtXN71jjibOphLBirSkcoA@mail.gmail.com \
    --to=gongwei833x@gmail.com \
    --cc=fche@redhat.com \
    --cc=systemtap@sourceware.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 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).