All of lore.kernel.org
 help / color / mirror / Atom feed
* KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-07-31 11:59 Stefan Priebe - Profihost AG
  2012-07-31 14:54 ` Avi Kivity
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-07-31 11:59 UTC (permalink / raw)
  To: avi; +Cc: mtosatti, kvm, LKML

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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-07-31 11:59 KVM segfaults with 3.5 while installing ubuntu 12.04 Stefan Priebe - Profihost AG
@ 2012-07-31 14:54 ` Avi Kivity
  2012-07-31 17:30   ` Stefan Priebe
  2012-07-31 17:37   ` Stefan Priebe
  0 siblings, 2 replies; 35+ messages in thread
From: Avi Kivity @ 2012-07-31 14:54 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: mtosatti, kvm, LKML

On 07/31/2012 02:59 PM, Stefan Priebe - Profihost AG wrote:
> 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?
> 

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

-- 
error compiling committee.c: too many arguments to function



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-07-31 14:54 ` Avi Kivity
@ 2012-07-31 17:30   ` Stefan Priebe
  2012-07-31 17:37   ` Stefan Priebe
  1 sibling, 0 replies; 35+ messages in thread
From: Stefan Priebe @ 2012-07-31 17:30 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 31.07.2012 16:54, schrieb Avi Kivity:
> On 07/31/2012 02:59 PM, Stefan Priebe - Profihost AG wrote:
>> 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?
>>
> 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-07-31 14:54 ` Avi Kivity
  2012-07-31 17:30   ` Stefan Priebe
@ 2012-07-31 17:37   ` Stefan Priebe
  2012-08-01  8:44     ` Avi Kivity
  1 sibling, 1 reply; 35+ messages in thread
From: Stefan Priebe @ 2012-07-31 17:37 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-07-31 17:37   ` Stefan Priebe
@ 2012-08-01  8:44     ` Avi Kivity
  2012-08-01  9:24       ` Stefan Priebe - Profihost AG
  0 siblings, 1 reply; 35+ messages in thread
From: Avi Kivity @ 2012-08-01  8:44 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: mtosatti, kvm, LKML

On 07/31/2012 08:37 PM, Stefan Priebe wrote:
> 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)

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).


-- 
error compiling committee.c: too many arguments to function



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  8:44     ` Avi Kivity
@ 2012-08-01  9:24       ` Stefan Priebe - Profihost AG
  2012-08-01  9:33         ` Avi Kivity
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-01  9:24 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

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:
> On 07/31/2012 08:37 PM, Stefan Priebe wrote:
>> 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)
>
> 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).
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  9:24       ` Stefan Priebe - Profihost AG
@ 2012-08-01  9:33         ` Avi Kivity
  2012-08-01  9:42           ` Stefan Priebe - Profihost AG
  0 siblings, 1 reply; 35+ messages in thread
From: Avi Kivity @ 2012-08-01  9:33 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: mtosatti, kvm, LKML

On 08/01/2012 12:24 PM, Stefan Priebe - Profihost AG wrote:
> 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?


-- 
error compiling committee.c: too many arguments to function



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  9:33         ` Avi Kivity
@ 2012-08-01  9:42           ` Stefan Priebe - Profihost AG
  2012-08-01  9:53             ` Avi Kivity
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-01  9:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 01.08.2012 11:33, schrieb Avi Kivity:
>> 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  9:42           ` Stefan Priebe - Profihost AG
@ 2012-08-01  9:53             ` Avi Kivity
  2012-08-01 11:29               ` Stefan Priebe - Profihost AG
  2012-08-05 10:08               ` Stefan Priebe
  0 siblings, 2 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-01  9:53 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: mtosatti, kvm, LKML

On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>> 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.


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  9:53             ` Avi Kivity
@ 2012-08-01 11:29               ` Stefan Priebe - Profihost AG
  2012-08-01 15:15                 ` Avi Kivity
  2012-08-05 10:08               ` Stefan Priebe
  1 sibling, 1 reply; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-01 11:29 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 01.08.2012 11:53, schrieb Avi Kivity:
> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>> 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.

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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01 11:29               ` Stefan Priebe - Profihost AG
@ 2012-08-01 15:15                 ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-01 15:15 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: mtosatti, kvm, LKML

