public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
@ 2008-06-06 14:09 srinivasa at in dot ibm dot com
  2008-06-09  3:31 ` [Bug translator/6601] " jkenisto at us dot ibm dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: srinivasa at in dot ibm dot com @ 2008-06-06 14:09 UTC (permalink / raw)
  To: systemtap

Environment: Kernel-2.6.26-rc4, systemtap-latest git, elfutils-0.131

systemtaps with kelf option fails on powerpc systems with -EINVAL. To do more
investigation, I printed relocated address along with "probe registration" error
message. Address shows data symbol("D" in /proc/kallsyms) address of probe
point. Even stap-symbols.h shows both the text and data symbol address of some
functions.
=================================
[root@llm16 systemtap-6jun]# ./stap -v -k --kelf -e 'probe
kernel.function("do_exit") { printf("hi\n")}'
Pass 1: parsed user script and 41 library script(s) in 680usr/20sys/698real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in
250usr/20sys/271real ms.
Pass 3: using cached
/root/.systemtap/cache/90/stap_904bc7d6ba7dfba9b5e96f62b96b5472_233.c
Pass 4: using cached
/root/.systemtap/cache/90/stap_904bc7d6ba7dfba9b5e96f62b96b5472_233.ko
Pass 5: starting run.
ERROR: probe kernel.function("do_exit@?") registration error (rc
0xc000000000630838  -22)    <<============ reloacted_address shows data sym addr


Pass 5: run completed in 0usr/50sys/59real ms.
Keeping temporary directory "/tmp/stapvPDT0F"
[root@llm16 systemtap-6jun]# cat /proc/kallsyms  | grep do_exit
c000000000058450 T .do_exit
c0000000004f6a68 d __ksymtab_do_exit
c0000000004fee40 d __kcrctab_do_exit
c000000000501be9 r __kstrtab_do_exit
c000000000630838 D do_exit
===========================================

-- 
           Summary: systemtap with --kelf option looks for data symbol to
                    probe a function on powerpc systemtap
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: srinivasa at in dot ibm dot com
                CC: jkenisto at us dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

* [Bug translator/6601] systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
  2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
@ 2008-06-09  3:31 ` jkenisto at us dot ibm dot com
  2008-06-09 11:12 ` jkenisto at us dot ibm dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-06-09  3:31 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-06-06 23:45 -------
Created an attachment (id=2774)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2774&action=view)
Possible fix: rejects symbols in .odp section

Hmmm.  Apparently at least some function-descriptor symbols like do_exit show
up in elf as type STT_FUNC even though nm labels them "D".  (You don't see this
problem with --kmap=/proc/kallsyms --ignore-vmlinux, do you?)  One way to
screen these out is to reject all symbols in the .opd section.	The attached
patch does that.  Please give it a try and let me know how it works.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

* [Bug translator/6601] systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
  2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
  2008-06-09  3:31 ` [Bug translator/6601] " jkenisto at us dot ibm dot com
@ 2008-06-09 11:12 ` jkenisto at us dot ibm dot com
  2008-06-09 17:24 ` srinivasa at in dot ibm dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-06-09 11:12 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

* [Bug translator/6601] systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
  2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
  2008-06-09  3:31 ` [Bug translator/6601] " jkenisto at us dot ibm dot com
  2008-06-09 11:12 ` jkenisto at us dot ibm dot com
@ 2008-06-09 17:24 ` srinivasa at in dot ibm dot com
  2008-06-09 22:14 ` jkenisto at us dot ibm dot com
  2008-06-10 22:41 ` jkenisto at us dot ibm dot com
  4 siblings, 0 replies; 6+ messages in thread
From: srinivasa at in dot ibm dot com @ 2008-06-09 17:24 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From srinivasa at in dot ibm dot com  2008-06-09 11:11 -------
(In reply to comment #1)
> Created an attachment (id=2774)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2774&action=view)
> Possible fix: rejects symbols in .odp section
> 
> Hmmm.  Apparently at least some function-descriptor symbols like do_exit show
> up in elf as type STT_FUNC even though nm labels them "D".  (You don't see this
> problem with --kmap=/proc/kallsyms --ignore-vmlinux, do you?) 

I tried with --kmap option, But it didn't work as --kelf,

> One way to
> screen these out is to reject all symbols in the .opd section.	The attached
> patch does that.  Please give it a try and let me know how it works.

After applying the patch, stap worked well with --kelf and --kmap option.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

* [Bug translator/6601] systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
  2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
                   ` (2 preceding siblings ...)
  2008-06-09 17:24 ` srinivasa at in dot ibm dot com
@ 2008-06-09 22:14 ` jkenisto at us dot ibm dot com
  2008-06-10 22:41 ` jkenisto at us dot ibm dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-06-09 22:14 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-06-09 18:45 -------
Fix pushed today, commit 46f7b6b.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

* [Bug translator/6601] systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap
  2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
                   ` (3 preceding siblings ...)
  2008-06-09 22:14 ` jkenisto at us dot ibm dot com
@ 2008-06-10 22:41 ` jkenisto at us dot ibm dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-06-10 22:41 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-06-10 20:22 -------
The systemtap.context/num_args test, augmented today to test with --kelf
--ignore-dwarf, should serve as a regression test for this bug.  Closing this PR.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=6601

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

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

end of thread, other threads:[~2008-06-10 20:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-06 14:09 [Bug translator/6601] New: systemtap with --kelf option looks for data symbol to probe a function on powerpc systemtap srinivasa at in dot ibm dot com
2008-06-09  3:31 ` [Bug translator/6601] " jkenisto at us dot ibm dot com
2008-06-09 11:12 ` jkenisto at us dot ibm dot com
2008-06-09 17:24 ` srinivasa at in dot ibm dot com
2008-06-09 22:14 ` jkenisto at us dot ibm dot com
2008-06-10 22:41 ` jkenisto at us dot ibm 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).