Skip to contentSkip to conversation

KVM segfaults with 3.5 while installing ubuntu 12.04

DISCUSSION Stefan Priebe - Profihost AG 4 participants 25 messages Jul 31, 2012 – Aug 10, 2012 KVM

lore
Share & tools
lore
#0 lore raw

Hello list,

i hope it is correct to list the maintainers of kvm. While trying to install ubuntu 12.04 amd64 on a kvm based vm the KVM process segfaults while ubuntu tries to detect the HW:
kvm[2978]: segfault at 7fb90d9035e0 ip 00007fb90d9035e0 sp00007fff652e4ed8 error 15

This does not happen with a rhel6 based 2.6.32 kernel so i thought this must be a bug in vanilla 3.5.0 kernel.

Is this known? What information do you need?

Thanks!

Greets
Stefan

#1 lore raw
Quoted 8 lines · Stefan Priebe - Profihost AG

Hello list,

i hope it is correct to list the maintainers of kvm. While trying to install ubuntu 12.04 amd64 on a kvm based vm the KVM process segfaults while ubuntu tries to detect the HW:
kvm[2978]: segfault at 7fb90d9035e0 ip 00007fb90d9035e0 sp00007fff652e4ed8 error 15

Quoted 5 lines

This does not happen with a rhel6 based 2.6.32 kernel so i thought this must be a bug in vanilla 3.5.0 kernel.

Is this known? What information do you need?

Please build qemu with debug information, generate a core, and post a backtrace.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw

Am 31.07.2012 16:54, schrieb Avi Kivity:

Quoted 9 lines · Stefan Priebe - Profihost AG
Quoted 8 lines

Hello list,

i hope it is correct to list the maintainers of kvm. While trying to install ubuntu 12.04 amd64 on a kvm based vm the KVM process segfaults while ubuntu tries to detect the HW:
kvm[2978]: segfault at 7fb90d9035e0 ip 00007fb90d9035e0 sp00007fff652e4ed8 error 15

Quoted 7 lines
Quoted 5 lines

This does not happen with a rhel6 based 2.6.32 kernel so i thought this must be a bug in vanilla 3.5.0 kernel.

Is this known? What information do you need?

Please build qemu with debug information, generate a core, and post a backtrace.

mhm tried that but i can't get it to work:

gdb /usr/bin/qemu-system-x86_64 /core

GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...

warning: The current binary is a PIE (Position Independent Executable), which GDB does NOT currently support. Most debugger features will fail if used in this session.

Reading symbols from /usr/bin/qemu-system-x86_64...done.

warning: core file may not match specified executable file.
[New Thread 2222]
[New Thread 1809]
[New Thread 1811]
[New Thread 1807]
[New Thread 1812]
[New Thread 1810]
[New Thread 1813]
[New Thread 1806]
[New Thread 1808]
Core was generated by `/usr/bin/qemu-system-x86_64 -id 103 -chardev socket,id=qmp,path=/var/run/qemu-s'. Program terminated with signal 11, Segmentation fault.
#0 0x00007f6ca10faed8 in ?? ()
(gdb) where

#0  0x00007f6ca10faed8 in ?? ()
#1  0x00007f6ca54e0098 in ?? ()
#2  0x00007f6ca10faf18 in ?? ()
#3  0x00007f6ca10fae98 in ?? ()
#4  0x00007fffc18a5330 in ?? ()
#5  0x40620711c948c800 in ?? ()
#6  0x00007fffc18a51f0 in ?? ()
#7  0x00007f6ca54e0e25 in ?? ()
#8  0x00007f6ca10faf18 in ?? ()
#9  0x00007f6ca10fae98 in ?? ()

#10 0x0000000000000000 in ?? ()

Greets,
Stefan

#3 lore raw
In reply to Avi Kivity

Now i got it working - sorry used old gdb.

This is the backtrace:

Core was generated by `/usr/bin/qemu-system-x86_64 -id 103 -chardev socket,id=qmp,path=/var/run/qemu-s'. Program terminated with signal 11, Segmentation fault.
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
(gdb) where
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
#1 0x00007f6ca54e0098 in virtio_notify_vector (vdev=0x7f6ca10fae98, vector=32620)

    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:493
