Bug 1126291

Summary: re-capture data using "staprun -A qemu_kvm " encounter error if systemtap not restarted
Product: Red Hat Enterprise Linux 6 Reporter: Xiaoqing Wei <xwei>
Component: qemu-kvmAssignee: Stefan Hajnoczi <stefanha>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.6CC: acathrow, bsarathy, juzhang, mkenneth, qzhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 13:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiaoqing Wei 2014-08-04 05:56:55 UTC
Description of problem:
re-capture data using "staprun -A qemu_kvm " encounter error if systemtap not restarted

Version-Release number of selected component (if applicable):
kernel-2.6.32-493.el6.x86_64
kernel-2.6.32-431.1.2.el6.x86_64
systemtap-initscript-2.3-3.el6.x86_64
systemtap-2.3-3.el6.x86_64

How reproducible:
100% on my box

Steps to Reproduce:
1)
# cp /usr/share/qemu-kvm/systemtap/script.d/qemu_kvm.stp /etc/systemtap/script.d/
# cp /usr/share/qemu-kvm/systemtap/conf.d/qemu_kvm.conf /etc/systemtap/conf.d/
# service systemtap start qemu_kvm

2) boot a vm

3) staprun -A qemu_kvm >/tmp/trace.log

4) /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log

5) goto 2)

Actual results:
error happen when running 3) the 2nd time
[root@dhcp-9-101 staf-kvm-devel]# staprun -A qemu_kvm >/tmp/trace.log
ERROR: Cannot attach to module qemu_kvm control channel; not running?

Expected results:
not error happen

Additional info:
if restart the systemtap service using cmd as below, then error avoided.

[root@dhcp-9-101 staf-kvm-devel]# service systemtap restart qemu_kvm
Stopping systemtap:                                        [  OK  ]
Starting systemtap:  Starting qemu_kvm ... done
                                                           [  OK  ]
[root@dhcp-9-101 staf-kvm-devel]# staprun -A qemu_kvm >/tmp/trace.log

Comment 2 Stefan Hajnoczi 2014-08-06 13:28:26 UTC
(In reply to Xiaoqing Wei from comment #0)
> Description of problem:
> re-capture data using "staprun -A qemu_kvm " encounter error if systemtap
> not restarted

This behavior is expected behavior for systemtap-initscript.

Killing staprun -A qemu_kvm stops tracing so you need to either leave staprun running or use service systemtap start qemu_kvm to restart it afterwards.

Stefan