public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64
@ 2011-03-10 19:43 dsmith at redhat dot com
  2011-03-11 21:02 ` [Bug runtime/12566] " dsmith at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dsmith at redhat dot com @ 2011-03-10 19:43 UTC (permalink / raw)
  To: systemtap

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

           Summary: usymbols.exp 64-bit test failing on ppc64
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap@sourceware.org
        ReportedBy: dsmith@redhat.com


After fixing the testcase problem outlined here:

BZ639344 (usymbols.exp fails on ppc and s390x)
<https://bugzilla.redhat.com/show_bug.cgi?id=639344>

the usymbols.exp fails with a real problem on ppc64 (2.6.32-120.el6.s390x and
2.6.32.12-115.fc12.ppc64).

====
Snapshot: version 1.5 /0.152 commit release-1.4-143-gbd8504c + changes
GCC: 4.4.5 [gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)]
Distro: Red Hat Enterprise Linux Server release 6.1 Beta (Santiago)

Running /root/src/testsuite/systemtap.context/usymbols.exp ...
FAIL: usymbols -m64
PASS: usymbols -m32

        === systemtap Summary ===

# of expected passes        1
# of unexpected failures    1
====

The 64-bit test is failing because the script outputs:

====
handler: 0x10010c48 (<unknown>)
handler: lib_handler (/root/ppc64/testsuite/libusymbols-m64.so)
====

Instead of something like:

====
handler: main_handler (/root/ppc64/testsuite/usymbols-m64)
handler: lib_handler (/root/ppc64/testsuite/libusymbols-m64.so)
====

From looking at the test executable, 0x10010c48 is the correct address for
main_handler so systemtap should have all the information necessary to do the
lookup, but it somehow fails.

Note that this test completely passes on:

2.6.32-71.18.2.el6.x86_64
2.6.32-71.18.2.el6.i686
2.6.32-120.el6.s390x

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
@ 2011-03-11 21:02 ` dsmith at redhat dot com
  2011-03-11 21:29 ` mjw at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dsmith at redhat dot com @ 2011-03-11 21:02 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from David Smith <dsmith at redhat dot com> 2011-03-11 21:02:13 UTC ---
Here's some additional information.

In the 32-bit case (which works):

# eu-readelf -s usymbols-m32 | fgrep main_handler
   62: 1000059c      4 FUNC    GLOBAL DEFAULT       12 main_handler
# fgrep main_handler /tmp/stapVlnORz/stap-symbols.h 
  { 0x1000059c, "main_handler" },

The above is good, stap's value of the symbol matches up with eu-readelf's
value.

When run under gdb,
(gdb) p &main_handler
$2 = (void (*)(int)) 0x1000059c <main_handler>

That's good, gdb's idea of the symbol value also matches.

# fgrep /usymbols-m32 /proc/9161/maps
10000000-10010000 r-xp 00000000 fd:00 2239275                           
/root/ppc64/testsuite/usymbols-m32
10010000-10020000 rw-p 00000000 fd:00 2239275                           
/root/ppc64/testsuite/usymbols-m32

That's good, 0x1000059c exists within that first executable vma.

In the 64-bit case (which fails):

# eu-readelf -s usymbols-m64  | fgrep main_handler
   63: 0000000010010c48     16 FUNC    GLOBAL DEFAULT       22 main_handler
# fgrep main_handler /tmp/stapImPRwN/stap-symbols.h 
  { 0x10010c48, "main_handler" },

That's good, the eu-readelf and stap values match.

When run under gb,
(gdb) p &main_handler
$1 = (void (*)(int)) 0x10000700 <main_handler>

That's bad - when run, somehow the address has changed.

# fgrep /usymbols-m64 /proc/9183/maps 
10000000-10010000 r-xp 00000000 fd:00 2239236                           
/root/ppc64/testsuite/usymbols-m64
10010000-10020000 rw-p 00000000 fd:00 2239236                           
/root/ppc64/testsuite/usymbols-m64

The 0x10010c48 address exists within that 2nd non-executable vma (the code in
vma.c only looks at executable vmas), which is why the symbol lookup code
fails.  The gdb address (0x10000700) does exist within the 1st executable vma.

Perhaps there is some relocation going on that systemtap needs to know about.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
  2011-03-11 21:02 ` [Bug runtime/12566] " dsmith at redhat dot com