#2  0x00007f6ca54e0e25 in virtio_notify (vdev=0x7f6ca10fae98, vq=0x7f6ca10faf18) at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:739
#3  0x00007f6ca54d5bb0 in virtio_blk_req_complete (req=0x7f6ca6fe4440, status=0)
    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio-blk.c:62
#4  0x00007f6ca54d630b in virtio_blk_handle_scsi (req=0x7f6ca6fe4440) at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio-blk.c:263
#5  0x00007f6ca54d6961 in virtio_blk_handle_request (req=0x7f6ca6fe4440, mrb=0x7fffc18a5330)
    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio-blk.c:385
#6  0x00007f6ca54d6b0f in virtio_blk_handle_output (vdev=0x7f6ca6fb3a70, vq=0x7f6ca6fb3b40)
    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio-blk.c:418
#7  0x00007f6ca54e096e in virtio_queue_notify_vq (vq=0x7f6ca6fb3b40) at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:648
#8  0x00007f6ca533aa5f in virtio_pci_host_notifier_read (opaque=0x7f6ca6fb3b40)
    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio-pci.c:197
#9  0x00007f6ca528950e in qemu_iohandler_poll (readfds=0x7f6ca5ca7a20, writefds=0x7f6ca5ca7aa0, xfds=0x7f6ca5ca7b20, ret=1)
    at iohandler.c:121

#10 0x00007f6ca534d706 in main_loop_wait (nonblocking=0) at main-loop.c:497
#11 0x00007f6ca534022c in main_loop () at /root/src/pve-qemu-kvm/qemu-kvm/vl.c:1569
#12 0x00007f6ca53471ae in main (argc=39, argv=0x7fffc18a5ee8, envp=0x7fffc18a6028) at /root/src/pve-qemu-kvm/qemu-kvm/vl.c:3745

Stefan

#4 lore raw
Quoted 12 lines · Stefan Priebe

Now i got it working - sorry used old gdb.

This is the backtrace:

Core was generated by `/usr/bin/qemu-system-x86_64 -id 103 -chardev socket,id=qmp,path=/var/run/qemu-s'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
(gdb) where
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
#1 0x00007f6ca54e0098 in virtio_notify_vector (vdev=0x7f6ca10fae98, vector=32620)

Quoted 5 lines
    at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:493

#2 0x00007f6ca54e0e25 in virtio_notify (vdev=0x7f6ca10fae98, vq=0x7f6ca10faf18) at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:739 #3 0x00007f6ca54d5bb0 in virtio_blk_req_complete (req=0x7f6ca6fe4440, status=0)

I notice the ip is different from the first trace. Please run this a few more times and see if it always fails in the same place, or in random places (and post the traces please).

Signature · 1 line
error compiling committee.c: too many arguments to function
#5 lore raw

Hi,

ok i found a faster way to trigger this. Just boot the ubuntu rescue system.

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

Thanks!

Stefan

Am 01.08.2012 10:44, schrieb Avi Kivity:

Quoted 24 lines · Stefan Priebe
Quoted 12 lines

Now i got it working - sorry used old gdb.

This is the backtrace:

Core was generated by `/usr/bin/qemu-system-x86_64 -id 103 -chardev socket,id=qmp,path=/var/run/qemu-s'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
(gdb) where
#0 0x00007f6ca10faed8 in ?? () from /lib/libc.so.6
#1 0x00007f6ca54e0098 in virtio_notify_vector (vdev=0x7f6ca10fae98, vector=32620)

Quoted 5 lines
     at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:493

#2 0x00007f6ca54e0e25 in virtio_notify (vdev=0x7f6ca10fae98, vq=0x7f6ca10faf18) at /root/src/pve-qemu-kvm/qemu-kvm/hw/virtio.c:739 #3 0x00007f6ca54d5bb0 in virtio_blk_req_complete (req=0x7f6ca6fe4440, status=0)

