Bug 1220252

Summary: qemu-kvm aborts with -chardev udp,...
Product: Red Hat Enterprise Linux 7 Reporter: zhenfeng wang <zhwang>
Component: qemu-kvm-rhevAssignee: Amit Shah <amit.shah>
Status: CLOSED ERRATA QA Contact: Min Deng <mdeng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: chayang, dyuan, fjin, gsun, harald, hhuang, huding, juzhang, mrezanin, mzhan, pkrempa, qzhang, rbalakri, tzheng, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 20:23:46 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:
Attachments:
Description Flags
The guest's xml
none
qemu log about guest
none
libvirtd's log none

Description zhenfeng wang 2015-05-11 05:46:19 UTC
Description of problem:
Fail to start guest with rng which with edg model and udp type

Version-Release number:
kernel-3.10.0-246.el7.x86_64
libvirt-1.2.14-1.el7.x86_64
qemu-kvm-rhev-2.3.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest with rng configured
#virsh dumpxml rhel7
--
    <rng model='virtio'>
      <backend model='egd' type='udp'>
        <source mode='bind' service='1234'/>
        <source mode='connect' host='1.2.3.4' service='1234'/>
      </backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </rng>
  </devices>

2.Start the guest
# virsh start rhel7
error: Failed to start domain rhel7
error: internal error: early end of file from monitor: possible problem:
2015-05-04T03:07:12.659611Z qemu-kvm: -chardev udp,id=charrng0,host=1.2.3.4,port=1234,localaddr=,localport=1234: Invalid parameter 'localaddr'

3.The guest could start successfully with qemu-kvm-rhev-2.2.0-9.el7.x86_64

4.It works well in rhel6.7, so another issue is coming, while we configure the rng in rhel6.7, then do cross-migration from rhel6.7 to rhel7.2, the testing will be blocked

Actual results:
Fail to start guest with rng which with edg model and udp type

Expected results:
should start it successfully or give a clear error, also shouldn't block cross migration from rhel6.7 to rhel7.2

Comment 2 Peter Krempa 2015-05-12 12:34:47 UTC
Could you please attach the full domain XML and the contents of '/var/log/libvirt/qemu/rhel7.log'

The reported error message is only a warning from qemu and it's usually ignored so there must be a different error that hinders qemu from starting.

Comment 3 zhenfeng wang 2015-05-13 01:26:41 UTC
Created attachment 1024837 [details]
The guest's xml

Comment 4 zhenfeng wang 2015-05-13 01:27:36 UTC
Created attachment 1024838 [details]
qemu log about guest

Comment 5 zhenfeng wang 2015-05-13 01:28:02 UTC
Created attachment 1024839 [details]
libvirtd's log

Comment 6 Peter Krempa 2015-05-13 14:45:05 UTC
I traced the problem to few recent changes in qemu-kvm. The minimal reproducer case for qemu is:

$ qemu-system-x86_64 -chardev udp,id=charrng0,host=127.0.0.1,port=1234,localaddr=,localport=1234
qemu-system-x86_64: - ,id=charrng0,host=127.0.0.1,port=1234,localaddr=,localport=1234: Invalid parameter 'localaddr'
Aborted (core dumped)

Since qemu commit f43e47dbf6de24db20ec9b588bb6cc762093dd69 the error is treated as fatal. Previously the warning was printed but the error was ignored. The main problem is that the QemuOptsList socket_optslist structure does not contain the localaddr and localport fields and thus the parsing of the commandline fails.

Since this is an internal programming mistake in qemu I'm reassigning the bug.

Comment 7 Peter Krempa 2015-05-13 15:03:26 UTC
I've posted a patch to qemu-devel that fixes the issue:

http://lists.gnu.org/archive/html/qemu-devel/2015-05/msg02604.html

Comment 8 fwu 2015-07-16 07:25:31 UTC
Additionally, I also encounter the same problem on the following packages:
qemu-kvm-1.5.3-95.el7.x86_64
libvirt-1.2.17-2.el7.x86_64
virt-manager-1.2.1-2.el7.noarch

Comment 11 Amit Shah 2015-09-18 11:05:38 UTC
(In reply to Harald Hoyer from comment #10)
> (In reply to Amit Shah from comment #9)
> > Fix was included upstream:
> > 
> > b8981dc9aae25fa79e5f35609e63f50f078a572d
>
> Can we have this fix in Fedora rawhide, please?

This is in qemu-2.4 and both fc23 and fc24 builds of qemu will have this commit already in:

http://koji.fedoraproject.org/koji/packageinfo?packageID=3685

Comment 12 poma 2015-10-05 00:31:30 UTC
Bugus fratris on the hat shades of blue
https://bugzilla.redhat.com/show_bug.cgi?id=1268708

Comment 13 Mike McCune 2016-03-28 22:14:36 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 16 Min Deng 2016-09-06 02:48:35 UTC
QE reproduced the bug on build qemu-kvm-rhev-2.3.0-6.el7.x86_64
How to reproduce the issue on QEMU and test steps was following as below,

   1./usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=1.2.3.4,port=1234,localaddr=,localport=1234
   
   Actual results was same to Descriptions
   qemu-kvm: -chardev udp,id=charrng0,host=1.2.3.4,port=1234,localaddr=,localport=1234: Invalid parameter 'localaddr'...

QE verified the bug on build qemu-kvm-rhev-2.6.0-22.el7.x86_64
1.steps
  boot up guest with the following cli
 /usr/libexec/qemu-kvm -chardev udp,id=charrng0,host=1.2.3.4,port=1234,localaddr=,localport=1234

Actual results,
VNC server running on '::1;5900'


Draw a conclusion,the original issue has been fixed on build qemu-kvm-rhev-2.6.0-22.el7.x86_64.Thanks !

Comment 19 errata-xmlrpc 2016-11-07 20:23:46 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.

https://rhn.redhat.com/errata/RHBA-2016-2673.html