Bug 1435778
| Summary: | virtio-serial breaks when CPU hot added to Windows Server 2008R2 Datacenter | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Nat Meo <nat> | ||||
| Component: | virtio-win | Assignee: | Ladi Prosek <lprosek> | ||||
| virtio-win sub component: | virtio-win-prewhql | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Status: | CLOSED ERRATA | Docs Contact: | |||||
| Severity: | high | ||||||
| Priority: | unspecified | CC: | ailan, lijin, lmiksik, michen, nat, phou, wyu, xiagao | ||||
| Version: | 7.3 | ||||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Windows | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-01 12:58:08 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: |
|
||||||
Can you please try updating WDF on the guest to version 1.11 and see if it fixes the problem? You should be able to download the update using this link: https://support.microsoft.com/en-us/help/2685811 Thanks! Ladi I updated WDF to 1.11 and that appears to have fixed the problem. Thanks. Thank you! I believe that we started exercising the broken WDF 1.9 code only recently and this qualifies as a regression. I'll see if I can find an easy to work around it. The problem is in https://github.com/Microsoft/Windows-Driver-Frameworks/blob/master/src/framework/shared/irphandlers/pnp/interruptobject.cpp#L1071 (FxInterrupt::RevokeResources) which doesn't preserve m_InterruptInfo.MessageNumber in WDF 1.9. I am perfectly fine with requiring WDF 1.11 for this to work, but it would be good if at least WriteFile would return an error instead of blocking so that there is at a way to give feedback to the user that there is a problem. Hi
QE can reproduce this bug (win2008R2, build 132)
steps:
1 boot win2008r2 guest with virtio-serial-pci (-smp 2,maxcpus=6)
cml: -device virtio-serial-pci,id=virtio-serial0,max_ports=511 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port1,nr=1
2 run "socat - /tmp/helloworld1" in host
3 run "vmc-cat.exe w com.redhat.rhevm.vdsm1" in guest
4 Type "test1" and press ENTER inside the guest.
5 Observe "test1" is displayed on the host and the messages "Executing WriteFile" and "Finished WriteFile" are displayed in the guest
6 Type "test2" and press ENTER inside the guest.
7 Observe "test1" is displayed on the host and the messages "Executing WriteFile" and "Finished WriteFile" are displayed in the guest
8 hotadd cpu for guest in qmp
{ "execute": "device_add","arguments":{"driver":"qemu64-x86_64-cpu","core-id": "0", "thread-id": "0", "socket-id": "2","id":"core1" }}
{ "execute": "device_add","arguments":{"driver":"qemu64-x86_64-cpu","core-id": "0", "thread-id": "0", "socket-id": "3","id":"core2" }}
9 Type "test1" and press ENTER inside the guest.
Actual result:
after step 9 , "test1" can be transferred to the host, but there is no "Finished WriteFile" in the guest,just "vmc-cat.exe" hang at "Executing Writefile", cannot enter any data in this vmc-cat.exe processing.
Thanks
Yu Wang
Fixed committed as https://github.com/virtio-win/kvm-guest-drivers-windows/commit/3628672ef8beee9aa22529f2dc149609bfab810f Reproduce this issue on build 135 Verify this issue on build 136 steps as comment#7 with build 136 on win2008R2, it could transferred to the host successfully after hotplug cpu. Above all, this issue has been fixed. Change status to verified. Thanks Yu Wang 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://access.redhat.com/errata/RHBA-2017:2341 |
Created attachment 1266225 [details] vmc-cat tool to reproduce problem Description of problem: When a CPU is added to a live Windows 2008R2 guest, it will break communication over virtio-serial due to the fact that calls to WriteFile will become blocked. Version-Release number of selected component (if applicable): virtio-win 0.1.132 QEMU 2.3.1 How reproducible: 100% Steps to Reproduce: 1. Create a Windows 2008R2 guest containing the following elements: <vcpu placement='static' current='2'>8</vcpu> <channel type='unix'> <target type='virtio' name='test'/> <address type='virtio-serial' controller='0' bus='0' port='2'/> </channel> 2. Start the guest and copy over the attached vmc-cat.exe tool. Source code is included for reference. 3. Run "socat - /var/lib/libvirt/qemu/channel/target/domain-56-win2k8r2/test" on the host. 4. Run "vmc-cat.exe w test" in a command prompt inside the guest. 5. Type "test1" and press ENTER inside the guest. 6. Observe "test1" is displayed on the host and the messages "Executing WriteFile" and "Finished WriteFile" are displayed in the guest. 7. Type "test2" and press ENTER inside the guest. 8. Observe "test2" is displayed on the host and the messages "Executing WriteFile" and "Finished WriteFile" are displayed in the guest. 9. Inside the guest, run task manager and observe there are 2 CPUs. Using virt-manager or virsh, add a CPU to the guest and confirm that task manager prompts to restart and now 3 CPUs are displayed. 10. Type "test3" and press ENTER inside the guest. 11. Observe that inside the guest that the debug message "Executing WriteFile" is displayed but not "Finished WriteFile". If you look at the attached vmc-cat.cpp you will see that this is because the call to WriteFile is blocked. The "test3" does get displayed by socat on the host, but no further messages can be sent due to WriteFile being blocked. Actual results: WriteFile is blocked for any write after a CPU is added to a Windows 2008R2 guest. Expected results: WriteFile is not blocked after a CPU is added to the guest. Additional info: See attached vmc-cat.zip for source code and precompiled executable sued to reproduce the problem.