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 895041 - QMP: forward port I/O error debug messages
Summary: QMP: forward port I/O error debug messages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 971938 1007204
Blocks: 987757 1026966
TreeView+ depends on / blocked
 
Reported: 2013-01-14 11:02 UTC by Sibiao Luo
Modified: 2014-07-07 09:32 UTC (History)
17 users (show)

Fixed In Version: qemu-kvm-1.5.3-20.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:27:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2013-01-14 11:02:26 UTC
Description of problem:
set a lvm as readonly in host via 'lvchange -pr /path/to/lvm', then attach it to guest. do I/O to the disk in guest, the guest and host will be in paused status, the qemu-kvm should give correct prompts. rhel6 and rhel7 host give different respondence.
rhel6.4 host: 
(qemu) block I/O error in device 'drive-virtio0-0-0': Operation not permitted (1)
block I/O error in device 'drive-virtio0-0-0': Operation not permitted (1)
block I/O error in device 'drive-virtio0-0-0': Operation not permitted (1)
block I/O error in device 'drive-virtio0-0-0': Operation not permitted (1)
(qemu) info status 
VM status: paused (io-error)
rhel7 host:
qemu-kvm prompts nothing, qemu and guest just in paused status.

BTW, bonzini give a explain as following:
"Operation not permitted" which means something returned "-1" instead of a negative errno value such as EACCES or EROFS. EPERM = 1 and "Operation not permitted" is almost always a sign of incorrect propagation of errors.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.6.0-0.29.el7.x86_64
qemu-kvm-1.3.0-3.el7.x86_64
geust info:
kernel-3.6.0-0.29.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.set a lvm as readonly in host via 'lvchange -pr /path/to/lvm'.
# lvchange -pr /dev/vg-90.100-sluo/lv-90-100-data-disk1.raw
# lvdisplay /dev/vg-90.100-sluo/lv-90-100-data-disk1.raw
  --- Logical volume ---
  LV Path                /dev/vg-90.100-sluo/lv-90-100-data-disk1.raw
  LV Name                lv-90-100-data-disk1.raw
  VG Name                vg-90.100-sluo
  LV UUID                a4UbmJ-copd-ybW4-iasP-z0Ql-8vgD-rHA0cO
  LV Write Access        read only
...
2.boot guest with 'werror=stop,rerror=stop'.
e.g:...-drive file=/dev/vg-90.100-sluo/lv-90-100-data-disk2.raw,if=none,format=raw,id=drive-virtio0-0-0,media=disk,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio0-1-0,id=virtio0-0-0
3.do I/O to the lvm.
# dd if=/dev/zero of=/dev/vda bs=1M count=1000 oflag=direct
  
Actual results:
after step 3, qemu-kvm prompts nothing, qemu and guest just in paused status.

Expected results:
qemu-kvm give correct prompts when qemu and guest just in paused status.

Additional info:

Comment 1 Luiz Capitulino 2013-01-14 12:19:43 UTC
Oh, good catch.

What happens here is that in RHEL6 we added the error messages for
debugging purposes. The positive errno value is correct, it's the
errno code that caused the VM to stop.

For RHEL7 we have two options:

 1. Try to think on an upstremable solution (ie. extend the QMP
    event with the error info)

 2. Just forward port the RHEL6 solution

Item 2 is trivial, item 1 has to be discussed upstream and may or may not be simple.

Comment 3 Jiri Denemark 2013-11-21 12:59:40 UTC
Is this going to be solved in any way? If so, libvirt will either need to add support for the possible upstream solution or backport it's RHEL6 support for __com.redhat_reason.

Comment 4 Laszlo Ersek 2013-11-21 13:09:24 UTC
It will be solved as soon as I can work more than 16 hours per day. Thanks.

Comment 15 Miroslav Rezanina 2013-11-28 07:36:22 UTC
Fix included in qemu-kvm-1.5.3-20.el7

Comment 17 Jun Li 2013-12-13 05:01:26 UTC
Reproduce this bug:
Version-Release number of selected component (if applicable):
qemu-kvm-1.0-17.1.el7.x86_64
3.3.0-0.20.el7.x86_64

Do as the comment 0, after step 3, qemu-kvm prompts "VM status: paused (io-error)", guest just in paused status.

# lvdisplay /dev/juli-vg/juli-lv 
  --- Logical volume ---
  LV Path                /dev/juli-vg/juli-lv
  LV Name                juli-lv
  VG Name                juli-vg
  LV UUID                nxiIZQ-ME4b-HD6u-Lrff-r0S6-jGKW-soQaZR
  LV Write Access        read only
  LV Creation host, time localhost.localdomain, 2013-12-12 23:30:37 -0500
  LV Status              available
  # open                 1
  LV Size                10.00 GiB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
---

<cli>:
# /usr/bin/qemu-kvm -M pc -cpu host -enable-kvm -m 4G -smp 4,sockets=2,cores=2,threads=1 -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -drive file=/home/juli/RHEL-7.0-20131127.1.qcow2,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=qcow2,werror=stop,rerror=stop,aio=native -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=juli,bootindex=1 \
-drive file=/dev/juli-vg/juli-lv,if=none,id=drive-virtio-disk1,format=raw,cache=none,werror=stop,rerror=stop,aio=native \
-device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=2 \
-spice port=5932,disable-ticketing -k en-us -vga qxl -global qxl-vga.vram_size=67108864 -monitor stdio -device virtio-balloon-pci,id=ballooning -qmp tcp:0:4445,server,nowait -global pvpanic.ioport=0x0505

After step 3 as comment 0: 
(qemu) info status 
VM status: paused (io-error)

--------------
Verify this bug:
Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-21.el7.x86_64

# lvdisplay /dev/juli-vg/juli-lv
  --- Logical volume ---
  LV Path                /dev/juli-vg/juli-lv
  LV Name                juli-lv
  VG Name                juli-vg
  LV UUID                DXjFrZ-fCNt-0u1P-pcip-gpCT-17VW-EJ6b9F
  LV Write Access        read only
  LV Creation host, time localhost.localdomain, 2013-12-13 11:27:26 +0800
  LV Status              available
  # open                 0
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
-------
# /usr/libexec/qemu-kvm -M pc -cpu host -enable-kvm -m 4G -smp 4,sockets=2,cores=2,threads=1 -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -drive file=/home/juli/RHEL-7.0-20131127.1.qcow2_v3,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=qcow2,werror=stop,rerror=stop,aio=native -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=juli,bootindex=1 \
-drive file=/dev/juli-vg/juli-lv,if=none,id=drive-virtio-disk1,format=raw,cache=none,werror=stop,rerror=stop,aio=native \
-device virtio-blk-pci,scsi=on,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=2 \
-netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mq=on,vectors=17,id=net0,mac=00:1a:4a:42:0b:38,bus=pci.0 -spice port=5932,disable-ticketing -k en-us -vga qxl -global qxl-vga.vram_size=67108864 -monitor stdio -device virtio-balloon-pci,id=ballooning -qmp tcp:0:4445,server,nowait -global pvpanic.ioport=0x0505

qemu-kvm: -drive file=/dev/juli-vg/juli-lv,if=none,id=drive-virtio-disk1,format=raw,cache=none,werror=stop,rerror=stop,aio=native: could not open disk image /dev/juli-vg/juli-lv: The device is not writable: Permission denied
/etc/qemu-ifdown: could not launch network script

As the above show, qemu-kvm cannot boot. Based on above test, this bug has been verified.

Comment 19 Ludek Smid 2014-06-13 10:27:08 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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