Bug 1027667

Summary: Qemu guest agent does not work after "guest-get-vcpus" command (qemu-ga service need to be restarted)
Product: Red Hat Enterprise Linux 6 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Laszlo Ersek <lersek>
Status: CLOSED WORKSFORME QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, chayang, juli, juzhang, michen, mkenneth, qzhang, sluo, 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-04-29 21:56:53 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 Qunfang Zhang 2013-11-07 09:18:58 UTC
Description of problem:
Each time after implement the "guest-get-vcpus" command, the guest agent is not available any more. The commands could not be executed successfully unless restart the qemu-ga service inside guest (or kill "qemu-ga" daemon and re-do "qemu-ga -d").

Version-Release number of selected component (if applicable):
Host:
kernel-2.6.32-429.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64

Guest:
qemu-guest-agent-0.12.1.2-2.415.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot a guest with virtio-serial:

# /usr/libexec/qemu-kvm -M rhel6.5.0 -cpu SandyBridge -m 2G -smp 2,sockets=1,cores=2,threads=1,maxcpus=16 -enable-kvm -name win7-32 -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -k en-us -rtc base=localtime,clock=host,driftfix=slew -nodefaults -monitor stdio -qmp tcp:0:6666,server,nowait -boot menu=on  -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -monitor unix:/tmp/monitor-unix,nowait,server -drive file=/home/RHEL6.5-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,addr=0x4 -vga std -vnc :10 -usb -device usb-tablet -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

2. Install qemu-guest-agent package inside guest and start qemu-ga service.

3. Execute some qemu-ga commands:
{"execute":"guest-ping"}
{"return": {}}  ===> Succeed

3.
{"execute":"guest-get-vcpus"}
{"return": [{"online": true, "can-offline": false, "logical-id": 0}, {"online": true, "can-offline": true, "logical-id": 1}]}

======> Succeed here.

4. Repeat step 3 again:

{"execute":"guest-get-vcpus"}

======> No response.

5. {"execute":"guest-ping"} ===> No response

6. Restart qemu-ga service inside guest
{"execute":"guest-ping"}
{"return": {}}

======> Work again.


Actual results:
Each time after implement "guest-get-vcpus" guest agent command, the guest agent will not work any more unless restart the qemu-ga inside guest. 

Expected results:
Guest agent should always work. 

Additional info:

Comment 2 RHEL Program Management 2013-11-11 00:45:18 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Laszlo Ersek 2014-04-16 15:06:26 UTC
Component     reported version           version used for reproducing
------------  -------------------------  ----------------------------
host kernel   2.6.32-429.el6.x86_64      2.6.32-431.11.2.el6.x86_64
qemu-kvm      0.12.1.2-2.415.el6.x86_64  0.12.1.2-2.424.el6.x86_64
guest kernel  ?                          2.6.32-431.el6.x86_64
guest agent   0.12.1.2-2.415.el6.x86_64  0.12.1.2-2.423.el6.x86_64

I used a 2VCPU guest, and I passed the commands to qga with the

  virsh qemu-agent-command --block DOMAIN QMP_COMMAND

virsh command.

If you can still reproduce the bug, please
- provide your guest kernel version
- provide your qga config from the guest (/etc/sysconfig/qemu-ga)
- before starting the guest agent, configure abrt (or normal coredumps),
  and please capture a qemu-ga process coredump in the guest, while it is
  apparently hung.

Thanks.

Comment 5 Laszlo Ersek 2014-04-16 15:07:01 UTC
Oh, sorry, I lost the beginning of comment 4. I meant to say that I could not reproduce the issue, in the environment listed there.

Comment 6 Laszlo Ersek 2014-04-21 09:38:25 UTC
setting needinfo for comment 4 and comment 5

Comment 7 Qunfang Zhang 2014-04-21 11:27:10 UTC
Hi, Laszlo

Unfortunately I could not reproduce the issue with exactly the same host and guest version with comment 0.  I will update info here once I have a chance to reproduce it. 


Thanks,
Qunfang

Comment 8 Ademar Reis 2014-04-29 21:56:53 UTC
Closing as nobody can reproduce it by now. Qunfang, if you manage to reproduce it, please reopen. Thanks.