Bug 1012252 - BLOCK_IO_ERROR with 'Permission denied' message when write to a QED format snapshot disk
BLOCK_IO_ERROR with 'Permission denied' message when write to a QED format sn...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Ademar Reis
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 01:52 EDT by Sibiao Luo
Modified: 2014-05-28 14:10 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-28 14:10:57 EDT
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 Sibiao Luo 2013-09-26 01:52:16 EDT
Description of problem:
create a QED format disk and make live snapshot specified QED format, then dd to the QED snapshot in guest, then BLOCK_IO_ERROR with 'Permission denied' message both in HMP and QMP monitor.
BTW, if use a qcow2 format disk and make live snapshot specified qcow2 format, then it can dd to the QED snapshot in guest successfully.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev && rpm -q seabios
2.6.32-420.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.406.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64
guest info:
2.6.32-420.el6.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.create a qed data disk.
# qemu-img create -f qed my-data-disk.qed 5G
Formatting 'my-data-disk.qed', fmt=qed size=5368709120 cluster_size=0 table_size=0
2.boot a guest attach this data disk via scsi-hd interface.
e.g:...-drive file=/home/my-data-disk.qed,if=none,id=drive-data-disk,format=qed,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=drive-data-disk,id=data-disk
3.make live snapshot specified QED format.
(qemu) info status 
VM status: running
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL6.5_20130924.2_x86_64.qed ro=0 drv=qed encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.qed ro=0 drv=qed encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) snapshot_blkdev drive-data-disk /home/snapshot-file qed
Formatting '/home/snapshot-file', fmt=qed size=5368709120 backing_file='/home/my-data-disk.qed' backing_fmt='qed' cluster_size=0 table_size=0 
4.dd to the QED snapshot in guest.
guest]# dd if=/dev/zero of=/dev/sda bs=1M count=1000

Actual results:
after step 4, VM in paused (io-error) status, BLOCK_IO_ERROR with 'Permission denied' message both in HMP and QMP monitor.
- HMP:
(qemu) block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)

(qemu) info status 
VM status: paused (io-error)
(qemu) cont
(qemu) block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)
block I/O error in device 'drive-data-disk': Permission denied (13)

-QMP:
{"execute":"qmp_capabilities"}
{"return": {}}
{"timestamp": {"seconds": 1380174012, "microseconds": 192697}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174012, "microseconds": 196907}, "event": "STOP"}
{"timestamp": {"seconds": 1380174012, "microseconds": 197319}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174012, "microseconds": 197627}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174012, "microseconds": 197919}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}

{"timestamp": {"seconds": 1380174127, "microseconds": 808709}, "event": "RESUME"}

{"timestamp": {"seconds": 1380174127, "microseconds": 809184}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174127, "microseconds": 809819}, "event": "STOP"}
{"timestamp": {"seconds": 1380174127, "microseconds": 810171}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174127, "microseconds": 810562}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1380174127, "microseconds": 810869}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-data-disk", "__com.redhat_debug_info": {"message": "Permission denied", "errno": 13}, "__com.redhat_reason": "eother", "operation": "write", "action": "stop"}}

Expected results:
It should can write the the QED format snapshot successfully.

Additional info:
Comment 1 Sibiao Luo 2013-09-26 01:52:54 EDT
# /usr/libexec/qemu-kvm -M pc -S -cpu host -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid f22105cf-c6a4-4e35-95d9-db1b2748f26a -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL6.5_20130924.2_x86_64.qed,if=none,id=drive-virtio-disk,format=qed,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=10:A1:1C:18:AB:11,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -drive file=/home/my-data-disk.qed,if=none,id=drive-data-disk,format=qed,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=drive-data-disk,id=data-disk -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              6782.67
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

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