Bug 831763

Summary: Included systemtap tapsets fail to compile
Product: [Fedora] Fedora Reporter: Tim Taylor <ttaylor>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17CC: amit.shah, berrange, cfergeau, dcleal, dwmw2, itamar, knoel, mjw, nmiell, pbonzini, rjones, scottt.tw, virt-maint, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 18:59:10 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Tim Taylor 2012-06-13 13:49:15 EDT
Description of problem:
The qemu-user and qemu-system-* subpackage includes a number of systemtap tapset definitions that get installed into /usr/share/systemtap/tapset.

Every one of these tapset definitions fails to compile because they use systemtap language reserved words as variables (specifically: in, next).

This lots of error messages whenever a systemtap script is compiled.

Version-Release number of selected component (if applicable):
rpm -qa qemu-user qemu-system\*

How reproducible:

Steps to Reproduce:
1. Write the simplest systemtap script possible:
$ cat hello-world.stp 
probe begin
  print ("hello world\n")
  exit ()

2. Try to compile the systemtap script:
$ stap hello-world.stp
Actual results:
$  stap hello-world.stp 
parse error: expected statement
	saw: keyword at /usr/share/systemtap/tapset/qemu-alpha.stp:1139:3
     source:   in = $arg3;
parse error: expected literal string or number
	saw: operator '=' at /usr/share/systemtap/tapset/qemu-alpha.stp:2078:8
     source:   next = $arg1;
2 parse errors.
WARNING: tapset '/usr/share/systemtap/tapset/qemu-alpha.stp' has errors, and will be skipped.

[... Same set of parse errors at the same line numbers for each tapset file that is packaged ...]

Expected results:
$ stap hello-world.stp
hello world

Additional info:
Comment 1 Daniel Berrange 2012-06-15 10:10:43 EDT
Fixed in upstream QEMU, but hasn't made it into Fedora's QEMU yet

commit 256a721d46a112d8807a488ec0176985c09bbbf1
Author: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Date:   Mon Apr 16 12:47:58 2012 +0100

    tracetool: handle DTrace keywords 'in', 'next', 'self'
    Language keywords cannot be used as argument names.  The DTrace backend
    appends an underscore to the argument name in order to make the argument
    name legal.
    This patch adds 'in', 'next', and 'self' keywords to dtrace.py.
    Also drop the unnecessary argument name lstrip() call.  The
    Arguments.build() method already ensures there is no space around
    argument names.  Furthermore it is misleading to do the lstrip() *after*
    checking against keywords because the keyword check would not match if
    spaces were in the name.
    Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Reviewed-by: Alon Levy <alevy@redhat.com>
    Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
Comment 2 Cole Robinson 2012-07-10 07:23:27 EDT
*** Bug 811749 has been marked as a duplicate of this bug. ***
Comment 3 Cole Robinson 2012-07-10 07:23:33 EDT
*** Bug 821186 has been marked as a duplicate of this bug. ***
Comment 4 Cole Robinson 2012-07-10 07:23:40 EDT
*** Bug 829102 has been marked as a duplicate of this bug. ***
Comment 5 Fedora Update System 2012-07-30 07:23:36 EDT
qemu-0.15.1-7.fc16 has been submitted as an update for Fedora 16.
Comment 6 Fedora Update System 2012-07-30 07:24:24 EDT
qemu-1.0.1-1.fc17 has been submitted as an update for Fedora 17.
Comment 7 Fedora Update System 2012-07-30 18:28:04 EDT
Package qemu-1.0.1-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-1.0.1-1.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-08-09 18:59:10 EDT
qemu-0.15.1-7.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2012-08-09 19:01:03 EDT
qemu-1.0.1-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.