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 846268 - [virtio-win][scsi] Windows guest Core dumped when trying to initialize readonly scsi data disk
Summary: [virtio-win][scsi] Windows guest Core dumped when trying to initialize readon...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-07 10:10 UTC by dawu
Modified: 2013-02-21 07:38 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.313.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:38:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0527 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2013-02-20 21:51:08 UTC

Description dawu 2012-08-07 10:10:43 UTC
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 10:36:11 UTC
*note* remove werror=stop,rerror=stop will not hit this issue .

Comment 4 dawu 2012-08-08 02:22:50 UTC
(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 07:25:34 UTC
This is a qemu-kvm bug ,move to the right component .

Comment 6 dawu 2012-08-08 08:06:56 UTC
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 11:03:20 UTC

*** This bug has been marked as a duplicate of bug 808664 ***

Comment 8 Paolo Bonzini 2012-08-08 12:49:46 UTC
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-29 03:29:54 UTC
This issue also exist on other guests.

Best Regards,
Dawn

Comment 13 Sibiao Luo 2012-10-09 06:48:54 UTC
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 12:15:35 UTC
> 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 12:43:49 UTC
(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 07:38:22 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.

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.