Bug 720979 - do not use next as a variable name in qemu-kvm systemtap tapset
do not use next as a variable name in qemu-kvm systemtap tapset
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
: 729950 (view as bug list)
Depends On:
Blocks: 798676
  Show dependency treegraph
 
Reported: 2011-07-13 08:15 EDT by Lubos Kocman
Modified: 2013-01-09 19:04 EST (History)
7 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.181.el6
Doc Type: Bug Fix
Doc Text:
Bug wasn't present in any released version.
Story Points: ---
Clone Of:
: 798676 (view as bug list)
Environment:
Last Closed: 2011-12-06 10:53:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
stap script that I've used (1.27 KB, application/octet-stream)
2011-07-13 08:15 EDT, Lubos Kocman
no flags Details
proposed patch (1.02 KB, patch)
2011-07-13 08:16 EDT, Lubos Kocman
no flags Details | Diff
proposed patch for tapset (1.02 KB, patch)
2011-07-13 08:20 EDT, Lubos Kocman
no flags Details | Diff

  None (edit)
Description Lubos Kocman 2011-07-13 08:15:37 EDT
Created attachment 512650 [details]
stap script that I've used

Description of problem:

I got error following tapset errror with qemu-kvm.stp output while probing some spice-client related functions

Version-Release number of selected component (if applicable):

qemu-kvm-0.12.1.2-2.169.el6.x86_64

How reproducible:


Steps to Reproduce:
1. stap stream.stp
  
Actual results:

bash-4.1$ ls
stream.stp
bash-4.1$ sudo stap stream.stp 
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:260:8
     source:   next = $arg3;
                    ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:289:8
     source:   next = $arg3;
                    ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:315:8
     source:   next = $arg2;
                    ^
3 parse error(s).
WARNING: tapset '/usr/share/systemtap/tapset/qemu-kvm.stp' has errors, and will be skipped.
Catching stream events. Press Ctrl+c to exit.
^C
SUMMARY (n-called functions)
-------------------------------------------
|  handle_stream_create(): 0 
|  handle_stream_destroy(): 0 
|  handle_stream_update(): 0 
-------------------------------------------


Expected results:

no parse errors in qemu-kvm tapset

Additional info:

see proposed patch that works for me (not sure how it affects scripts that are relying on it) but since next is probably a reserved keyword and it's not usable anyway there shouldn't be any actual impact right?
Comment 1 Lubos Kocman 2011-07-13 08:16:25 EDT
Created attachment 512651 [details]
proposed patch

diff -crB /usr/share/systemtap/tapset/qemu-kvm.stp  ~/qemu-kvm.stp > ~/proposed_patch
Comment 2 Lubos Kocman 2011-07-13 08:20:05 EDT
Created attachment 512652 [details]
proposed patch for tapset
Comment 3 Jes Sorensen 2011-07-18 10:35:10 EDT
Lubos,

Note that you are proposing a patch to an automatically generated file,
so it won't solve the problem.

In addition please use unified diff for patches (diff -u).

The problematic trace points seem to have come from the addition
of the ehci patches, which were Gerd Kraxel's patches, so reassigning
to him.

Jes
Comment 4 Gerd Hoffmann 2011-07-20 11:44:58 EDT
http://patchwork.ozlabs.org/patch/105747/
Comment 6 Amit Shah 2011-08-12 03:05:47 EDT
*** Bug 729950 has been marked as a duplicate of this bug. ***
Comment 10 juzhang 2011-08-31 06:05:34 EDT
Reproduce this issue with qemu-kvm-0.12.1.2-2.180.el6

steps
1.cat memory.stp 
probe qemu.kvm.qemu_malloc
{
   printf("size = %p,  ptr =%u ",size,ptr);
  
}

2.stap memory.stp


Results:
stap memory.stp
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:260:8
     source:   next = $arg3;
                    ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:289:8
     source:   next = $arg3;
                    ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:315:8
     source:   next = $arg2;
                    ^
3 parse errors.
WARNING: tapset '/usr/share/systemtap/tapset/qemu-kvm.stp' has errors, and will be skipped.
semantic error: probe point mismatch at position 0  (alternatives: __nfs __scheduler __signal __tcpmib __vm _linuxmib _signal _sunrpc _syscall _vfs begin begin(number) end end(number) error error(number) generic ioblock ioblock_trace ioscheduler ioscheduler_trace ipmib irq_handler kernel kprobe kprocess libvirt linuxmib module(string) nd_syscall netdev never nfs nfsd perf process process(number) process(string) procfs procfs(string) python scheduler scsi signal socket softirq stap staprun sunrpc syscall tcp tcpmib timer tty udp vfs vm workqueue): identifier 'qemu' at memory.stp:1:7 while resolving probe point qemu.kvm.qemu_malloc
        source: probe qemu.kvm.qemu_malloc
                      ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.


Verified this issue with qemu-kvm-0.12.1.2-2.184.el6

steps
1. cat memory.stp 
probe qemu.kvm.qemu_malloc
{
   printf("size = %p,  ptr =%u ",size,ptr);
  
}

2.stap memory.stp

3. boot guest

Resutls:
ptr =31110576 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =32583648 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =30978528 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =32313184 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =31110576 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =32583648 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =30978528 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =32313184 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =31110576 size = 0xc050,  ptr =43610576 size = 0xc050,  ptr =43561328 size = 0x10,  ptr =32583648 size = 0xc050,  ptr =43610576 size = 0xc050

This issue has been fixed.
Comment 12 Gerd Hoffmann 2011-11-18 11:23:15 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Bug wasn't present in any released version.
Comment 13 errata-xmlrpc 2011-12-06 10:53:28 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1531.html

Note You need to log in before you can comment on or make changes to this bug.