From: "barrdetwix at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/26670] New: In "end" probe, symbol lookup for user stacks is broken (print_usyms/print_ustack functions)
Date: Sun, 27 Sep 2020 18:48:21 +0000 [thread overview]
Message-ID: <bug-26670-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=26670
Bug ID: 26670
Summary: In "end" probe, symbol lookup for user stacks is
broken (print_usyms/print_ustack functions)
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: barrdetwix at gmail dot com
Target Milestone: ---
I have a script that saves backtraces and tries defers resolving symbols until
the end, to reduce the overhead.
But it seems that resolving user symbols only works in regular probes, not in
the "end" probe. There is no error, the symbols just fail to resolve.
Note that there is no such problem for kernel stacks.
Version info:
Systemtap translator/driver (version 4.4/0.181, commit
release-4.3-75-g747902edd81a)
Linux 5.8.0-2-amd64 #1 SMP Debian 5.8.10-1 (2020-09-19) x86_64
Please see the following reproducer script (and the output I get below):
// stap_end_userstack.stp
global ustack;
probe vfs.read {
ustack = ubacktrace();
println("--- In vfs probe");
print_usyms(ustack);
exit();
}
probe end {
println("--- In end probe");
print_usyms(ustack);
}
$ sudo stap -d /bin/ntfs-3g -d /lib/x86_64-linux-gnu/libpthread-2.31.so -v
stap_end_userstack.stp
Pass 1: parsed user script and 476 library scripts using
93152virt/78928res/9964shr/69012data kb, in 140usr/30sys/170real ms.
Pass 2: analyzed script: 2 probes, 6 functions, 6 embeds, 1 global using
253976virt/241524res/11684shr/229836data kb, in 1500usr/130sys/1642real ms.
Pass 3: translated to C into
"/tmp/stapri4GCL/stap_7a0d3cf3937b410061615c1e75142f3c_4334_src.c" using
253976virt/241720res/11880shr/229836data kb, in 330usr/20sys/343real ms.
Pass 4: compiled C into "stap_7a0d3cf3937b410061615c1e75142f3c_4334.ko" in
8990usr/570sys/6673real ms.
Pass 5: starting run.
WARNING: Missing unwind data for a module, rerun with 'stap -d
/lib/x86_64-linux-gnu/libc-2.31.so'
--- In vfs probe
0x7f65a1cb504e : __read+0xe/0xa0 [/lib/x86_64-linux-gnu/libpthread-2.31.so]
0x55b8595b3012 : 0x55b8595b3012 [/bin/ntfs-3g+0x1a012/0x23000]
0x55b8595ad26d : 0x55b8595ad26d [/bin/ntfs-3g+0x1426d/0x23000]
0x55b85959f35f : 0x55b85959f35f [/bin/ntfs-3g+0x635f/0x23000]
0x7f65a1aafcca : 0x7f65a1aafcca
[/lib/x86_64-linux-gnu/libc-2.31.so+0x26cca/0x1c1000]
--- In end probe
0x7f65a1cb504e : 0x7f65a1cb504e
0x55b8595b3012 : 0x55b8595b3012
0x55b8595ad26d : 0x55b8595ad26d
0x55b85959f35f : 0x55b85959f35f
0x7f65a1aafcca : 0x7f65a1aafcca
Pass 5: run completed in 10usr/70sys/677real ms.
As you can see, the user stack resolves correctly in a regular probe, but not
in the end probe.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2020-09-27 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 18:48 barrdetwix at gmail dot com [this message]
2020-09-27 19:55 ` [Bug translator/26670] " mark at klomp dot org
2020-09-27 21:44 ` barrdetwix at gmail dot com
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=bug-26670-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--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).