Bug 1802466

Summary: [virtio-win][vioser]Data transfer failed between host and guest via serial port after install vioser driver on Win2012 guest
Product: Red Hat Enterprise Linux 8 Reporter: xiagao
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: dehanmeng <demeng>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: ailan, demeng, kanderso, lijin, mdean, menli, phou
Version: 8.2Keywords: Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 18:52:45 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:
Bug Depends On:    
Bug Blocks: 1897024, 1948357    
Attachments:
Description Flags
data transfer failed picture of guest
none
setupapi log none

Description xiagao 2020-02-13 08:38:08 UTC
Description of problem:
Install vioser driver in a new win2012-64 guest, try to transfer data between host and guest, it failed. After disable/enable vioser driver in device manager, data transfer works.

only Win2012-64 hit this issue.

Version-Release number of selected component (if applicable):
kernel-4.18.0-176.el8.x86_64
qemu-kvm-4.2.0-9.module+el8.2.0+5699+b5331ee5.x86_64
virtio-win-prewhql-179
seabios-1.13.0-1.module+el8.2.0+5520+4e5817f3.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Install a new win2012-64 guest and during os installation, install vioser driver.
-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.7 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1 \

2.transfer data from guest to host
(host)nc -U /tmp/helloworld2 
(guest)copy con \\.\vs1



Actual results:
host could not receive data.

Expected results:
data transfer works via serial port

Additional info:
1. only win2012-64 guest hist this issue.
2. tcp backend also hit this issue.
3. after disable/enable vioser driver, data transfer succeed.
4. after reinstall vioser driver, data transfer succeed.
5. after reboot guest, data transfer succeed.

Comment 1 xiagao 2020-02-13 08:41:28 UTC
full cmd line:
/usr/libexec/qemu-kvm -name vm1 -enable-kvm -m 8192 -smp 24,maxcpus=24,cores=12,threads=1,sockets=2 -nodefaults -cpu 'EPYC',hv_stimer,hv_synic,hv_vpindex,hv_reset,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv-tlbflush,+kvm_pv_unhalt -rtc base=localtime,driftfix=none -boot order=cd,menu=on -monitor stdio -M q35 -vga std -vnc :11 -qmp tcp:0:4444,server,nowait \
-device piix3-usb-uhci,id=usb -device usb-tablet,id=input0 \

-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x3 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x3.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x3.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x3.0x3 \
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x3.0x4 \
-device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x3.0x5 \
-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x3.0x6 \
-device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x3.0x7 \

-blockdev driver=file,cache.direct=off,cache.no-flush=on,filename=win2012-64.qcow2,node-name=system_file \
-blockdev driver=qcow2,node-name=drive_system_disk,file=system_file \
-device virtio-scsi-pci,id=scsi0,bus=pci.1 -device scsi-hd,drive=drive_system_disk,bus=scsi0.0,id=system_disk,bootindex=0 \

-netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on,queues=4 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:11:36:3f:0d,bus=pci.2,mq=on,vectors=10 \

-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.7 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel2,name=vs1 \

Comment 2 xiagao 2020-02-13 08:57:57 UTC
Created attachment 1662901 [details]
data transfer failed picture of guest

Comment 3 xiagao 2020-02-14 01:20:26 UTC
I do more tests, the following is the result.
1. The comment 0 issue is 100% reproduced by automation, but couldn't reproduce by manual as the same step with automation.
2. q35 and pc machine type all can reproduce this issue.
3. Can reproduce on 154 version, so it's not a regression

Comment 4 xiagao 2020-02-14 06:47:21 UTC
I have to correct something.
As this issue only happened in automation, so I checked the automation log carefully, the below is the detail steps.

