public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/15981] New: inode-uprobes breaking userspace app
@ 2013-09-26 19:43 dsmith at redhat dot com
  2013-09-26 19:45 ` [Bug uprobes/15981] " dsmith at redhat dot com
  2015-05-19 14:56 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dsmith at redhat dot com @ 2013-09-26 19:43 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=15981

            Bug ID: 15981
           Summary: inode-uprobes breaking userspace app
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: uprobes
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com

On rawhide (3.12.0-0.rc2.git0.1.fc21.x86_64), the bz6850.exp testcase fails:

====
Running ../../src/testsuite/systemtap.base/bz6850.exp ...
PASS: bz6850 compile
starting ../../src/testsuite/systemtap.base/bz6850.stp 
spawn1 stap -p4 ../../src/testsuite/systemtap.base/bz6850.stp 
spawn stap -p4 ../../src/testsuite/systemtap.base/bz6850.stp
/discer.farm/es/scratch/dsmith/systemtap/rawhide-64/testsuite/.systemtap-dsmith/cache/2a/stap_2a1b058aebac8d36361590ecabd4e329_6092.ko
/discer.farm/es/scratch/dsmith/systemtap/rawhide-64/testsuite/.systemtap-dsmith/cache/2a/stap_2a1b058aebac8d36361590ecabd4e329_6092.ko
wait results: 2007 exp6 0 0
PASS: bz6850 -p4
spawn stap ../../src/testsuite/systemtap.base/bz6850.stp -c ./bz6850
main called
fork_and_exec1 called
fork_and_exec2 called
fork1 called
fork2 called
fork1 returns
fork_and_exec2 returns
fork_and_exec1 returns
main returns
FAIL: bz6850 -p5
====

The testcase is failing because the test executable isn't writing out a marker
file after the fork. If not pobed with uprobes, this works just fine.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug uprobes/15981] inode-uprobes breaking userspace app
  2013-09-26 19:43 [Bug uprobes/15981] New: inode-uprobes breaking userspace app dsmith at redhat dot com
@ 2013-09-26 19:45 ` dsmith at redhat dot com
  2015-05-19 14:56 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dsmith at redhat dot com @ 2013-09-26 19:45 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=15981

--- Comment #1 from David Smith <dsmith at redhat dot com> ---
bz6850.exp was written against a corner case in the original version of uprobes
(the one built on top of utrace). It appears that this corner case also effects
inode-uprobes, since I can reproduce this one with "raw uprobes", taking
systemtap out of the picture.

====
# gcc -g -o bz6850 src/testsuite/systemtap.base/bz6850.c
# ./bz6850 ; ls -l bz6850_pass ; rm -f bz6850_pass
-rw-r--r--. 1 root root 0 Sep 10 16:12 bz6850_pass
# objdump -t ./bz6850 | fgrep .text
0000000000400680 l    d  .text    0000000000000000              .text
00000000004006b0 l     F .text    0000000000000000             
deregister_tm_clones
00000000004006e0 l     F .text    0000000000000000             
register_tm_clones
0000000000400720 l     F .text    0000000000000000             
__do_global_dtors_aux
0000000000400740 l     F .text    0000000000000000              frame_dummy
0000000000400770 l     F .text    0000000000000012              fork2
0000000000400782 l     F .text    0000000000000025              fork1
00000000004007a7 l     F .text    000000000000009a              fork_and_exec2
0000000000400841 l     F .text    0000000000000025              fork_and_exec1
00000000004009d0 g     F .text    0000000000000002              __libc_csu_fini
0000000000400960 g     F .text    0000000000000065              __libc_csu_init
0000000000400680 g     F .text    0000000000000000              _start
0000000000400866 g     F .text    00000000000000ed              main
# echo > /sys/kernel/debug/tracing/uprobe_events
# echo "p:fork2_entry /root/bz6850:0x770" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "r:fork2_exit /root/bz6850:0x770" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "p:fork1_entry /root/bz6850:0x782" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "r:fork1_exit /root/bz6850:0x782" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "p:fork_and_exec2_entry /root/bz6850:0x7a7" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "r:fork_and_exec2_exit /root/bz6850:0x7a7" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "p:fork_and_exec1_entry /root/bz6850:0x841" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "r:fork_and_exec1_exit /root/bz6850:0x841" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "p:main_entry /root/bz6850:0x866" >>
/sys/kernel/debug/tracing/uprobe_events
# echo "r:main_exit /root/bz6850:0x866" >>
/sys/kernel/debug/tracing/uprobe_events
# echo 1 > /sys/kernel/debug/tracing/events/uprobes/enable
# ./bz6850 ; ls -l bz6850_pass ; rm -f bz6850_pass
ls: cannot access bz6850_pass: No such file or directory
# echo 0 > /sys/kernel/debug/tracing/events/uprobes/enable
# cat /sys/kernel/debug/tracing/trace# tracer: nop
#
# entries-in-buffer/entries-written: 17/17   #P:1
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
          bz6850-2012  [000] d... 3459730.171267: main_entry: (0x400866)
          bz6850-2012  [000] d... 3459730.171319: fork_and_exec1_entry:
(0x400841)
          bz6850-2012  [000] d... 3459730.171334: fork_and_exec2_entry:
(0x4007a7)
          bz6850-2012  [000] d... 3459730.171348: fork1_entry: (0x400782)
          bz6850-2012  [000] d... 3459730.171364: fork2_entry: (0x400770)
          bz6850-2012  [000] d... 3459730.171561: fork2_exit: (0x4007a5 <-
0x400770)
          bz6850-2012  [000] d... 3459730.171565: fork1_exit: (0x4007ca <-
0x400782)
          bz6850-2012  [000] d... 3459730.171567: fork_and_exec2_exit:
(0x400864 <- 0x4007a7)
          bz6850-2012  [000] d... 3459730.171569: fork_and_exec1_exit:
(0x40088d <- 0x400841)
# ./bz6850 ; ls -l bz6850_pass ; rm -f bz6850_pass
-rw-r--r--. 1 root root 0 Sep 10 16:09 bz6850_pass
====

So, somehow putting probes in the target executable keep it from writing its
marker file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug uprobes/15981] inode-uprobes breaking userspace app
  2013-09-26 19:43 [Bug uprobes/15981] New: inode-uprobes breaking userspace app dsmith at redhat dot com
  2013-09-26 19:45 ` [Bug uprobes/15981] " dsmith at redhat dot com
@ 2015-05-19 14:56 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2015-05-19 14:56 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=15981

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |INVALID

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
(we try to represent proven kernel uprobes bugs e.g. bugzilla.redhat.com bugs
rather than here in the stap bugzilla.  In any case, the test case works now
under gcc 4.9.2, kernel 3.18.9).

-- 
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:[~2015-05-19 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 19:43 [Bug uprobes/15981] New: inode-uprobes breaking userspace app dsmith at redhat dot com
2013-09-26 19:45 ` [Bug uprobes/15981] " dsmith at redhat dot com
2015-05-19 14:56 ` fche 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).