I notice the ip is different from the first trace. Please run this a few more times and see if it always fails in the same place, or in random places (and post the traces please).

#6 lore raw
Quoted 9 lines · Stefan Priebe - Profihost AG

Hi,

ok i found a faster way to trigger this. Just boot the ubuntu rescue system.

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

Signature · 1 line
error compiling committee.c: too many arguments to function
#7 lore raw

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

Stefan

#8 lore raw
Quoted 10 lines · Stefan Priebe - Profihost AG

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

Signature · 1 line
error compiling committee.c: too many arguments to function
#9 lore raw

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 9 lines · Stefan Priebe - Profihost AG
Quoted 8 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

Quoted 7 lines
Quoted 2 lines

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

Can't get the latest version running. 1st it doesn't know the -id parameter. 2nd parameter -vnc unix:/var/run/qemu-server/103.vnc,x509,password does not work too => No certificate path provided

Stefan

#10 lore raw
Quoted 4 lines · Stefan Priebe - Profihost AG
Quoted 1 line

Please try qemu-kvm.git master and report.

Can't get the latest version running. 1st it doesn't know the -id parameter.

I don't know it either, what is it?

Quoted 3 lines

2nd parameter -vnc unix:/var/run/qemu-server/103.vnc,x509,password does not work too => No certificate path provided

@item x509-dir=<dir>
Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir

@item x509-key-file=<file>
@item x509-key-password=<file>
@item x509-cert-file=<file>
@item x509-cacert-file=<file>
@item x509-dh-key-file=<file>
The x509 file names can also be configured individually.

These also exist in 1.1. I wonder how it worked without the certificates.

Signature · 1 line
error compiling committee.c: too many arguments to function
#11 lore raw
In reply to Avi Kivity

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 9 lines · Stefan Priebe - Profihost AG
Quoted 8 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

Quoted 7 lines
Quoted 2 lines

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

qemu-kvm.git master just hangs after the 2nd screen with using 100% CPU and doing nothing... so i can't test with qemu-kvm.master

Stefan

#12 lore raw
Quoted 13 lines · Stefan Priebe

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 12 lines · Stefan Priebe - Profihost AG
Quoted 10 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

Quoted 7 lines
Quoted 4 lines

This could be due to a kernel bug, or due to a different code path taken in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

qemu-kvm.git master just hangs after the 2nd screen with using 100% CPU and doing nothing... so i can't test with qemu-kvm.master

Please provide your command line and I will try to reproduce.

Which iso image are you running?

Signature · 1 line
error compiling committee.c: too many arguments to function
#13 lore raw

Am 05.08.2012 12:29, schrieb Avi Kivity:

Quoted 17 lines · Stefan Priebe
Quoted 16 lines

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 15 lines · Stefan Priebe - Profihost AG
Quoted 10 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken in qemu because of differing features exposed to kvm.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Please try qemu-kvm.git master and report.

qemu-kvm.git master just hangs after the 2nd screen with using 100% CPU and doing nothing... so i can't test with qemu-kvm.master

Please provide your command line and I will try to reproduce.

ulimit -c unlimited; /usr/bin/qemu-x86_64 -chardev socket,id=qmp,path=/var/run/qemu-server/103.qmp,server,nowait -mon chardev=qmp,mode=control -pidfile /var/run/qemu-server/103.pid -daemonize -usbdevice tablet -name kvmcrash -smp sockets=1,cores=8 -nodefaults -boot menu=on -vga cirrus -k de -drive file=/dev/VGiSCSItarget0/vm-103-disk-1,if=none,id=drive-virtio0,aio=native,cache=none -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -drive file=/var/lib/vz/template/iso/ubuntu-12.04-server-amd64.iso,if=none,id=drive-ide0,media=cdrom,aio=native -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=200 -m 4096 -netdev type=tap,id=net0,ifname=tap103i0,script=/var/lib/qemu-server/pve-bridge,vhost=on -device virtio-net-pci,mac=BA:5B:86:AD:14:3A,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300

Quoted 1 line

Which iso image are you running?

ubuntu-12.04-server-amd64.iso

#14 lore raw

