Bug 956702

Summary: when using e1000 , modify the guest nic mtu then disable/enable guest network , guest hange
Product: Red Hat Enterprise Linux 6 Reporter: yunpingzheng <yunzheng>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, dyasny, flang, jasowang, juzhang, michen, 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: 2013-04-26 08:29:47 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 yunpingzheng 2013-04-25 13:06:33 UTC
Description of problem:
boot windows guest(win 8, win2008r2) with e1000 nic, after guest boot modify the guest nic mtu, then disable /enable the the guest nic. the guest hang.

like:
>  reg add HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0012 /v *jumbopacket /d 16128 /f && netsh interface ipv4 set subinterface interface="Local Area Connection 2" mtu=16128 store=persistent

> netsh interface set interface name="Local Area Connection 2" admin=DISABLED


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

How reproducible:
100%

Steps to Reproduce:
1. boot guest with e1000 nic
2. modify the guest mtu
 > reg add HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0012 /v *jumbopacket /d 16128 /f && netsh interface ipv4 set subinterface interface="Local Area Connection 2" mtu=16128 store=persistent

3. disable /enable the guest network:
  netsh interface set interface name="Local Area Connection 2" admin=DISABLED

4. repeat step 2 and 3 
Actual results:
guest hang

Expected results:
guest nic can disable/enable successfully

Additional info:

qemu-cmd:
/root/autotest/client/tests/virt/qemu/qemu \
    -name 'vm1' \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20130425-202813-JHeQVs9a,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130425-202813-JHeQVs9a,server,nowait \
    -device isa-serial,chardev=serial_id_serial1 \
    -chardev socket,id=seabioslog_id_20130425-202813-JHeQVs9a,path=/tmp/seabios-20130425-202813-JHeQVs9a,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20130425-202813-JHeQVs9a,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -drive file='/root/autotest/client/tests/virt/shared/data/images/win2008r2-64-virtio.qcow2',if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=on,id=virtio-disk1,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1 \
    -device e1000,netdev=idCt2vtb,mac=9a:c2:c3:c4:c5:c6,bus=pci.0,addr=0x3,id='idFOxubc' \
    -netdev tap,id=idCt2vtb,fd=22 \
    -m 1024 \
    -smp 1,maxcpus=1,cores=1,threads=1,sockets=2 \
    -cpu 'SandyBridge',hv_relaxed \
    -M pc \
    -drive file='/root/autotest/client/tests/virt/shared/data/isos/windows/winutils.iso',if=none,id=drive-ide0-0-0,media=cdrom,snapshot=off,id=ide0-0-0,format=raw \
    -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0 \
    -device AC97 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga std \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off  \
    -enable-kvm


cpuinfo:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 6784.35
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual

Comment 2 jason wang 2013-04-26 04:58:19 UTC
Is it really related to MTU, how about just enable/disable?

Comment 3 langfang 2013-04-26 08:22:41 UTC
(In reply to comment #2)
> Is it really related to MTU, how about just enable/disable?

hi,jason
   Test as your method ,hit same problem.

Tried this bug as following version:
Host 
# uname -r
2.6.32-371.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.361.el6.x86_64

Guest:win8/64

How reproducible:40%

Steps to reproduce

1).Boot guest with 
/usr/libexec/qemu-kvm -name vm1 -monitor stdio -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130425-202813-JHeQVs9a,server,nowait -device isa-serial,chardev=serial_id_serial1 -chardev socket,id=seabioslog_id_20130425-202813-JHeQVs9a,path=/tmp/seabios-20130425-202813-JHeQVs9a,server,nowait -device isa-debugcon,chardev=seabioslog_id_20130425-202813-JHeQVs9a,iobase=0x402 -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 -drive file=/home/win8-64.qcow2,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=on,id=virtio-disk1,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1 -device e1000,netdev=idCt2vtb,mac=9a:23:24:25:26:27,bus=pci.0,addr=0x3,id=idFOxubc -netdev tap,id=idCt2vtb,script=/etc/qemu-ifup -m 1024 -smp 1,maxcpus=1,cores=1,threads=1,sockets=2 -cpu SandyBridge -M pc -drive if=none,id=drive-ide0-0-0,media=cdrom,snapshot=off,id=ide0-0-0,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0 -device AC97 -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :0 -vga std -rtc base=localtime,clock=host,driftfix=slew -boot order=cdn,once=c,menu=off -enable-kvm

2.In guest check NIC index,macdress,netconnectionid

#wmic nic get index,macaddress,netconnectionid
1
2 
..
13 9A:23:24:25:26:27 Ethernet 2

3.Open serial server
#cd c:\
press serialport

4. In host 
[root@localhost ~]# nc -U /tmp/serial-serial1-20130425-202813-JHeQVs9a 

Please wait...
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\>
netsh interface set interface name="Ethernet 2" admin=DISABLED && netsh interface set interface name="Ethernet 2" admin=ENABLED

Results:
Guest hang

1)Commend0 can be reproduce

2)Win2012/64 can be hit

3)If execute "netsh interface set interface name="Ethernet 2" admin=DISABLED"--> then "manual enable the Nic" -->also can be hit 

4)If you can not reporduce,please try more times

5)Seem this bug happen on the intervasl between disabled/enable Nic very small.(eg 1s~2s).But not sure.

Comment 4 jason wang 2013-04-26 08:29:47 UTC
Known issue:

See https://bugzilla.redhat.com/show_bug.cgi?id=874406

Close this as DUPLICATED.

*** This bug has been marked as a duplicate of bug 874406 ***