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 1395790 - vioscsi.sys BSOD when adding CPU to live Windows Server 2012R2 guest
Summary: vioscsi.sys BSOD when adding CPU to live Windows Server 2012R2 guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win
Version: 7.2
Hardware: x86_64
OS: Windows
unspecified
high
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1401400
TreeView+ depends on / blocked
 
Reported: 2016-11-16 16:36 UTC by Nat Meo
Modified: 2017-08-01 12:55 UTC (History)
2 users (show)

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


Attachments (Terms of Use)
BSOD minidump (271.07 KB, application/octet-stream)
2016-11-16 16:36 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 2016-11-16 16:36:05 UTC
Created attachment 1221289 [details]
BSOD minidump

Description of problem:
When trying to hot add a CPU to a Windows Server 2012R2, a BSOD will occur in vioscsi.sys. This appears to only happen the first time a VM is created and does not happen subsequently.

Version-Release number of selected component (if applicable):
Latest 126 VirtIO drivers available from https://fedoraproject.org/wiki/Windows_Virtio_Drivers

How reproducible:
Only first time after installing Windows.

Steps to Reproduce:
1. Create a new Windows 2012R2 guest with a VirtIO SCSI disk.
2. Hot add a CPU using "virsh setvcpus win2k12r2 3" command while guest is running.

Actual results:
BSOD

Expected results:
No BSOD

Additional info:
Will attach minidump from crash for better analysis. The following comes from !analyze -v in WinDbg:

*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
An attempt was made to access a pageable (or completely invalid) address at an
interrupt request level (IRQL) that is too high.  This is usually
caused by drivers using improper addresses.
If kernel debugger is available get stack backtrace.
Arguments:
Arg1: ffffe0097dc47158, memory referenced
Arg2: 0000000000000002, IRQL
Arg3: 0000000000000000, value 0 = read operation, 1 = write operation
Arg4: fffff801017e84b3, address which referenced memory

Debugging Details:
------------------


READ_ADDRESS:  ffffe0097dc47158 

CURRENT_IRQL:  2

FAULTING_IP: 
vioscsi+14b3
fffff801`017e84b3 488b8cf750010000 mov     rcx,qword ptr [rdi+rsi*8+150h]

CUSTOMER_CRASH_COUNT:  1

DEFAULT_BUCKET_ID:  DRIVER_FAULT_SERVER_MINIDUMP

BUGCHECK_STR:  0xD1

PROCESS_NAME:  System

LAST_CONTROL_TRANSFER:  from fffff802fa1e7ee9 to fffff802fa1dc3a0

STACK_TEXT:  
ffffd001`fe3474a8 fffff802`fa1e7ee9 : 00000000`0000000a ffffe009`7dc47158 00000000`00000002 00000000`00000000 : nt!KeBugCheckEx
ffffd001`fe3474b0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiBugCheckDispatch+0x69


STACK_COMMAND:  .bugcheck ; kb