Am 05.08.2012 17:52, schrieb Stefan Priebe:

Quoted 20 lines

Am 05.08.2012 12:29, schrieb Avi Kivity:

Quoted 19 lines · Stefan Priebe
Quoted 18 lines

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 17 lines · Stefan Priebe - Profihost AG
Quoted 10 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken
in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

OK got it running it's just awfully slow and i was too impatient. It crashes at the part as 1.1.1 stable.

Stefan

#15 lore raw
Quoted 16 lines · Stefan Priebe

Am 05.08.2012 17:52, schrieb Stefan Priebe:

Quoted 15 lines

Am 05.08.2012 12:29, schrieb Avi Kivity:

Quoted 14 lines · Stefan Priebe
Quoted 13 lines

Am 01.08.2012 11:53, schrieb Avi Kivity:

Quoted 12 lines · Stefan Priebe - Profihost AG
Quoted 10 lines

Am 01.08.2012 11:33, schrieb Avi Kivity:

Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

This could be due to a kernel bug, or due to a different code path taken
in qemu because of differing features exposed to kvm.

Please try qemu-kvm.git master and report.

OK got it running it's just awfully slow and i was too impatient. It crashes at the part as 1.1.1 stable.

Slow? what does 'info kvm' say?

I got master running and it wasn't particularly slow. I'll try 1.1.1 too.

Signature · 1 line
error compiling committee.c: too many arguments to function
#16 lore raw
Quoted 16 lines

Am 06.08.2012 10:36, schrieb Avi Kivity:

Quoted 14 lines · Stefan Priebe
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

So here are 3 backtraces from booting the rescue system:
http://pastebin.com/raw.php?i=xCy2pEcP

To me they all look the same.

They are. What version of qemu are you using?

latest stable-1.1 branch (1.1.1) - which works fine with latest RHEL6 kernel.

This could be due to a kernel bug, or due to a different code path taken
in qemu because of differing features exposed to kvm.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Please try qemu-kvm.git master and report.

OK got it running it's just awfully slow and i was too impatient. It crashes at the part as 1.1.1 stable.

Slow? what does 'info kvm' say?

Will recheck right now i'm running 1.1.1 again.

Quoted 1 line

I got master running and it wasn't particularly slow. I'll try 1.1.1 too.

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

What can we do about the core dump and crash?

Stefan

#17 lore raw
Quoted 5 lines · Stefan Priebe - Profihost AG

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

What can we do about the core dump and crash?

Okay, I reproduced it; it seems aio=native is the culprit. You can try aio=threads as a workaround.

Copying some relevant people (context: aio=native on qemu-kvm-1.1.1 segfaults pretty early during guest install)

Signature · 1 line
error compiling committee.c: too many arguments to function
#18 lore raw
Quoted 6 lines · Avi Kivity
Quoted 4 lines · Stefan Priebe - Profihost AG

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

Quoted 8 lines
Quoted 1 line

What can we do about the core dump and crash?

Okay, I reproduced it; it seems aio=native is the culprit. You can try aio=threads as a workaround.

Copying some relevant people (context: aio=native on qemu-kvm-1.1.1 segfaults pretty early during guest install)

The following ought to fix it:

From: Avi Kivity <[email protected]>
Date: Mon, 6 Aug 2012 15:35:02 +0300
Subject: [PATCH] virtio-mlk: fix use-after-free while handling scsi commands

The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.

Reprducible by running a guest with aio=native on a block device.

hw/virtio-blk.c +1 -0
index f21757e..552b3b6 100644
@@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
 
     virtio_blk_req_complete(req, status);
     g_free(req);
+    return;
 #else
     abort();
 #endif
Signature · 1 line
error compiling committee.c: too many arguments to function
#19 lore raw
Quoted 9 lines · Avi Kivity
Quoted 8 lines · Avi Kivity
Quoted 5 lines · Stefan Priebe - Profihost AG

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

What can we do about the core dump and crash?

Quoted 8 lines
Quoted 6 lines

Okay, I reproduced it; it seems aio=native is the culprit. You can try aio=threads as a workaround.