@ 2011-03-11 21:29 ` mjw at redhat dot com
  2011-08-25  2:49 ` phan at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mjw at redhat dot com @ 2011-03-11 21:29 UTC (permalink / raw)
  To: systemtap

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

Mark Wielaard <mjw at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at redhat dot com

--- Comment #2 from Mark Wielaard <mjw at redhat dot com> 2011-03-11 21:29:16 UTC ---
(In reply to comment #1)
> In the 64-bit case (which fails):
> 
> # eu-readelf -s usymbols-m64  | fgrep main_handler
>    63: 0000000010010c48     16 FUNC    GLOBAL DEFAULT       22 main_handler
> # fgrep main_handler /tmp/stapImPRwN/stap-symbols.h 
>   { 0x10010c48, "main_handler" },
> 
> That's good, the eu-readelf and stap values match.
> 
> When run under gb,
> (gdb) p &main_handler
> $1 = (void (*)(int)) 0x10000700 <main_handler>
> 
> That's bad - when run, somehow the address has changed.
> 
> # fgrep /usymbols-m64 /proc/9183/maps 
> 10000000-10010000 r-xp 00000000 fd:00 2239236                           
> /root/ppc64/testsuite/usymbols-m64
> 10010000-10020000 rw-p 00000000 fd:00 2239236                           
> /root/ppc64/testsuite/usymbols-m64
> 
> The 0x10010c48 address exists within that 2nd non-executable vma (the code in
> vma.c only looks at executable vmas), which is why the symbol lookup code
> fails.  The gdb address (0x10000700) does exist within the 1st executable vma.
> 
> Perhaps there is some relocation going on that systemtap needs to know about.

The 0x10010c48 address is a pointer into the .odp table. So it is an indirect
address to the real function address. We had a little discussion on making
systemtap deal with that better on the mailinglist:
http://sourceware.org/ml/systemtap/2011-q1/threads.html#00082

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
  2011-03-11 21:02 ` [Bug runtime/12566] " dsmith at redhat dot com
  2011-03-11 21:29 ` mjw at redhat dot com
@ 2011-08-25  2:49 ` phan at redhat dot com
  2017-10-11 10:44 ` mark at klomp dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: phan at redhat dot com @ 2011-08-25  2:49 UTC (permalink / raw)
  To: systemtap

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

han pingtian <phan at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phan at redhat dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
                   ` (2 preceding siblings ...)
  2011-08-25  2:49 ` phan at redhat dot com
@ 2017-10-11 10:44 ` mark at klomp dot org
  2017-10-11 10:48 ` mjw at fedoraproject dot org
  2023-12-06 15:48 ` wcohen at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2017-10-11 10:44 UTC (permalink / raw)
  To: systemtap

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

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

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
                   ` (3 preceding siblings ...)
  2017-10-11 10:44 ` mark at klomp dot org
@ 2017-10-11 10:48 ` mjw at fedoraproject dot org
  2023-12-06 15:48 ` wcohen at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: mjw at fedoraproject dot org @ 2017-10-11 10:48 UTC (permalink / raw)
  To: systemtap

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

Mark Wielaard <mjw at fedoraproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|mjw at fedoraproject dot org       |

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

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

* [Bug runtime/12566] usymbols.exp 64-bit test failing on ppc64
  2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
                   ` (4 preceding siblings ...)
  2017-10-11 10:48 ` mjw at fedoraproject dot org
@ 2023-12-06 15:48 ` wcohen at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: wcohen at redhat dot com @ 2023-12-06 15:48 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wcohen at redhat dot com
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
This is currently working on RHEL8 andRHEL9 for both ppc64le and s390x.

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

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

end of thread, other threads:[~2023-12-06 15:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10 19:43 [Bug runtime/12566] New: usymbols.exp 64-bit test failing on ppc64 dsmith at redhat dot com
2011-03-11 21:02 ` [Bug runtime/12566] " dsmith at redhat dot com
2011-03-11 21:29 ` mjw at redhat dot com
2011-08-25  2:49 ` phan at redhat dot com
2017-10-11 10:44 ` mark at klomp dot org
2017-10-11 10:48 ` mjw at fedoraproject dot org
2023-12-06 15:48 ` wcohen 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).