RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1435778 - virtio-serial breaks when CPU hot added to Windows Server 2008R2 Datacenter
Summary: virtio-serial breaks when CPU hot added to Windows Server 2008R2 Datacenter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win
Version: 7.3
Hardware: x86_64
OS: Windows
unspecified
high
Target Milestone: rc
: ---
Assignee: Ladi Prosek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-24 18:02 UTC by Nat Meo
Modified: 2017-08-01 12:58 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 12:58:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmc-cat tool to reproduce problem (30.90 KB, application/zip)
2017-03-24 18:02 UTC, Nat Meo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2341 0 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2017-08-01 16:52:38 UTC

Description Nat Meo 2017-03-24 18:02:09 UTC
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.

Comment 2 Ladi Prosek 2017-03-27 14:49:25 UTC
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

Comment 3 Nat Meo 2017-03-27 15:02:34 UTC
I updated WDF to 1.11 and that appears to have fixed the problem. Thanks.

Comment 4 Ladi Prosek 2017-03-27 15:51:54 UTC
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.

Comment 5 Ladi Prosek 2017-03-27 15:55:51 UTC
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.

Comment 6 Nat Meo 2017-03-27 16:08:59 UTC
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.

Comment 7 Yu Wang 2017-03-29 07:55:31 UTC
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

Comment 9 Yu Wang 2017-05-02 06:52:03 UTC
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

Comment 12 errata-xmlrpc 2017-08-01 12:58:08 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://access.redhat.com/errata/RHBA-2017:2341


Note You need to log in before you can comment on or make changes to this bug.