On 08/01/2012 02:29 PM, Stefan Priebe - Profihost AG wrote:

>> 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?

> 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.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-01  9:53             ` Avi Kivity
  2012-08-01 11:29               ` Stefan Priebe - Profihost AG
@ 2012-08-05 10:08               ` Stefan Priebe
  2012-08-05 10:29                 ` Avi Kivity
  1 sibling, 1 reply; 35+ messages in thread
From: Stefan Priebe @ 2012-08-05 10:08 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 01.08.2012 11:53, schrieb Avi Kivity:
> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>> 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.

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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-05 10:08               ` Stefan Priebe
@ 2012-08-05 10:29                 ` Avi Kivity
  2012-08-05 15:52                   ` Stefan Priebe
  0 siblings, 1 reply; 35+ messages in thread
From: Avi Kivity @ 2012-08-05 10:29 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: mtosatti, kvm, LKML

On 08/05/2012 01:08 PM, Stefan Priebe wrote:
> Am 01.08.2012 11:53, schrieb Avi Kivity:
>> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>>> 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.
> 
> 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?

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-05 10:29                 ` Avi Kivity
@ 2012-08-05 15:52                   ` Stefan Priebe
  2012-08-05 19:00                     ` Stefan Priebe
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe @ 2012-08-05 15:52 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 05.08.2012 12:29, schrieb Avi Kivity:
> On 08/05/2012 01:08 PM, Stefan Priebe wrote:
>> Am 01.08.2012 11:53, schrieb Avi Kivity:
>>> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>>>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>>>> 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.
>>
>> 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

> Which iso image are you running?
ubuntu-12.04-server-amd64.iso

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-05 15:52                   ` Stefan Priebe
@ 2012-08-05 19:00                     ` Stefan Priebe
  2012-08-06  8:36                       ` Avi Kivity
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe @ 2012-08-05 19:00 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

Am 05.08.2012 17:52, schrieb Stefan Priebe:
> Am 05.08.2012 12:29, schrieb Avi Kivity:
>> On 08/05/2012 01:08 PM, Stefan Priebe wrote:
>>> Am 01.08.2012 11:53, schrieb Avi Kivity:
>>>> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>>>>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>>>>> 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-05 19:00                     ` Stefan Priebe
@ 2012-08-06  8:36                       ` Avi Kivity
  2012-08-06  8:46                         ` Stefan Priebe - Profihost AG
  0 siblings, 1 reply; 35+ messages in thread
From: Avi Kivity @ 2012-08-06  8:36 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: mtosatti, kvm, LKML

On 08/05/2012 10:00 PM, Stefan Priebe wrote:
> Am 05.08.2012 17:52, schrieb Stefan Priebe:
>> Am 05.08.2012 12:29, schrieb Avi Kivity:
>>> On 08/05/2012 01:08 PM, Stefan Priebe wrote:
>>>> Am 01.08.2012 11:53, schrieb Avi Kivity:
>>>>> On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote:
>>>>>> Am 01.08.2012 11:33, schrieb Avi Kivity:
>>>>>>>> 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.
> 

Slow?  what does 'info kvm' say?

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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06  8:36                       ` Avi Kivity
@ 2012-08-06  8:46                         ` Stefan Priebe - Profihost AG
  2012-08-06 12:12                             ` [Qemu-devel] " Avi Kivity
  0 siblings, 1 reply; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-06  8:46 UTC (permalink / raw)
  To: Avi Kivity; +Cc: mtosatti, kvm, LKML

 >Am 06.08.2012 10:36, schrieb Avi Kivity:
> On 08/05/2012 10:00 PM, Stefan Priebe wrote:
>>>>>>>>> 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.
>>
>
> Slow?  what does 'info kvm' say?

Will recheck right now i'm running 1.1.1 again.

> 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06  8:46                         ` Stefan Priebe - Profihost AG
@ 2012-08-06 12:12                             ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:12 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf, Stefan Hajnoczi

On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:

> 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)

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 12:12                             ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:12 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:

