* [Bug tapsets/26843] New: print_ubacktrace_fileline is broken on master
@ 2020-11-04 21:54 agentzh at gmail dot com
2024-01-11 22:11 ` [Bug tapsets/26843] " wcohen at redhat dot com
2024-01-12 13:20 ` mcermak at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: agentzh at gmail dot com @ 2020-11-04 21:54 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=26843
Bug ID: 26843
Summary: print_ubacktrace_fileline is broken on master
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tapsets
Assignee: systemtap at sourceware dot org
Reporter: agentzh at gmail dot com
Target Milestone: ---
Seems like `print_ubacktrace_fileline` is broken on Ubuntu 20 x86_64 (kernel
Linux ubuntu20-pkg 5.4.0-24-generic #28-Ubuntu SMP Thu Apr 9 22:16:42 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux) It can be reproduced with the following minimal
example using the latest systemtap git master (commit 9102da049a):
First prepare the target C program:
```C
int main(void) {
return 0;
}
```
Compile it to generate executable file `./a.out`:
```
gcc -g a.c
```
Prepare the following simple .stp file:
```
function foo() {
print_ubacktrace_fileline();
}
probe process.function("main") {
foo();
exit();
}
```
And run both:
```
$ stap a.stp -c ./a.out
WARNING: Kernel function symbol table missing [man warning::symbols]
0x55cfc28cd131 : main+0x8/0x17 [/home/agentzh/git/systemtap-plus/a.out]
0x7f59d5d7d0b3 [/usr/lib/x86_64-linux-gnu/libc-2.31.so+0x270b3/0x1f2000]
WARNING: Missing unwind data for a module, rerun with 'stap -d
/usr/lib/x86_64-linux-gnu/libc-2.31.so'
```
No file name or line numbers in the output. (The warnings can be safely ignored
since they are not relevant here).
For comparison on CentOS 6, for example, it works fine using the same version
of stap:
```
$ stap a.stp -c ./a.out
0x4004b6 : main+0x4/0xe at /home/agentzh/git/systemtap/a.c:2
[/home/agentzh/git/systemtap/a.out]
0x7fe4d3140d20 [/lib64/libc-2.12.so+0x1ed20/0x394000]
WARNING: Missing unwind data for a module, rerun with 'stap -d
/lib64/libc-2.12.so'
```
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tapsets/26843] print_ubacktrace_fileline is broken on master
2020-11-04 21:54 [Bug tapsets/26843] New: print_ubacktrace_fileline is broken on master agentzh at gmail dot com
@ 2024-01-11 22:11 ` wcohen at redhat dot com
2024-01-12 13:20 ` mcermak at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2024-01-11 22:11 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=26843
William Cohen <wcohen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wcohen at redhat dot com
Last reconfirmed| |2024-01-11
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
When trying this on x86_64 RHEL8, RHEL9, and Fedora 39 with a current git
checkout of systemtap (023ec371b183c1) the output included the file and line
number:
$ sudo ../install/bin/stap a.stp -c
/home/wcohen/systemtap_write/systemtap/a.out
0x40110a : main+0x4/0xe at /home/wcohen/systemtap_write/systemtap/a.c:2
[/home/wcohen/systemtap_write/systemtap/a.out]
0x7f26492ee14a [/usr/lib64/libc.so.6+0x2814a/0x1e2000]
WARNING: Missing unwind data for a module, rerun with 'stap -d
/usr/lib64/libc.so.6'
However, on x86_64 unbuntu 20.04 I do see the issue reported with the same git
checkout of systemtap:
$ sudo ../install/bin/stap a.stp -c
/home/william/systemtap_write/systemtap/a.out
0x55facda6a131 : main+0x8/0x17 [/home/william/systemtap_write/systemtap/a.out]
0x7f3804b72083 [/usr/lib/x86_64-linux-gnu/libc-2.31.so+0x24083/0x1f2000]
WARNING: Missing unwind data for a module, rerun with 'stap -d
/usr/lib/x86_64-linux-gnu/libc-2.31.so'
On RHEL8 dwarf4 is being used and on RHEL9/Fedora 39 dwarf 5. Ubuntu 20.04 is
using dwarf 4. I was able to run the unbuntu generated a.out on f39. The
output is missing the expected filename and line number. Using "llvm-objdump
--line-numbers <object_file>" on f39 it appears that llvm-objdump can find the
line numbers:
f39 generated binary:
0000000000401106 <main>:
; main():
; /home/wcohen/systemtap_write/systemtap/a.c:1
401106: 55 pushq %rbp
401107: 48 89 e5 movq %rsp, %rbp
; /home/wcohen/systemtap_write/systemtap/a.c:2
40110a: b8 00 00 00 00 movl $0x0, %eax
; /home/wcohen/systemtap_write/systemtap/a.c:3
40110f: 5d popq %rbp
401110: c3 retq
ubuntu 20.04 generated binary:
0000000000001129 <main>:
; main():
; /home/william/systemtap_write/systemtap/a.c:1
1129: f3 0f 1e fa endbr64
112d: 55 pushq %rbp
112e: 48 89 e5 movq %rsp, %rbp
; /home/william/systemtap_write/systemtap/a.c:2
1131: b8 00 00 00 00 movl $0x0, %eax
; /home/william/systemtap_write/systemtap/a.c:3
1136: 5d popq %rbp
1137: c3 retq
1138: 0f 1f 84 00 00 00 00 00 nopl (%rax,%rax)
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tapsets/26843] print_ubacktrace_fileline is broken on master
2020-11-04 21:54 [Bug tapsets/26843] New: print_ubacktrace_fileline is broken on master agentzh at gmail dot com
2024-01-11 22:11 ` [Bug tapsets/26843] " wcohen at redhat dot com
@ 2024-01-12 13:20 ` mcermak at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: mcermak at redhat dot com @ 2024-01-12 13:20 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=26843
Martin Cermak <mcermak at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|systemtap at sourceware dot org |mcermak at redhat dot com
CC| |mcermak at redhat dot com
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-12 13:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 21:54 [Bug tapsets/26843] New: print_ubacktrace_fileline is broken on master agentzh at gmail dot com
2024-01-11 22:11 ` [Bug tapsets/26843] " wcohen at redhat dot com
2024-01-12 13:20 ` mcermak at redhat dot com
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).