Bug #3521
closedwindows 2008 kvm guest crashes with "floating point exception" when using rbd image with cache=writeback
0%
Description
Host: ubuntu 12.10 amd64
Guest: windows 2008 r2
Ceph: 0.48.argonaut2 (the one from the ubuntu repos)
The crash is 100% reproducable on my test system using the following commands:
- kvm crashes with "floating point exception"
kvm -cpu kvm64 -smp sockets=1,cores=4 -m 2048 -vnc 192.168.0.250:2 -usbdevice tablet -nodefaults -boot menu=on -vga cirrus -device ich9-ahci,id=ahci -drive id=drive-286,if=none,cache=writeback,aio=native,format=raw,media=disk,file=rbd:hdd/9686a9e6-a495-4ec2-9418-ab2fe87f11cd -device ide-hd,id=drive-device-286,bus=ahci.0,drive=drive-286
- export image to normal file
rbd export rbd:hdd/9686a9e6-a495-4ec2-9418-ab2fe87f11cd /xfs-drive1/windows1.hdd
- works fine (file instead of rbd image)
kvm -cpu kvm64 -smp sockets=1,cores=4 -m 2048 -vnc 192.168.0.250:2 -usbdevice tablet -nodefaults -boot menu=on -vga cirrus -device ich9-ahci,id=ahci -drive id=drive-286,if=none,cache=writeback,aio=native,format=raw,media=disk,file=/xfs-drive1/windows1.hdd -device ide-hd,id=drive-device-286,bus=ahci.0,drive=drive-286
- works fine (using rbd with cache=none)
kvm -cpu kvm64 -smp sockets=1,cores=4 -m 2048 -vnc 192.168.0.250:2 -usbdevice tablet -nodefaults -boot menu=on -vga cirrus -device ich9-ahci,id=ahci -drive id=drive-286,if=none,cache=none,aio=native,format=raw,media=disk,file=rbd:hdd/9686a9e6-a495-4ec2-9418-ab2fe87f11cd -device ide-hd,id=drive-device-286,bus=ahci.0,drive=drive-286
The gdb backtrace shows (full output at http://pastie.org/5422842):
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffd97fa700 (LWP 6998)]
0x00007ffff74a6e2e in librbd::AioCompletion::complete() () from /usr/lib/librbd.so.1
(gdb) backtrace
#0 0x00007ffff74a6e2e in librbd::AioCompletion::complete() () from /usr/lib/librbd.so.1
#1 0x00007ffff74a6f4a in librbd::AioCompletion::finish_adding_completions() () from /usr/lib/librbd.so.1
#2 0x00007ffff749f561 in librbd::aio_read(librbd::ImageCtx*, unsigned long, unsigned long, char*, librbd::AioCompletion*) () from /usr/lib/librbd.so.1
...