[Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

            Bug ID: 23634
           Summary: WARNING: Can't parse SDT_V3 operand  for x86_64 qemu
                    shared libraries
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

On x86_64 Fedora 28 when trying the qemu_count.stp example getting a lot of
WARNING messages like the following:

$ stap -v qemu_count.stp
Pass 1: parsed user script and 544 library scripts using
940556virt/623632res/9092shr/614684data kb, in 1540usr/170sys/1715real ms.
WARNING: Can't parse SDT_V3 operand 'balloon_opaque(%rip)' [man error::sdt]:
identifier '$arg1' at /usr/share/systemtap/tapset/qemu-system-aarch64.stp:17:12
 source:   opaque = $arg1;
                    ^
WARNING: Can't parse SDT_V3 operand 'balloon_opaque(%rip)' [man error::sdt]:
identifier '$arg1' at :17:12
 source:   opaque = $arg1;
                    ^
WARNING: Can't parse SDT_V3 operand 'seq_iter.32696(%rip)' [man error::sdt]:
identifier '$arg2' at :1572:14
 source:   seq_iter = $arg2;
                      ^
WARNING: Can't parse SDT_V3 operand 'seq_iter.32696(%rip)' [man error::sdt]:
identifier '$arg2' at :1572:14
 source:   seq_iter = $arg2;
                      ^
[wcohen@cervelo virtualization]$ rpm -qf
/usr/share/systemtap/tapset/qemu-system-aarch64.stp
qemu-system-aarch64-core-2.11.2-2.fc28.x86_64
[wcohen@cervelo virtualization]$ rpm -q systemtap
systemtap-3.3-1.fc28.x86_64

The problem also appears with systemtap build from a current git checkout on
Fedora28.  However, do not see the problem on RHEL7.  Suspect that different
info being generated in .note.stapsdt for Fedora 28 and RHEL7.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|WARNING: Can't parse SDT_V3 |WARNING: Can't parse SDT_V3
                   |operand  for x86_64 qemu    |operand  for x86_64 qemu
                   |shared libraries            |tapset probe points

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

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

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

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
> Would there be a problem changing the default STAP_SDT_ARG_CONTRAINT from "nor" to "nr"?

Not so easy, unfortunately, or we would've done it already.  "nr" forces the
compiler to push nonliteral arguments into registers.  There may not be many
registers free at that point in the code, or in the processor generally, so
there are performance costs.

If we can satisfy a systemtap.apps testsuite run with "nr" on x86-64 (not so
register-starved an architecture), then for that one perhaps we can switch the
default, and force people to accept the cost.

The underlying problem here is that in gcc, there seems to be no code that
corresponds to "public symbol relative offset" or "register-relative offset",
both of which we could or do easily support in stap or other consumers.  It's
only this "local scratch symbol relative offset" case that's a loser.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
Recompiling the fedora qemu with the following diff removed the warnings during
the build of the qemu_count.stp script:

$ diff -u ~/koji-git/qemu/qemu.spec qemu.spec
--- /home/wcohen/koji-git/qemu/qemu.spec        2018-09-11 13:41:46.696101454
-0400
+++ qemu.spec   2018-09-11 16:29:25.150797536 -0400
@@ -865,7 +865,7 @@
 %endif
         --enable-trace-backend=$tracebackends \
         --extra-ldflags="$extraldflags -Wl,-z,relro -Wl,-z,now" \
-        --extra-cflags="%{optflags}" \
+        --extra-cflags="%{optflags}  -DSTAP_SDT_ARG_CONSTRAINT=nr" \
         "$@" || cat config.log
 }

Would there be a problem changing the default STAP_SDT_ARG_CONTRAINT from "nor"
to "nr"?

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
sdt.h makes a special case for powerpc:

# ifndef STAP_SDT_ARG_CONSTRAINT
# if defined __powerpc__
# define STAP_SDT_ARG_CONSTRAINT        nZr
# else
# define STAP_SDT_ARG_CONSTRAINT        nor
# endif
# endif

This was added by:

commit 50f2ef5be3c24b3fe9eb4c9abc386d8dbc3b953a
Author: Sandipan Das <[hidden email]>
Date:   Thu Oct 5 14:39:41 2017 +0530

    powerpc: Change SDT argument constraint

    With the 'o' memory constraint, any memory operand which
    has an offsettable address is allowed. However, for some
    architectures such as powerpc, this allows operands like
    the ones shown below in the readelf output from Fedora 26
    to be generated.

      $ readelf -n /lib64/libc.so.6 | grep memory_mallopt_mmap_max -A2 -B2
        stapsdt              0x0000006c     NT_STAPSDT (SystemTap probe
descriptors)
          Provider: libc
          Name: memory_mallopt_mmap_max
          Location: 0x00000000000a0274, Base: 0x00000000001ccb90, Semaphore:
0x0000000000000000
          Arguments: -4@9 -4@.LANCHOR0+44@toc@l(8) -4@.LANCHOR0+52@toc@l(7)

    The second and third argument shown above are both having
    operands which are pointers to static data anchors. Since
    these static anchors are not included in the symbol table,
    they cannot be resolved from the binary itself. So, such
    arguments cannot be read via their corresponding markers.

    Using the 'Z' memory constraint instead solves this issue
    as it will only allow a memory operand that is an indexed
    or indirect from a register.

    So, for powerpc, we set STAP_SDT_ARG_CONSTRAINT to 'nZr'
    but keep it as 'nor' for all other architectures.

    Signed-off-by: Sandipan Das <[hidden email]>

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---
Yup, and that's ppc only.  If other platforms had that constraint code
available, stap would prefer it.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23634

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #5 from Frank Ch. Eigler <fche at redhat dot com> ---
recent qemu has worked around this one way or another

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