> 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)

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06 12:12                             ` [Qemu-devel] " Avi Kivity
  (?)
@ 2012-08-06 12:37                               ` Avi Kivity
  -1 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:37 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf, Stefan Hajnoczi

On 08/06/2012 03:12 PM, Avi Kivity wrote:
> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
> 
>> 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)
> 

The following ought to fix it:


From: Avi Kivity <avi@redhat.com>
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.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Avi Kivity <avi@redhat.com>

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index f21757e..552b3b6 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 12:37                               ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:37 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

On 08/06/2012 03:12 PM, Avi Kivity wrote:
> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
> 
>> 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)
> 

The following ought to fix it:


From: Avi Kivity <avi@redhat.com>
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.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Avi Kivity <avi@redhat.com>

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index f21757e..552b3b6 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 12:37                               ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:37 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

On 08/06/2012 03:12 PM, Avi Kivity wrote:
> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
> 
>> 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)
> 

The following ought to fix it:


From: Avi Kivity <avi@redhat.com>
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.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Avi Kivity <avi@redhat.com>

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index f21757e..552b3b6 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06 12:37                               ` Avi Kivity
  (?)
@ 2012-08-06 12:48                                 ` Avi Kivity
  -1 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:48 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf, Stefan Hajnoczi

On 08/06/2012 03:37 PM, Avi Kivity wrote:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>> 
>>> 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)
>> 
> 
> The following ought to fix it:

It does.

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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 12:48                                 ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:48 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

On 08/06/2012 03:37 PM, Avi Kivity wrote:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>> 
>>> 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)
>> 
> 
> The following ought to fix it:

It does.

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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 12:48                                 ` Avi Kivity
  0 siblings, 0 replies; 35+ messages in thread
From: Avi Kivity @ 2012-08-06 12:48 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

On 08/06/2012 03:37 PM, Avi Kivity wrote:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>> 
>>> 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)
>> 
> 
> The following ought to fix it:

It does.

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


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06 12:37                               ` Avi Kivity
@ 2012-08-06 13:11                                 ` Stefan Priebe - Profihost AG
  -1 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-06 13:11 UTC (permalink / raw)
  To: Avi Kivity
  Cc: mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf, Stefan Hajnoczi

can confirm - this fixed it!
Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> 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)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> 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.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-06 13:11                                 ` Stefan Priebe - Profihost AG
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-08-06 13:11 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

can confirm - this fixed it!
Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> 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)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> 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.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-06 12:37                               ` Avi Kivity
@ 2012-08-08  5:51                                 ` Stefan Priebe
  -1 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe @ 2012-08-08  5:51 UTC (permalink / raw)
  To: Avi Kivity
  Cc: mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf, Stefan Hajnoczi

Any news? Was this applied upstream?

Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> 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)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> 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.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-08  5:51                                 ` Stefan Priebe
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe @ 2012-08-08  5:51 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, mtosatti, qemu-devel, linux-kernel

Any news? Was this applied upstream?

Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> 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)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> 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.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-08  5:51                                 ` [Qemu-devel] " Stefan Priebe
@ 2012-08-08  8:06                                   ` Stefan Hajnoczi
  -1 siblings, 0 replies; 35+ messages in thread
From: Stefan Hajnoczi @ 2012-08-08  8:06 UTC (permalink / raw)
  To: Stefan Priebe
  Cc: Avi Kivity, mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf

On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
> 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


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-08  8:06                                   ` Stefan Hajnoczi
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Hajnoczi @ 2012-08-08  8:06 UTC (permalink / raw)
  To: Stefan Priebe
  Cc: Kevin Wolf, kvm, mtosatti, linux-kernel, qemu-devel, Avi Kivity

On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
> 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-08  8:06                                   ` [Qemu-devel] " Stefan Hajnoczi
@ 2012-08-08  8:29                                     ` Stefan Priebe
  -1 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe @ 2012-08-08  8:29 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Avi Kivity, mtosatti, kvm, qemu-devel, linux-kernel, Kevin Wolf

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

