public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand  for x86_64 qemu shared libraries
@ 2018-09-11 19:12 wcohen at redhat dot com
  2018-09-11 19:24 ` [Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points wcohen at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2018-09-11 19:12 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
@ 2018-09-11 19:24 ` wcohen at redhat dot com
  2018-09-12 14:03 ` wcohen at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2018-09-11 19:24 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
  2018-09-11 19:24 ` [Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points wcohen at redhat dot com
@ 2018-09-12 14:03 ` wcohen at redhat dot com
  2018-09-12 14:12 ` fche at redhat dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2018-09-12 14:03 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
  2018-09-11 19:24 ` [Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points wcohen at redhat dot com
  2018-09-12 14:03 ` wcohen at redhat dot com
@ 2018-09-12 14:12 ` fche at redhat dot com
  2018-09-12 15:03 ` wcohen at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2018-09-12 14:12 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
                   ` (2 preceding siblings ...)
  2018-09-12 14:12 ` fche at redhat dot com
@ 2018-09-12 15:03 ` wcohen at redhat dot com
  2018-09-12 15:56 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wcohen at redhat dot com @ 2018-09-12 15:03 UTC (permalink / raw)
  To: systemtap

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 <sandipan@linux.vnet.ibm.com>
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 <sandipan@linux.vnet.ibm.com>

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

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
                   ` (3 preceding siblings ...)
  2018-09-12 15:03 ` wcohen at redhat dot com
@ 2018-09-12 15:56 ` fche at redhat dot com
  2020-02-19 21:07 ` fche at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2018-09-12 15:56 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
                   ` (4 preceding siblings ...)
  2018-09-12 15:56 ` fche at redhat dot com
@ 2020-02-19 21:07 ` fche at redhat dot com
  2021-04-15 15:46 ` dgilbert at redhat dot com
  2021-04-19 19:15 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2020-02-19 21:07 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
                   ` (5 preceding siblings ...)
  2020-02-19 21:07 ` fche at redhat dot com
@ 2021-04-15 15:46 ` dgilbert at redhat dot com
  2021-04-19 19:15 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: dgilbert at redhat dot com @ 2021-04-15 15:46 UTC (permalink / raw)
  To: systemtap

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

Dr. David Alan Gilbert <dgilbert at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |dgilbert at redhat dot com
         Resolution|WORKSFORME                  |---

--- Comment #6 from Dr. David Alan Gilbert <dgilbert at redhat dot com> ---
I'm seeing this here on RHEL8.4 qemu 5.2

probe qemu.kvm.ram_load_complete =
process("/usr/libexec/qemu-kvm").mark("ram_load_complete")
{
  ret = $arg1;
  seq_iter = $arg2;
}

# qemu-trace-stap -v run /usr/libexec/qemu-kvm  'mig*'  '*vmstate*'  
'*savevm*'  'bdrv*' 'blk*' 'qcow*' '*loadvm*' 'ram_*'
Using tapset dir '/usr/share/systemtap/tapset' for binary
'/usr/libexec/qemu-kvm'
Compiling script 'probe qemu.kvm.log.mig* {} probe qemu.kvm.log.*vmstate* {}
probe qemu.kvm.log.*savevm* {} probe qemu.kvm.log.bdrv* {} probe
qemu.kvm.log.blk* {} probe qemu.kvm.log.qcow* {} probe qemu.kvm.log.*loadvm* {}
probe qemu.kvm.log.ram_* {}'
WARNING: Can't parse SDT_V3 operand 'seq_iter.31484(%rip)' [man error::sdt]:
identifier '$arg2' at /usr/share/systemtap/tapset/qemu-kvm.stp:17906:14
 source:   seq_iter = $arg2;
                      ^
WARNING: cannot find module /usr/libexec/qemu-kvm debuginfo: No DWARF
information found [man warning::debuginfo]
semantic error: debuginfo scope not found for module '/usr/libexec/qemu-kvm',
cannot resolve context variable [man error::dwarf]: identifier '$arg2' at
:17906:14
        source:   seq_iter = $arg2;
                             ^

semantic error: debuginfo scope not found for module '/usr/libexec/qemu-kvm',
cannot resolve context variable [man error::dwarf]: identifier '$arg2' at
:17906:14
        source:   seq_iter = $arg2;
                             ^

semantic error: SDT asm not understood, requires debuginfo [man error::sdt]:
identifier '$arg2' at :17906:14
        source:   seq_iter = $arg2;
                             ^

Missing separate debuginfos, use: debuginfo-install
qemu-kvm-core-5.2.0-15.module+el8.4.0+10650+50781ca0.x86_64 
Pass 2: analysis failed.  [man error::pass2]
Number of similar warning messages suppressed: 1.
Rerun with -v to see them.


seq_iter here is a little odd; it's a local static.

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

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

* [Bug translator/23634] WARNING: Can't parse SDT_V3 operand  for x86_64 qemu tapset probe points
  2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
                   ` (6 preceding siblings ...)
  2021-04-15 15:46 ` dgilbert at redhat dot com
@ 2021-04-19 19:15 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2021-04-19 19:15 UTC (permalink / raw)
  To: systemtap

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

--- Comment #7 from Frank Ch. Eigler <fche at redhat dot com> ---
For stap to make sense of such an operand, it'd have to decode symbol names
rather than register name / offset literal type constructs.  Not only that, but
do so on a scope-sensitive basis to make sure the correct symbol is matched to
the name -- but that scope information is not available.  Not sure how much we
can do.

I would suggest tweaking your stap_probe macro call to pass the given parameter
some way other than literally from that static var.  Maybe add a number to it,
and then subtract it back out in the tapset?

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

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

end of thread, other threads:[~2021-04-19 19:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 19:12 [Bug translator/23634] New: WARNING: Can't parse SDT_V3 operand for x86_64 qemu shared libraries wcohen at redhat dot com
2018-09-11 19:24 ` [Bug translator/23634] WARNING: Can't parse SDT_V3 operand for x86_64 qemu tapset probe points wcohen at redhat dot com
2018-09-12 14:03 ` wcohen at redhat dot com
2018-09-12 14:12 ` fche at redhat dot com
2018-09-12 15:03 ` wcohen at redhat dot com
2018-09-12 15:56 ` fche at redhat dot com
2020-02-19 21:07 ` fche at redhat dot com
2021-04-15 15:46 ` dgilbert at redhat dot com
2021-04-19 19:15 ` 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).