1. install win2012 guest **without** virtio serial device.
2. during os installation, load drivers.
23:49:01 DEBUG| 			<DriverPaths>
23:49:01 DEBUG| 				<PathAndCredentials wcm:action="add" wcm:keyValue="1">
23:49:01 DEBUG| 					<Path>F:\vioscsi\2k12\amd64</Path>
23:49:01 DEBUG| 				</PathAndCredentials>
23:49:01 DEBUG| 				<PathAndCredentials wcm:action="add" wcm:keyValue="2">
23:49:01 DEBUG| 					<Path>F:\viostor\2k12\amd64</Path>
23:49:01 DEBUG| 				</PathAndCredentials>
23:49:01 DEBUG| 				<PathAndCredentials wcm:action="add" wcm:keyValue="3">
23:49:01 DEBUG| 					<Path>F:\NetKVM\2k12\amd64</Path>
23:49:01 DEBUG| 				</PathAndCredentials>
23:49:01 DEBUG|                                 <PathAndCredentials wcm:action="add" wcm:keyValue="4">
23:49:01 DEBUG|                                         <Path>F:\Balloon\2k12\amd64</Path>
23:49:01 DEBUG|                                 </PathAndCredentials>
23:49:01 DEBUG|                                 <PathAndCredentials wcm:action="add" wcm:keyValue="5">
23:49:01 DEBUG|                                         <Path>F:\viorng\2k12\amd64</Path>
23:49:01 DEBUG|                                 </PathAndCredentials>
23:49:01 DEBUG|                                 <PathAndCredentials wcm:action="add" wcm:keyValue="6">
23:49:01 DEBUG|                                         <Path>F:\vioserial\2k12\amd64</Path>
23:49:01 DEBUG|                                 </PathAndCredentials>
23:49:01 DEBUG|                                 <PathAndCredentials wcm:action="add" wcm:keyValue="7">
23:49:01 DEBUG|                                         <Path>F:\pvpanic\2k12\amd64</Path>
23:49:01 DEBUG|                                 </PathAndCredentials>
23:49:01 DEBUG|                                 <PathAndCredentials wcm:action="add" wcm:keyValue="8">
23:49:01 DEBUG|                                         <Path>F:\vioinput\2k12\amd64</Path>
23:49:01 DEBUG|                                 </PathAndCredentials>
23:49:01 DEBUG| 			</DriverPaths>

3. after os installation, boot up guest with vitio-serial device.
4. check vioser driver in device manager, it looks fine.
5. try to transfer data, but failed.
6. disable/enable driver.
7. try to transfer data again, it succeed.

post setupapi log file in attachment.

Comment 5 xiagao 2020-02-14 06:49:36 UTC
Created attachment 1663056 [details]
setupapi log

Comment 6 xiagao 2020-02-14 06:51:46 UTC
Here is the full auto log, unattended install contents is in debug.log.
http://fileshare.englab.nay.redhat.com/pub/section2/coredump/virtio-win/bz1802466/all_auto_log.tar.gz

Comment 9 xiagao 2020-05-26 02:18:28 UTC
This issue in Win2012-64 guest always failed in virtio-win-prewhql-acceptance test, so set this priority to high.

'133-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket.q35' Finshed 2020-05-25 06:55:49 2020-05-25 06:56:55 ERROR 65.594109
'157-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.q35' Finshed 2020-05-25 07:49:44 2020-05-25 07:52:16 ERROR 152.171514


And also can reproduce with the following steps.
1. boot up win2012-64 guest with one virtio serial device
-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \

2. install vioser driver in guest.

3. transfer data between host and guest with virtio serial device
guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
        1 file(s) copied.
host: # nc -U /tmp/helloworld1
testtest
=============> success

4. shutdown guest and boot up with two virtio serial devices
-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
-device virtio-serial-pci,id=virtio-serial2,max_ports=31,bus=pci.7 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device virtserialport,bus=virtio-serial2.0,chardev=channel2,name=vs2,id=por2 \

5. transfer data between  host and guest with the two virtio serial devices

After step 5,
Failed to transfer data via the second virtio serial device.
guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
        1 file(s) copied.
host: # nc -U /tmp/helloworld1
testtest
=============> success for vs1

guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs2
The I/O operation has been aborted because of either a thread exit or an applica
tion request.
        0 file(s) copied.
host: # nc -U /tmp/helloworld2
=============> fail for vs2


pkg:
kernel-4.18.0-193.el8.x86_64
qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950.x86_64
virtio-win-prewhql-185
seabios-1.13.0-1.module+el8.2.0+5520+4e5817f3.x86_64

