Bug 846268 - [virtio-win][scsi] Windows guest Core dumped when trying to initialize readonly scsi data disk
[virtio-win][scsi] Windows guest Core dumped when trying to initialize readon...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-07 06:10 EDT by dawu
Modified: 2013-02-21 02:38 EST (History)
12 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.313.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:38:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dawu 2012-08-07 06:10:43 EDT
Description of problem:
Windows uest stopped after formatting readonly scsi data disk on win7

Version-Release number of selected component (if applicable):
kernel-2.6.32-294.el6.x86_64
qemu-kvm-0.12.1.2-2.302.el6.x86_64
virtio-win-prewhql-32

How reproducible:
always

Steps to Reproduce:
1.Start CLI with readonly scsi data disk:
  /usr/libexec/qemu-kvm -m 7G -smp 3 -cpu Penryn,+x2apic -usb -device usb-tablet -drive file=win7-64-ide.qcow2,format=qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,werror=stop,aio=native -device virtio-scsi-pci,id=bus0 -device scsi-hd,bus=bus0.0,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup0 -device e1000,netdev=hostnet0,mac=00:10:16:23:25:12,bus=pci.0,addr=0x4 -uuid 175b476d-ac95-48aa-8c9c-a914171290c5 -rtc base=localtime -no-kvm-pit-reinjection -monitor stdio -name win7-64-scsi -spice disable-ticketing,port=5931 -vga qxl -qmp tcp:0:4444,server,nowait  -bios /usr/share/seabios/bios-pm.bin -device virtio-scsi-pci,bus=pci.0,id=scsi0 -drive file=test2.qcow2,format=qcow2,if=none,media=disk,cache=none,werror=stop,aio=native,id=scsi0,readonly=on -device scsi-hd,bus=scsi0.0,drive=scsi0,id=scsi1

2.in the guest ,right click computer --> management-->Storage-->Disk Management

3.after step 2, it prompts "initialize disk" ,all click "OK"
  
Actual results:
Guest stopped without any error prompt, check guest status as following:
(qemu) info status
VM status: paused (io-error)
(qemu) c
(qemu) qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/scsi-disk.c:366: scsi_write_data: Assertion `r->req.aiocb == ((void *)0)' failed.
Aborted (core dumped)


Expected results:
scsi disk should be initialized successfully and no stop for guest.

Additional info:
Comment 3 dawu 2012-08-07 06:36:11 EDT
*note* remove werror=stop,rerror=stop will not hit this issue .
Comment 4 dawu 2012-08-07 22:22:50 EDT
(In reply to comment #0)
> 
> Expected results:
> scsi disk should be initialized successfully and no stop for guest.

Correct the wrong Expected results as "kindly prompt should be provided or disable initializing for readonly disk, and no stop or core dump for guest"
Comment 5 Mike Cao 2012-08-08 03:25:34 EDT
This is a qemu-kvm bug ,move to the right component .
Comment 6 dawu 2012-08-08 04:06:56 EDT
Following is the bt info for core dump:
(gdb) bt
#0  0x00007ffff57788a5 in raise () from /lib64/libc.so.6
#1  0x00007ffff577a085 in abort () from /lib64/libc.so.6
#2  0x00007ffff5771a1e in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff5771ae0 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff7e60201 in scsi_write_data (req=0x7fffe0007010) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-disk.c:366
#5  0x00007ffff7e5f7f6 in scsi_dma_restart_bh (opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-bus.c:53
#6  0x00007ffff7e1ec41 in qemu_bh_poll () at async.c:70
#7  0x00007ffff7dec629 in main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4032
#8  0x00007ffff7e0dd5a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2244
#9  0x00007ffff7deeffc in main_loop (argc=20, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4202
#10 main (argc=20, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6430

Best Regards,
Dawn
Comment 7 Paolo Bonzini 2012-08-08 07:03:20 EDT

*** This bug has been marked as a duplicate of bug 808664 ***
Comment 8 Paolo Bonzini 2012-08-08 08:49:46 EDT
Actually, in this case the right thing to do is not to stop the machine; it is to report a "write protected" error to the VM even with werror=stop, so this is not a duplicate.
Comment 10 dawu 2012-08-28 23:29:54 EDT
This issue also exist on other guests.

Best Regards,
Dawn
Comment 13 Sibiao Luo 2012-10-09 02:48:54 EDT
Reproduce this issue on qemu-kvm-0.12.1.2-2.295.el6.x86_64 with the same steps as comment #0.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-315.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64
guest info:
windows-7-64bit

Result of reproduce:
(qemu) info status 
VM status: paused (io-error)
(qemu) cont
(qemu) qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/scsi-disk.c:369: scsi_write_data: Assertion `r->req.aiocb == ((void *)0)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff57788a5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff57788a5 in raise () from /lib64/libc.so.6
#1  0x00007ffff577a085 in abort () from /lib64/libc.so.6
#2  0x00007ffff5771a1e in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff5771ae0 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff7e5fef1 in scsi_write_data (req=0x7fffe00008f0) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-disk.c:369
#5  0x00007ffff7e5f4e6 in scsi_dma_restart_bh (opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-bus.c:53
#6  0x00007ffff7e1e921 in qemu_bh_poll () at async.c:70
#7  0x00007ffff7dec319 in main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4032
#8  0x00007ffff7e0da4a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2244
#9  0x00007ffff7deecec in main_loop (argc=20, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4202
#10 main (argc=20, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6427
(gdb) q


Verify this issue on qemu-kvm-0.12.1.2-2.320.el6.x86_64 with the same steps as comment #0.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-315.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64
guest info:
windows-7-64bit

Result of verify:
fail to initialize, the QEMU disable initializing the readonly disk.

Base on above, this issue has been fixed correctly.
Comment 14 Paolo Bonzini 2012-10-10 08:15:35 EDT
> Result of verify:
> fail to initialize, the QEMU disable initializing the readonly disk.

What do you mean exactly?
Comment 15 Sibiao Luo 2012-10-10 08:43:49 EDT
(In reply to comment #14)
> > Result of verify:
> > fail to initialize, the QEMU disable initializing the readonly disk.
> 
> What do you mean exactly?
when right hit on the read-only disk in 'Disk-Management', the 'initialize' selection option was gray and unusable, it was just disable initializing for readonly disk.
Comment 17 errata-xmlrpc 2013-02-21 02:38:22 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0527.html

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