From: "mcermak at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug uprobes/18171] setjmp/longjmp clashing with u[ret]probes, causing SIGSEGV or SIGILL
Date: Mon, 30 Mar 2015 14:17:00 -0000 [thread overview]
Message-ID: <bug-18171-6586-M6OZAELAfL@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-18171-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18171
--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Reproduced using perf. Problem is the order of commandline switches produced by
stap2perf: Flipping -a and -x seems to help:
=======
# perf probe -x /usr/share/systemtap/testsuite/bz5274 -a
bz5274_funca_return=funca%return
# perf probe -x /usr/share/systemtap/testsuite/bz5274 -a
bz5274_funcb_return=funcb%return
...
=======
After this I have:
=======
# cat //sys/kernel/debug/tracing/uprobe_events
r:probe_bz5274/bz5274_funca_return
/usr/share/systemtap/testsuite/bz5274:0x00000000000006e6
r:probe_bz5274/bz5274_funcb_return
/usr/share/systemtap/testsuite/bz5274:0x00000000000006a0
p:probe_bz5274/bz5274_funcc
/usr/share/systemtap/testsuite/bz5274:0x000000000000065a
p:probe_bz5274/bz5274_funcd
/usr/share/systemtap/testsuite/bz5274:0x0000000000000616
r:probe_bz5274/bz5274_main_return
/usr/share/systemtap/testsuite/bz5274:0x0000000000000725
=======
Now using -e 'probe_bz5274:*' instead of -e 'probe:*' I'm getting:
=======
# /root/bin/perf record -e 'probe_bz5274:*' -aR ./bz5274
In bz5274.c: funcb :20 : i=1. Calling funcc
In bz5274.c: funcc :13 : i=1. Calling funcd
In bz5274.c: funcd :7 : i=1. Calling longjmp
In bz5274.c: funcb :20 : i=2. Calling funcc
In bz5274.c: funcc :13 : i=2. Calling funcd
In bz5274.c: funcd :7 : i=2. Calling longjmp
In bz5274.c: funcb :20 : i=3. Calling funcc
In bz5274.c: funcc :13 : i=3. Calling funcd
In bz5274.c: funcd :7 : i=3. Calling longjmp
In bz5274.c: funcb :20 : i=4. Calling funcc
In bz5274.c: funcc :13 : i=4. Calling funcd
In bz5274.c: funcd :7 : i=4. Calling longjmp
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.166 MB perf.data (10 samples) ]
Segmentation fault (core dumped)
[root@dhcp-1-102 testsuite]#
=======
But now I'm getting two corefiles:
=======
[root@dhcp-1-102 testsuite]# ls core*
core.2097 core.2098
[root@dhcp-1-102 testsuite]# file core.2200
core.2200: ELF 64-bit LSB core file x86-64, version 1 (SYSV), too many program
headers (163)
[root@dhcp-1-102 testsuite]# file core.2201
core.2201: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from
'./bz5274'
[root@dhcp-1-102 testsuite]#
[root@dhcp-1-102 testsuite]# gdb -q ./bz5274 core.2097
Reading symbols from ./bz5274...done.
warning: core file may not match specified executable file.
---------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------------------------------------------
[New LWP 2097]
Core was generated by `/root/bin/perf record -e probe_bz5274:* -aR ./bz5274'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000003e38e0ff99 in ?? ()
(gdb) info registers
rax 0x0 0
rbx 0x0 0
rcx 0xffffffffffffffff -1
rdx 0xb 11
rsi 0x831 2097
rdi 0x831 2097
rbp 0x3e389b76a0 0x3e389b76a0
rsp 0x7fff705200f8 0x7fff705200f8
r8 0x7fff70520030 140735077810224
r9 0x7fff7051fe40 140735077809728
r10 0xa5 165
r11 0x202 514
r12 0x1 1
r13 0x3e389b8e80 267237691008
r14 0x8365d0 8611280
r15 0x0 0
rip 0x3e38e0ff99 0x3e38e0ff99
eflags 0x202 [ IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) q
[root@dhcp-1-102 testsuite]#
[root@dhcp-1-102 testsuite]# gdb -q ./bz5274 core.2098
Reading symbols from ./bz5274...done.
[New LWP 2098]
Core was generated by `./bz5274'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000400724 in funca (s=0xffff95e800400876 <error: Cannot access
memory at address 0xffff95e800400876>, env=0xbfc68948ffffff30) at
systemtap.base/bz5274.c:34
34 }
(gdb) info registers
rax 0x4 4
rbx 0x0 0
rcx 0x7fffffe4 2147483620
rdx 0x400702 4196098
rsi 0x4 4
rdi 0x7fff359cc380 140734092854144
rbp 0x41ff894156415741 0x41ff894156415741
rsp 0x400768 0x400768 <__libc_csu_init+8>
r8 0x7fff359cc340 140734092854080
r9 0x7fff359cc360 140734092854112
r10 0x0 0
r11 0x246 582
r12 0x400520 4195616
r13 0x7fff359cc530 140734092854576
r14 0x0 0
r15 0x0 0
rip 0x400724 0x400724 <funca+62>
eflags 0x10246 [ PF ZF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb)
=======
So I assume only the second corefile is relevant.
The $rsp corruption seems to happen here too.
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2015-03-30 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 0:27 [Bug uprobes/18171] New: setjmp/longjmp clashing with uprobes, " fche at redhat dot com
2015-03-28 0:31 ` [Bug uprobes/18171] setjmp/longjmp clashing with u[ret]probes, " fche at redhat dot com
2015-03-30 14:17 ` mcermak at redhat dot com [this message]
2015-04-09 21:26 ` mjw at redhat dot com
2015-05-22 20:20 ` fche at redhat dot com
2017-10-11 10:44 ` mark at klomp dot org
2017-10-11 10:49 ` mjw at fedoraproject dot org
2018-10-18 18:39 ` fche at redhat 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-18171-6586-M6OZAELAfL@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).