Comment 10 xiagao 2020-05-26 02:29:59 UTC
(In reply to xiagao from comment #9)
> This issue in Win2012-64 guest always failed in
> virtio-win-prewhql-acceptance test, so set this priority to high.
> 
> '133-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.
> x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket.q35'
> Finshed 2020-05-25 06:55:49 2020-05-25 06:56:55 ERROR 65.594109
> '157-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.
> x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.
> q35' Finshed 2020-05-25 07:49:44 2020-05-25 07:52:16 ERROR 152.171514
> 
> 
> And also can reproduce with the following steps.
> 1. boot up win2012-64 guest with one virtio serial device
> -device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
> -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device
> virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
> 
> 2. install vioser driver in guest.
> 
> 3. transfer data between host and guest with virtio serial device
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
>         1 file(s) copied.
> host: # nc -U /tmp/helloworld1
> testtest
> =============> success
> 
> 4. shutdown guest and boot up with two virtio serial devices
> -device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
> -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device
> virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
> -device virtio-serial-pci,id=virtio-serial2,max_ports=31,bus=pci.7 \
> -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device
> virtserialport,bus=virtio-serial2.0,chardev=channel2,name=vs2,id=por2 \
> 
> 5. transfer data between  host and guest with the two virtio serial devices
> 
> After step 5,
> Failed to transfer data via the second virtio serial device.
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
>         1 file(s) copied.
> host: # nc -U /tmp/helloworld1
> testtest
> =============> success for vs1
> 
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs2
> The I/O operation has been aborted because of either a thread exit or an
> applica
> tion request.
>         0 file(s) copied.
> host: # nc -U /tmp/helloworld2
> =============> fail for vs2

Then disable/enable the second virtio-serial driver, can transfer data via vs2.

> 
> 
> pkg:
> kernel-4.18.0-193.el8.x86_64
> qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950.x86_64
> virtio-win-prewhql-185
> seabios-1.13.0-1.module+el8.2.0+5520+4e5817f3.x86_64

Comment 12 dehanmeng 2020-11-13 07:35:29 UTC
Hit this issue again on win2012-64 guest.:
137-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket.q35
161-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.q35

pkg:
kernel-4.18.0-193.el8.x86_64
qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950.x86_64
virtio-win-prewhql-190
seabios-1.13.0-1.module+el8.2.0+5520+4e5817f3.x86_64

Comment 13 dehanmeng 2020-11-24 09:18:15 UTC
Hit this issue again from virtio-win-1.9.14-1.el7 acceptance test:
221-Host_RHEL.m7.u9.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket/
245-Host_RHEL.m7.u9.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync

pkg:
virtio-win-1.9.14-1.el7.iso
kernel-3.10.0-1160.6.1.el7.x86_64
qemu-kvm-rhev-2.12.0-48.el7_9.1.x86_64
seabios-bin-1.11.0-2.el7.noarch

Comment 14 dehanmeng 2020-11-29 03:25:32 UTC
Hit this issue again on win2012 from virtio-win-prewhql-0.1-191 acceptance test:

137-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket.q35/
161-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.q35/

pkgs:
kernel-4.18.0-193.el8.x86_64
qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950.x86_64
virtio-win-prewhql-191
seabios-1.13.0-1.module+el8.2.0+5520+4e5817f3.x86_64

Comment 15 Vadim Rozenfeld 2020-12-15 05:39:27 UTC
(In reply to xiagao from comment #9)
> This issue in Win2012-64 guest always failed in
> virtio-win-prewhql-acceptance test, so set this priority to high.
> 
> '133-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.
> x86_64.io-github-autotest-qemu.virtio_serial_file_transfer.unix_socket.q35'
> Finshed 2020-05-25 06:55:49 2020-05-25 06:56:55 ERROR 65.594109
> '157-Host_RHEL.m8.u2.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.
> x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.
> q35' Finshed 2020-05-25 07:49:44 2020-05-25 07:52:16 ERROR 152.171514
> 
> 
> And also can reproduce with the following steps.
> 1. boot up win2012-64 guest with one virtio serial device
> -device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
> -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device
> virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
> 
> 2. install vioser driver in guest.
> 
> 3. transfer data between host and guest with virtio serial device
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
>         1 file(s) copied.
> host: # nc -U /tmp/helloworld1
> testtest
> =============> success
> 
> 4. shutdown guest and boot up with two virtio serial devices
> -device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
> -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  -device
> virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
> -device virtio-serial-pci,id=virtio-serial2,max_ports=31,bus=pci.7 \
> -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device
> virtserialport,bus=virtio-serial2.0,chardev=channel2,name=vs2,id=por2 \
> 
> 5. transfer data between  host and guest with the two virtio serial devices
> 
> After step 5,
> Failed to transfer data via the second virtio serial device.
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs1
>         1 file(s) copied.
> host: # nc -U /tmp/helloworld1
> testtest
> =============> success for vs1
> 
> guest: C:\Users\Administrator\Desktop>copy a.txt \\.\vs2
> The I/O operation has been aborted because of either a thread exit or an
> applica
> tion request.
>         0 file(s) copied.
> host: # nc -U /tmp/helloworld2
> =============> fail for vs2
> 

Is the problem reproduciable after the system restart? I was able to reproduce
the problem once, but them it disappeared, and I'm not sure if it happened because
I activated and rebooted the system or just because reboot.

Thanks,
Vadim.

Comment 16 dehanmeng 2020-12-16 04:07:01 UTC
(In reply to Vadim Rozenfeld from comment #15)
> 
> Is the problem reproduciable after the system restart? I was able to
> reproduce
> the problem once, but them it disappeared, and I'm not sure if it happened
> because
> I activated and rebooted the system or just because reboot.
> 

Hi Vadim,
actually I tried 10 times for rebooting guest, and this issue did disappear after guest reboot (or diable/enable serial driver), so it's not a reproducible issue as my opinion. hope this can help you.

Comment 17 dehanmeng 2021-01-09 06:39:56 UTC
Hit this issue again on win2012-64 from virtio-win-1.9.15-0.el8 acceptance test:
237-Host_RHEL.m8.u3.product_av.qcow2.virtio_blk.up.virtio_net.Guest.Win2012.x86_64.io-github-autotest-qemu.qemu_guest_agent.virtio_serial.check_sync.q35

pkgs:
qemu-kvm-5.1.0-17.module+el8.3.1+9213+7ace09c3.x86_64
kernel-4.18.0-240.10.1.el8_3.x86_64
virtio-win-1.9.15-0.el8
seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch

Comment 18 Peixiu Hou 2021-01-13 13:16:47 UTC
Hit this issue again with virtio-win-prewhql-192 acceptance test:
Failed jobs:
virtio_serial_file_transfer.unix_socket.q35
qemu_guest_agent.virtio_serial.check_sync.q35

Used versions:
kernel-4.18.0-240.11.1.el8_3.x86_64
qemu-kvm-5.1.0-17.module+el8.3.1+9213+7ace09c3.x86_64
seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch
virtio-win-prewhql-192

Thanks~
Peixiu

Comment 20 menli@redhat.com 2021-02-04 04:09:02 UTC
Hit this issue with virtio-win-prewhql-194 acceptance test:
Failed jobs:
virtio_serial_file_transfer.unix_socket.q35
qemu_guest_agent.virtio_serial.check_sync.q35

versions:
kernel-4.18.0-240.el8.x86_64
qemu-kvm-5.1.0-18.module+el8.3.1+9507+32d6953c.x86_64
virtio-win-prewhql-194
seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch

Comment 23 Peixiu Hou 2021-03-19 08:13:42 UTC
Hit the similar issue when run virtio-win-1.9.16-2 acceptance test:

Failed jobs:
qemu_guest_agent.virtio_serial.check_sync.q35
vioser_in_use.with_reboot.guest_to_host

Tried to run 10 times for each job, all passed, cannot reproduce it.

Used versions:
guest os: Win2012
kernel-4.18.0-298.el8.x86_64
qemu-kvm-5.2.0-13.module+el8.4.0+10369+fd280775.x86_64
seabios-bin-1.14.0-1.module+el8.4.0+8855+a9e237a9.noarch
virtio-win-1.9.16-2.el8.iso

Thanks~
Peixiu

Comment 25 Peixiu Hou 2021-04-16 04:21:40 UTC
Hit the similar issue when run virtio_win_prewhql_198 acceptance test.

version:
    guest os: Win2012
    kernel-4.18.0-302.1.el8.x86_64
    qemu-kvm-6.0.0-14rc0.scrmod+el8.5.0+10480+a8e067ae.wrb210325.x86_64
    virtio-win-prewhql-198
    seabios-1.14.0-1.scrmod+el8.5.0+10480+a8e067ae.x86_64

Comment 28 Vadim Rozenfeld 2021-05-17 00:15:07 UTC
Can we give a try tp build 199
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1605219 ?
Thanks,
Vadim.

Comment 29 dehanmeng 2021-05-17 03:16:24 UTC
reproduce this issue:
version:
RHEL-8.5.0-20210428.d.3
virtio-win-prewhql-0.1-198.iso
seabios-1.14.0-1.scrmod+el8.5.0+10801+f1aef2c6.x86_64
kernel-4.18.0-304.5.el8.kpq1.x86_64
qemu-kvm-6.0.0-15rc5.scrmod+el8.5.0+10801+f1aef2c6.wrb210428.x86_64

Steps:
1. boot up win2012-64 guest with one virtio serial device
-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
-chardev socket,id=channel1,path=/tmp/avocado_n4tn8ag5/serial-vs1-20210511-034002-iMsQNqMr,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \

2. install vioser driver in guest.

3. transfer data between host and guest with virtio serial device
guest: C:\Users\Administrator\Desktop>copy test.txt \\.\vs1
        1 file(s) copied.
host: # nc -U /tmp/avocado_n4tn8ag5/serial-vs1-20210511-034002-iMsQNqMr
reproduce testing
=============> success

4. shutdown guest and boot up with two virtio serial devices
-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pci.6 \
-chardev socket,id=channel1,path=/tmp/avocado_n4tn8ag5/serial-vs1-20210511-034002-iMsQNqMr,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel1,name=vs1,id=por1 \
-device virtio-serial-pci,id=virtio-serial2,max_ports=31,bus=pci.7 \
-chardev socket,id=channel2,path=/tmp/avocado_n4tn8ag5/serial-vs2-20210511-034002-iMsQNqMr,server,nowait  -device virtserialport,bus=virtio-serial2.0,chardev=channel2,name=vs2,id=por2 \

5. transfer data between  host and guest with the two virtio serial devices

After step 5,
Failed to transfer data via the second virtio serial device.
guest: C:\Users\Administrator\Desktop>copy test.txt \\.\vs1
        1 file(s) copied.
host: # nc -U /tmp/avocado_n4tn8ag5/serial-vs1-20210511-034002-iMsQNqMr
reproduce testing
=============> success for vs1

guest: C:\Users\Administrator\Desktop>copy test.txt \\.\vs2
The I/O operation has been aborted because of either a thread exit or an application request.
        0 file(s) copied.
host: # nc -U /tmp/avocado_n4tn8ag5/serial-vs2-20210511-034002-iMsQNqMr

=============> fail for vs2

Actual results:
fail to transfer data with vs2

Expected result:
data can transfer successfully with both vs1/vs2

Verify this issue:
verify version:
RHEL-8.5.0-20210428.d.3
virtio-win-prewhql-0.1-199.iso
seabios-1.14.0-1.scrmod+el8.5.0+10801+f1aef2c6.x86_64
kernel-4.18.0-304.5.el8.kpq1.x86_64
qemu-kvm-6.0.0-15rc5.scrmod+el8.5.0+10801+f1aef2c6.wrb210428.x86_64

steps as above.

actual result:
guest: C:\Users\Administrator\Desktop>copy test.txt \\.\vs1
        1 file(s) copied.
host: # nc -U /tmp/avocado_n4tn8ag5/serial-vs1-20210511-034002-iMsQNqMr
verify testing
=============> success for vs1

guest: C:\Users\Administrator\Desktop>copy test.txt \\.\vs2
The I/O operation has been aborted because of either a thread exit or an application request.
        0 file(s) copied.
host: # nc -U /tmp/avocado_n4tn8ag5/serial-vs2-20210511-034002-iMsQNqMr
verify testing
=============> success for vs2

Expected result:
data can transfer successfully with both vs1/vs2

Comment 30 Vadim Rozenfeld 2021-05-17 04:31:00 UTC
Hi Dehan,
Thank you a lot for your quick response.

Best,
Vadim.

Comment 33 errata-xmlrpc 2021-11-09 18:52:45 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 (virtio-win bug fix and enhancement update), 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/RHEA-2021:4341