RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 836943 - do not use next as a variable name in qemu-kvm systemtap tapset
Summary: do not use next as a variable name in qemu-kvm systemtap tapset
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Linux
medium
unspecified
Target Milestone: rc
: ---
Assignee: Hai Huang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-02 09:31 UTC by langfang
Modified: 2013-01-15 19:22 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-15 19:22:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description langfang 2012-07-02 09:31:44 UTC
Description of problem:
I got error following tapset error with qemu_vmalloc.stp output while probing 



Version-Release number of selected component (if applicable):
#uanme -r
3.3.0-0.15.el7.x86_64
#rpm -q qemu-kvm
qemu-kvm-1.0-17.1.el7.x86_64
# rpm -q systemtap
systemtap-1.8-1.el7.x86_64


How reproducible:

100%

Steps to Reproduce:
1. stap qemu_vmalloc.stp
  

#cat qemu_vmalloc.stp
probe qemu.kvm.qemu_vmalloc
{
 printf("size is %zu \n",size); 
}


Actual results:
parse error: invalid or missing conversion specifier
	saw: string 'size is %zu \n' at qemu_vmalloc.stp:3:9
     source:  printf("size is %zu \n",size); 
                     ^
1 parse error.
parse error: expected statement
	saw: keyword at /usr/share/systemtap/tapset/qemu-kvm.stp:1139:3
     source:   in = $arg3;
               ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-kvm.stp:2078:8
     source:   next = $arg1;
                    ^
2 parse errors.
WARNING: tapset '/usr/share/systemtap/tapset/qemu-kvm.stp' has errors, and will be skipped.
parse error: expected statement
	saw: keyword at /usr/share/systemtap/tapset/qemu-system-i386.stp:1139:3
     source:   in = $arg3;
               ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-system-i386.stp:2078:8
     source:   next = $arg1;
                    ^
2 parse errors.
WARNING: tapset '/usr/share/systemtap/tapset/qemu-system-i386.stp' has errors, and will be skipped.
parse error: expected statement
	saw: keyword at /usr/share/systemtap/tapset/qemu-system-x86_64.stp:1139:3
     source:   in = $arg3;
               ^
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-system-x86_64.stp:2078:8
     source:   next = $arg1;
                    ^
2 parse errors.
WARNING: tapset '/usr/share/systemtap/tapset/qemu-system-x86_64.stp' has errors, and will be skipped.
Pass 1: parse failed.  Try again with another '--vp 1' option.
[root@localhost tracing-script]# cat qemu_vmalloc.stp 
probe qemu.kvm.qemu_vmalloc
{
 printf("size is %zu \n",size); 
}


Expected results:


Additional info:

Comment 3 Hai Huang 2013-01-15 19:22:40 UTC
The problem is with the printf format specifier %zu.
Change "%zu" to "%lu", then the stap probe operation will work as expected:

# cat  qemu_vmalloc.stp
probe qemu.kvm.qemu_vmalloc { printf("size is %lu \n",size) }


# stap qemu_vmalloc.stp
size is 1073741824 
size is 131072 
size is 131072 
size is 67108864 
size is 8192 
size is 67108864 
size is 65536 
size is 65536


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