Copying some relevant people (context: aio=native on qemu-kvm-1.1.1 segfaults pretty early during guest install)

The following ought to fix it:

It does.

Kevin: despite aio=native, I get iothreads and pwrites, something is broken.

Signature · 1 line
error compiling committee.c: too many arguments to function
#20 lore raw
In reply to Avi Kivity

can confirm - this fixed it!
Am 06.08.2012 14:37, schrieb Avi Kivity:

Quoted 45 lines · Avi Kivity
Quoted 6 lines · Stefan Priebe - Profihost AG
Quoted 5 lines

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

Quoted 8 lines
Quoted 1 line

What can we do about the core dump and crash?

Okay, I reproduced it; it seems aio=native is the culprit. You can try aio=threads as a workaround.

Copying some relevant people (context: aio=native on qemu-kvm-1.1.1 segfaults pretty early during guest install)

The following ought to fix it:

From: Avi Kivity <[email protected]>
Date: Mon, 6 Aug 2012 15:35:02 +0300
Subject: [PATCH] virtio-mlk: fix use-after-free while handling scsi commands

The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.

Reprducible by running a guest with aio=native on a block device.

hw/virtio-blk.c +1 -0
index f21757e..552b3b6 100644
@@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
 
      virtio_blk_req_complete(req, status);
      g_free(req);
+    return;
  #else
      abort();
  #endif
#21 lore raw
In reply to Avi Kivity

Any news? Was this applied upstream?

Am 06.08.2012 14:37, schrieb Avi Kivity:

Quoted 45 lines · Avi Kivity
Quoted 6 lines · Stefan Priebe - Profihost AG
Quoted 5 lines

But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here.

Quoted 8 lines
Quoted 1 line

What can we do about the core dump and crash?

Okay, I reproduced it; it seems aio=native is the culprit. You can try aio=threads as a workaround.

Copying some relevant people (context: aio=native on qemu-kvm-1.1.1 segfaults pretty early during guest install)

The following ought to fix it:

From: Avi Kivity <[email protected]>
Date: Mon, 6 Aug 2012 15:35:02 +0300
Subject: [PATCH] virtio-mlk: fix use-after-free while handling scsi commands

The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free.

Reprducible by running a guest with aio=native on a block device.

hw/virtio-blk.c +1 -0
index f21757e..552b3b6 100644
@@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
 
      virtio_blk_req_complete(req, status);
      g_free(req);
+    return;
  #else
      abort();
  #endif
#22 lore raw
Quoted 1 line · Stefan Priebe

Any news? Was this applied upstream?

Kevin is ill. He has asked me to review and test patches in his absence. When he gets back later this week this will get picked up (and included in QEMU 1.2).

Here is the tree, it includes this patch:

https://github.com/stefanha/qemu/commits/for-kevin

Stefan

#23 lore raw

ah OK - thanks. Will there be a fixed 1.1.2 as well?

Stefan

Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:

Quoted 13 lines · Stefan Priebe
Quoted 1 line

Any news? Was this applied upstream?

Kevin is ill. He has asked me to review and test patches in his absence. When he gets back later this week this will get picked up (and included in QEMU 1.2).

Here is the tree, it includes this patch:

https://github.com/stefanha/qemu/commits/for-kevin

Stefan

#24 lore raw
Quoted 1 line · Stefan Priebe

ah OK - thanks. Will there be a fixed 1.1.2 as well?

mdroth: Kevin has the fix in his block branch, which means qemu.git will get it soon. Here's the commit:

http://repo.or.cz/w/qemu/kevin.git/commit/730a9c53b4e52681fcfe31cf38854cbf91e132c7

Quoted 22 lines

Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:

Quoted 9 lines · Stefan Priebe
Quoted 2 lines

Any news? Was this applied upstream?

Kevin is ill. He has asked me to review and test patches in his absence. When he gets back later this week this will get picked up (and included in QEMU 1.2).

Quoted 6 lines

Here is the tree, it includes this patch:

https://github.com/stefanha/qemu/commits/for-kevin

Stefan

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html