FOLLOWUP_IP: 
vioscsi+14b3
fffff801`017e84b3 488b8cf750010000 mov     rcx,qword ptr [rdi+rsi*8+150h]

SYMBOL_NAME:  vioscsi+14b3

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: vioscsi

IMAGE_NAME:  vioscsi.sys

DEBUG_FLR_IMAGE_TIMESTAMP:  57ac5e28

FAILURE_BUCKET_ID:  X64_0xD1_vioscsi+14b3

BUCKET_ID:  X64_0xD1_vioscsi+14b3

Followup: MachineOwner
---------

Comment 1 Peixiu Hou 2016-11-17 07:50:30 UTC
Hi,

Tried this issue on rhel7.3 host with base command, it cannot be reproduced. In a new installed win2012r2 guest, hot add a cpu to it, the system works normal, no BSOD occurs.

Tried on follows version, the same results.
virtio-win-1.9.0-3 (build 124 vioscsi)
virtio-win-prewhql-126 (build 126 vioscsi)

Steps as follow:
1. Boot a win2012r2 guest.
/usr/libexec/qemu-kvm -name win2012r2 -enable-kvm -m 3G -smp 1,maxcpus=2 -cpu SandyBridge -uuid ea78071a-f6e4-4347-8077-9cb9f7959e83 -nodefconfig --nodefaults -boot order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -drive file=win2012r2.raw,if=none,id=system-disk0,format=raw,serial=mike_cao,cache=none -device scsi-hd,bus=scsi0.0,drive=system-disk0,id=scsi-disk0 -drive file=/home/scsi_function/en_windows_server_2012_r2_x64_dvd_2707946.iso,media=cdrom,id=cdrom,if=none -device ide-drive,drive=cdrom,bootindex=1 -vnc 0.0.0.0:0 -vga cirrus -monitor stdio -qmp tcp:0:4445,server,nowait -netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=00:52:5a:30:4e:58,bus=pci.0 -cdrom /usr/share/virtio-win/virtio-win.iso

2. In qmp, hot-add a cpu:
telnet host_ip 4445
{ 'execute': 'qmp_capabilities' }
{ "execute": "query-hotpluggable-cpus" }
{ "execute": "device_add","arguments":{"driver":"SandyBridge-x86_64-cpu","core-id": 0, "thread-id": 0, "socket-id": 1,"id":"core1"}}

3. after hot added a cpu, check the system status and the new cpu shows in system device management.

Additional info:
We also will reproduce this issue with virsh way, then will update to here~


Best Regards~
Peixiu Hou

Comment 3 Nat Meo 2016-11-17 14:48:45 UTC
I did a little more digging and it seems this specific element is causing the BSOD:

    <controller type='scsi' index='0' model='virtio-scsi'>
      <driver queues='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>

The presence of "<driver queues='2'/>" appears to trigger the BSOD when "virsh setvcpus win2k12r2 3" is executed on the command line. When this is removed from the virtio-scsi controller, no BSOD occurs.

Comment 4 Vadim Rozenfeld 2016-11-17 22:16:42 UTC
(In reply to Nat Meo from comment #3)
> I did a little more digging and it seems this specific element is causing
> the BSOD:
> 
>     <controller type='scsi' index='0' model='virtio-scsi'>
>       <driver queues='2'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
>     </controller>
> 
> The presence of "<driver queues='2'/>" appears to trigger the BSOD when
> "virsh setvcpus win2k12r2 3" is executed on the command line. When this is
> removed from the virtio-scsi controller, no BSOD occurs.

Hi Nat,
Could you please provide the entire qemu command line, and upload compressed dump file?

Thanks,
Vadim.

Comment 5 lijin 2016-11-18 02:28:22 UTC
(In reply to Nat Meo from comment #3)
> I did a little more digging and it seems this specific element is causing
> the BSOD:
> 
>     <controller type='scsi' index='0' model='virtio-scsi'>
>       <driver queues='2'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
>     </controller>
> 
> The presence of "<driver queues='2'/>" appears to trigger the BSOD when
> "virsh setvcpus win2k12r2 3" is executed on the command line. When this is
> removed from the virtio-scsi controller, no BSOD occurs.

Thanks for the digging,QE can reproduce this issue with "num_queues=2":

qemu cli:
/usr/libexec/qemu-kvm -name 122BLKWIN2016 -enable-kvm -m 4G -smp 2,maxcpus=4 -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=win2012R2-iso.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,serial=mike_cao,cache=none -device virtio-scsi-pci,id=scsi0,num_queues=2 -device scsi-hd,bus=scsi0.0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 -vnc 0.0.0.0:21 -vga cirrus -cdrom virtio-win-prewhql-126.iso -monitor stdio -qmp tcp:0:4449,server,nowait -fda virtio-win-prewhql-126.vfd -netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on -device e1000,netdev=hostnet0,id=net0,mac=00:52:4c:20:8d:00

the dump is located in http://fileshare.englab.nay.redhat.com/pub/section2/images_backup/virtio-win/bug1395790/

Comment 7 lijin 2017-01-16 07:58:40 UTC
Reproduce this issue with virtio-win-prewhql-126
Verify this issue with virtio-win-prewhql-130

steps same as comment#0 and comment#5

with virtio-win-prewhql-126,guest bsod after hotplug a cpu;
with virtio-win-prewhql-126,guest works well after hotplug a cpu,no bsod

So this issue has been fixed already,change status to verified.

Comment 10 errata-xmlrpc 2017-08-01 12:55:38 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.