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 714773 - qemu missing marker for qemu.kvm.qemu_vmalloc
Summary: qemu missing marker for qemu.kvm.qemu_vmalloc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jes Sorensen
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-20 16:47 UTC by William Cohen
Modified: 2013-01-09 23:59 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.182.el6
Doc Type: Bug Fix
Doc Text:
Cause: missing probe marker for qemu.kvm.qemu_vmalloc Consequence: not possible to use "probe qemu.kvm.qemu_vmalloc" on a SystemTap script. Change: added marker to the qemu_vmalloc() function Result: now it's possible to use "probe qemu.kvm.qemu_vmalloc" on a SystemTap script
Clone Of:
Environment:
Last Closed: 2011-12-06 15:52:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 0 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description William Cohen 2011-06-20 16:47:13 UTC
Description of problem: qemu-kvm for rhel-6.1 has support for systemtap probes. There is a marker missing for qemu.kvm.qemu_vmalloc.


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.160.el6.x86_64
systemtap-1.4-6.el6_1.1.x86_64
systemtap-server-1.4-6.el6_1.1.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Install the needed rpms:
   qemu-kvm
   systemtaptap
2. Get the uprobe module built as root:
   /usr/libexec/systemtap/stap-gen-cert
   make -C /usr/share/systemtap/runtime/uprobes

3. try to probe the problem place:
   stap -e  'probe qemu.kvm.qemu_vmalloc {printf("%s\n", pn())}'

  
Actual results:

Obtain the following error message:

semantic error: no match while resolving probe point process("/usr/libexec/qemu-kvm").mark("qemu_vmalloc")
semantic error: no match while resolving probe point qemu.kvm.qemu_vmalloc
Pass 2: analysis failed.  Try again with another '--vp 01' option.



Expected results:
Should probe the probe point without error.


Additional info:

There appears to be missing trace_qemu_vmalloc in the qemu-kvm/osdep.c file. Looking through the osdep.c file there is a trace_qemu_vmalloc() call in qemu_vmalloc() for the _WIN32 version, but the non-_WIN32 version doesn't have a trace call in it:

/* alloc shared memory pages */
void *qemu_vmalloc(size_t size)
{
#ifndef __ia64__
    return qemu_memalign(getpagesize(), size);
#else
    return qemu_memalign(65536, size);
#endif
}

There be a trace_qemu_vmalloc() in there.

Comment 2 Chao Yang 2011-06-22 06:44:07 UTC
I have reproduced this issue with steps in Comment #0.
After step 3, got following error:
# stap -e 'probe qemu.kvm.qemu_vmalloc {printf("%s\n", pn())}' 
semantic error: no match while resolving probe point process("/usr/libexec/qemu-kvm").mark("qemu_vmalloc")
semantic error: no match while resolving probe point qemu.kvm.qemu_vmalloc
Pass 2: analysis failed.  Try again with another '--vp 01' option.

Host info:
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.165.el6.x86_64
# rpm -qa|grep systemtap
systemtap-runtime-1.4-6.el6.x86_64
systemtap-1.4-6.el6.x86_64
systemtap-server-1.4-6.el6.x86_64

Comment 3 Jes Sorensen 2011-07-21 08:36:38 UTC
Fix posted upstream, will backport as soon as it is accepted there.

Comment 4 Jes Sorensen 2011-08-12 07:43:12 UTC
It looks like the marker that was missing in upstream had already gone
into our RHEL 6 tree, so the problem is different from what I had thought.

Need to consult the author of the trace code to find out what could be
going wrong. It looks like the marker for vmalloc is marked, but it doesn't
show up in the symbol table for some reason.

Back to the drawing board.

Jes

Comment 5 Jes Sorensen 2011-08-12 10:32:22 UTC
Ok I was confused, the marker was indeed missing for non win32 - patch
posted for rhel6.

Comment 10 Chao Yang 2011-08-31 10:04:50 UTC
Verified this issue with steps mentioned in Comment #0, after step 3, no error pop up. 
Additional test:
Launched a guest, executed following script:
# cat systemtap-vmalloc.stp 
probe qemu.kvm.qemu_vmalloc
{
  printf("size is %d \n",size);
}
# stap systemtap-vmalloc.stp 
...
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 16384
size is 131072
size is 131072
size is 16384
size is 8192
size is 65536
size is 65536
size is 16384
size is 16384
size is 16384



-----Conclusion:
Based on Comment #2 and this comment, this issue has been fixed.

Comment 11 Chao Yang 2011-08-31 10:06:10 UTC
above testing based on following environment:
# rpm -qa | grep systemtap
systemtap-1.6-2.el6.x86_64
systemtap-sdt-devel-1.6-2.el6.x86_64
systemtap-runtime-1.6-2.el6.x86_64
systemtap-server-1.6-2.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.184.el6.x86_64

Comment 13 Eduardo Habkost 2011-11-18 16:08:27 UTC
    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:
Cause: missing probe marker for qemu.kvm.qemu_vmalloc
Consequence: not possible to use "probe qemu.kvm.qemu_vmalloc" on a SystemTap script.
Change: added marker to the qemu_vmalloc() function
Result: now it's possible to use "probe qemu.kvm.qemu_vmalloc" on a SystemTap script

Comment 14 errata-xmlrpc 2011-12-06 15:52:29 UTC
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.