Stefan

Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:
> On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
>> 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
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-08  8:29                                     ` Stefan Priebe
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Priebe @ 2012-08-08  8:29 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, kvm, mtosatti, linux-kernel, qemu-devel, Avi Kivity

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

Stefan

Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:
> On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
>> 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
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: KVM segfaults with 3.5 while installing ubuntu 12.04
  2012-08-08  8:29                                     ` [Qemu-devel] " Stefan Priebe
@ 2012-08-10 15:14                                       ` Stefan Hajnoczi
  -1 siblings, 0 replies; 35+ messages in thread
From: Stefan Hajnoczi @ 2012-08-10 15:14 UTC (permalink / raw)
  To: Michael Roth
  Cc: Stefan Hajnoczi, Avi Kivity, mtosatti, kvm, qemu-devel,
	linux-kernel, Kevin Wolf, Stefan Priebe

On Wed, Aug 8, 2012 at 9:29 AM, Stefan Priebe <s.priebe@profihost.ag> wrote:
> 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

>
> Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:
>
>> On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
>>>
>>> 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
>>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
@ 2012-08-10 15:14                                       ` Stefan Hajnoczi
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Hajnoczi @ 2012-08-10 15:14 UTC (permalink / raw)
  To: Michael Roth
  Cc: Kevin Wolf, Stefan Hajnoczi, kvm, Stefan Priebe, mtosatti,
	qemu-devel, linux-kernel, Avi Kivity

On Wed, Aug 8, 2012 at 9:29 AM, Stefan Priebe <s.priebe@profihost.ag> wrote:
> 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

>
> Am 08.08.2012 10:06, schrieb Stefan Hajnoczi:
>
>> On Wed, Aug 08, 2012 at 07:51:07AM +0200, Stefan Priebe wrote:
>>>
>>> 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
>>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-08-10 15:15 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-31 11:59 KVM segfaults with 3.5 while installing ubuntu 12.04 Stefan Priebe - Profihost AG
2012-07-31 14:54 ` Avi Kivity
2012-07-31 17:30   ` Stefan Priebe
2012-07-31 17:37   ` Stefan Priebe
2012-08-01  8:44     ` Avi Kivity
2012-08-01  9:24       ` Stefan Priebe - Profihost AG
2012-08-01  9:33         ` Avi Kivity
2012-08-01  9:42           ` Stefan Priebe - Profihost AG
2012-08-01  9:53             ` Avi Kivity
2012-08-01 11:29               ` Stefan Priebe - Profihost AG
2012-08-01 15:15                 ` Avi Kivity
2012-08-05 10:08               ` Stefan Priebe
2012-08-05 10:29                 ` Avi Kivity
2012-08-05 15:52                   ` Stefan Priebe
2012-08-05 19:00                     ` Stefan Priebe
2012-08-06  8:36                       ` Avi Kivity
2012-08-06  8:46                         ` Stefan Priebe - Profihost AG
2012-08-06 12:12                           ` Avi Kivity
2012-08-06 12:12                             ` [Qemu-devel] " Avi Kivity
2012-08-06 12:37                             ` Avi Kivity
2012-08-06 12:37                               ` [Qemu-devel] " Avi Kivity
2012-08-06 12:37                               ` Avi Kivity
2012-08-06 12:48                               ` Avi Kivity
2012-08-06 12:48                                 ` [Qemu-devel] " Avi Kivity
2012-08-06 12:48                                 ` Avi Kivity
2012-08-06 13:11                               ` Stefan Priebe - Profihost AG
2012-08-06 13:11                                 ` [Qemu-devel] " Stefan Priebe - Profihost AG
2012-08-08  5:51                               ` Stefan Priebe
2012-08-08  5:51                                 ` [Qemu-devel] " Stefan Priebe
2012-08-08  8:06                                 ` Stefan Hajnoczi
2012-08-08  8:06                                   ` [Qemu-devel] " Stefan Hajnoczi
2012-08-08  8:29                                   ` Stefan Priebe
2012-08-08  8:29                                     ` [Qemu-devel] " Stefan Priebe
2012-08-10 15:14                                     ` Stefan Hajnoczi
2012-08-10 15:14                                       ` [Qemu-devel] " Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.