This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1314250 - System crashed when mirroring to itself
System crashed when mirroring to itself
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: John Snow
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-03 04:47 EST by jingzhao
Modified: 2016-05-27 16:26 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-27 16:26:29 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 jingzhao 2016-03-03 04:47:40 EST
Description of problem:
System crashed when mirroring to itself

Version-Release number of selected component (if applicable):
kernel-3.10.0-350.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.8.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.Boot vm through following cli:
/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-monitor stdio \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :0 \
-drive file=/home/rhelbk2.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 \
-netdev tap,id=hostnet1,vhost=on \
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=54:52:00:B6:40:22 \
-qmp tcp::8887,server,nowait \


2. In qmp, mirroring the base to itself
{ "execute": "drive-mirror", "arguments": { "device": "drive-virtio-disk0", "target": "/home/rhelbk2.img","sync": "full"}}
{"execute": "block-job-complete", "arguments": { "device": "drive-virtio-disk0"} } 

3.restart the guest "

Actual results:
System crashed and the guest didn't boot up


Expected results:
system boot up correctly

Additional info:
Comment 2 John Snow 2016-05-20 14:08:07 EDT
Kevin, I *think* this is not currently possible to check (if a filename is already opened within QEMU) without some future work from you and Fam, right?

I'm leaning towards postponing this to some future date -- it'd be nice to guard against it, but you can't guard against everything...

--js
Comment 3 Kevin Wolf 2016-05-27 13:41:07 EDT
Yes, I think it's a case of "then don't do that". Or in other words NOTABUG.

Even in the future, we won't be able to tell whether two paths refer to the
same image. We could in theory check a few obvious cases like exactly the same
filename, but it already gets tricky with links. And as soon as a network
protocol is involved, you can't tell anything any more. So telling the user to
be careful is probably the most consistent solution.
Comment 4 John Snow 2016-05-27 16:26:29 EDT
And there we have it.

This is not possible to consistently guard against now or even in the future, so "please don't do that." 

Thanks jingzhao and Kevin.

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