Bug 1391497

Summary: qemu-kvm -net socket,listen -net socket,connect does not work anymore
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-2.7.0-8.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-16 20:59:21 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:

Description Harald Hoyer 2016-11-03 12:41:11 UTC
Connecting two qemu-kvm virtual machines with "-net socket,listen" and "-net socket,connect" does not work anymore.

Untar the attached testcase.tgz.

$ rpm -q qemu-kvm
qemu-kvm-2.6.2-4.fc24.x86_64

$ sudo ./test.sh run
[…]
TEST OK

update qemu-kvm

$ sudo dnf --disablerepo '*' --enablerepo fedora --enablerepo updates --releasever 25 update qemu-kvm

$ rpm -q qemu-kvm
qemu-kvm-2.7.0-7.fc25.x86_64

$ sudo ./test.sh run
[…]
TEST FAILED

Comment 1 Harald Hoyer 2016-11-03 12:43:04 UTC
The tarball is too big for a bugzilla attachment. Download from here:
http://people.redhat.com/harald/downloads/qemu-kvm-2.7.0-testcase.tgz

Comment 2 Harald Hoyer 2016-11-03 12:43:40 UTC
Would be nice, if such a test would be integrated in QA or a CI.

Comment 3 Daniel Berrangé 2016-11-04 15:47:22 UTC
git bisect shows it is a regression in 2.7.0 caused by:

commit 16a3df403b10c4ac347159e39005fd520b2648bb
Author: Zhang Chen <zhangchen.fnst.com>
Date:   Fri May 13 15:35:19 2016 +0800

    net/net: Add SocketReadState for reuse codes
    
    This function is from net/socket.c, move it to net.c and net.h.
    Add SocketReadState to make others reuse net_fill_rstate().
    suggestion from jason.
    
    v4:
     - move 'rs->finalize = finalize' to rs_init()
    
    v3:
     - remove SocketReadState init callback
     - put finalize callback to net_fill_rstate()
    
    v2:
     - rename ReadState to SocketReadState
     - add SocketReadState init and finalize callback
    
    v1:
     - init patch
    
    Signed-off-by: Zhang Chen <zhangchen.fnst.com>
    Signed-off-by: Li Zhijian <lizhijian.com>
    Signed-off-by: Wen Congyang <wency.com>
    Signed-off-by: Jason Wang <jasowang>

Comment 4 Daniel Berrangé 2016-11-04 16:44:08 UTC
Upstream fix: https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg00811.html

Comment 5 Fedora Update System 2016-12-13 14:43:44 UTC
qemu-2.7.0-8.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8d4209b9c2

Comment 6 Fedora Update System 2016-12-14 02:24:42 UTC
qemu-2.7.0-8.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8d4209b9c2

Comment 7 Fedora Update System 2016-12-16 20:59:21 UTC
qemu-2.7.0-8.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.