All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Peter Lieven <pl@dlh.net>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Corentin Chary <corentin.chary@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	kvm@vger.kernel.org,
	Anthony Liguori <aliguori@linux.vnet.ibm.com>
Subject: Re: [PATCH] vnc: threaded server depends on io-thread
Date: Wed, 09 Mar 2011 12:33:31 +0100	[thread overview]
Message-ID: <4D77658B.8000901@web.de> (raw)
In-Reply-To: <E180D91E-8428-4FB6-8D56-5B619BA37E21@dlh.net>

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

On 2011-03-09 12:32, Peter Lieven wrote:
> 
> Am 09.03.2011 um 12:25 schrieb Jan Kiszka:
> 
>> On 2011-03-09 12:05, Stefan Hajnoczi wrote:
>>> On Wed, Mar 9, 2011 at 10:57 AM, Corentin Chary
>>> <corentin.chary@gmail.com> wrote:
>>>>>> The threaded VNC servers messed up with QEMU fd handlers without
>>>>>> any kind of locking, and that can cause some nasty race conditions.
>>>>>>
>>>>>> The IO-Thread provides appropriate locking primitives to avoid that.
>>>>>> This patch makes CONFIG_VNC_THREAD depends on CONFIG_IO_THREAD,
>>>>>> and add lock and unlock calls around the two faulty calls.
>>>>>
>>>>> qemu-kvm currently doesn't compile with --enable-io-thread. is there an easy fix
>>>>> for this?
>>>>
>>>> If IO Thread is not available, I'm afraid that --disable-vnc-thread is
>>>> the only fix.
>>>> Or, you can try to define some global mutex acting like iothread
>>>> locks, but that doesn't sounds like an easy fix.
>>>
>>> Jan or Marcelo can help here but qemu-kvm has an iothread equivalent
>>> built in by default.  It should be possible to use that.
>>
>> qemu_mutex_lock/unlock_iothread is properly provided in qemu-kvm even
>> without --enable-io-thread. So that tree could temporarily disable the
>> new configure check until we got rid of the special qemu-kvm bits.
>> Corentin's patch is against upstream, that adjustment need to be made
>> once the commit is merged into qemu-kvm.
> 
> do i understand you right, that i should be able to use vnc-thread together with qemu-kvm
> just now if I add Corentin's patch without the io-thread dependency?

Yep.

> 
> if yes, i will do and try if I can force a crash again.
> 

TIA,
Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Peter Lieven <pl@dlh.net>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Anthony Liguori <aliguori@linux.vnet.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Corentin Chary <corentin.chary@gmail.com>,
	kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] vnc: threaded server depends on io-thread
Date: Wed, 09 Mar 2011 12:33:31 +0100	[thread overview]
Message-ID: <4D77658B.8000901@web.de> (raw)
In-Reply-To: <E180D91E-8428-4FB6-8D56-5B619BA37E21@dlh.net>

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

On 2011-03-09 12:32, Peter Lieven wrote:
> 
> Am 09.03.2011 um 12:25 schrieb Jan Kiszka:
> 
>> On 2011-03-09 12:05, Stefan Hajnoczi wrote:
>>> On Wed, Mar 9, 2011 at 10:57 AM, Corentin Chary
>>> <corentin.chary@gmail.com> wrote:
>>>>>> The threaded VNC servers messed up with QEMU fd handlers without
>>>>>> any kind of locking, and that can cause some nasty race conditions.
>>>>>>
>>>>>> The IO-Thread provides appropriate locking primitives to avoid that.
>>>>>> This patch makes CONFIG_VNC_THREAD depends on CONFIG_IO_THREAD,
>>>>>> and add lock and unlock calls around the two faulty calls.
>>>>>
>>>>> qemu-kvm currently doesn't compile with --enable-io-thread. is there an easy fix
>>>>> for this?
>>>>
>>>> If IO Thread is not available, I'm afraid that --disable-vnc-thread is
>>>> the only fix.
>>>> Or, you can try to define some global mutex acting like iothread
>>>> locks, but that doesn't sounds like an easy fix.
>>>
>>> Jan or Marcelo can help here but qemu-kvm has an iothread equivalent
>>> built in by default.  It should be possible to use that.
>>
>> qemu_mutex_lock/unlock_iothread is properly provided in qemu-kvm even
>> without --enable-io-thread. So that tree could temporarily disable the
>> new configure check until we got rid of the special qemu-kvm bits.
>> Corentin's patch is against upstream, that adjustment need to be made
>> once the commit is merged into qemu-kvm.
> 
> do i understand you right, that i should be able to use vnc-thread together with qemu-kvm
> just now if I add Corentin's patch without the io-thread dependency?

Yep.

> 
> if yes, i will do and try if I can force a crash again.
> 

TIA,
Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2011-03-09 11:33 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 22:53 segmentation fault in qemu-kvm-0.14.0 Peter Lieven
2011-03-08 22:53 ` [Qemu-devel] " Peter Lieven
2011-03-09  7:13 ` Corentin Chary
2011-03-09  7:26 ` Stefan Weil
2011-03-09  7:26   ` Stefan Weil
2011-03-09  7:39   ` Michael Tokarev
2011-03-09  7:39     ` Michael Tokarev
2011-03-09  9:22     ` Stefan Weil
2011-03-09  9:22       ` Stefan Weil
2011-03-09 10:00   ` Peter Lieven
2011-03-09 10:00     ` Peter Lieven
2011-03-15 12:53   ` Peter Lieven
2011-03-15 12:53     ` Peter Lieven
2011-03-15 18:52     ` Stefan Weil
2011-03-15 18:52       ` Stefan Weil
2011-03-09  7:37 ` Jan Kiszka
2011-03-09  7:37   ` [Qemu-devel] " Jan Kiszka
2011-03-09  8:50   ` Corentin Chary
2011-03-09  9:04     ` Jan Kiszka
2011-03-09  9:54       ` Corentin Chary
2011-03-09  9:58         ` Jan Kiszka
2011-03-09 10:02           ` Jan Kiszka
2011-03-09 10:06             ` Corentin Chary
2011-03-09 10:12               ` Jan Kiszka
2011-03-09 10:14                 ` Corentin Chary
2011-03-09 10:17                   ` Jan Kiszka
2011-03-09 10:41                     ` [PATCH] vnc: threaded server depends on io-thread Corentin Chary
2011-03-09 10:41                       ` [Qemu-devel] " Corentin Chary
2011-03-09 10:50                       ` Peter Lieven
2011-03-09 10:50                         ` [Qemu-devel] " Peter Lieven
2011-03-09 10:57                         ` Corentin Chary
2011-03-09 10:57                           ` [Qemu-devel] " Corentin Chary
2011-03-09 11:05                           ` Stefan Hajnoczi
2011-03-09 11:05                             ` [Qemu-devel] " Stefan Hajnoczi
2011-03-09 11:25                             ` Jan Kiszka
2011-03-09 11:25                               ` [Qemu-devel] " Jan Kiszka
2011-03-09 11:32                               ` Peter Lieven
2011-03-09 11:32                                 ` [Qemu-devel] " Peter Lieven
2011-03-09 11:33                                 ` Jan Kiszka [this message]
2011-03-09 11:33                                   ` Jan Kiszka
2011-03-09 11:42                       ` Jan Kiszka
2011-03-09 11:42                         ` [Qemu-devel] " Jan Kiszka
2011-03-09 12:50                         ` Peter Lieven
2011-03-09 12:50                           ` [Qemu-devel] " Peter Lieven
2011-03-09 13:21                         ` [PATCH v2] " Corentin Chary
2011-03-09 13:21                           ` [Qemu-devel] " Corentin Chary
2011-03-09 13:42                           ` Corentin Chary
2011-03-09 13:42                             ` [Qemu-devel] " Corentin Chary
2011-03-09 13:51                           ` Paolo Bonzini
2011-03-09 13:51                             ` [Qemu-devel] " Paolo Bonzini
2011-03-09 13:59                             ` Corentin Chary
2011-03-09 13:59                               ` [Qemu-devel] " Corentin Chary
2011-03-10 12:59                         ` [PATCH 1/2] sockets: add qemu_socketpair() Corentin Chary
2011-03-10 12:59                           ` [Qemu-devel] " Corentin Chary
2011-03-10 12:59                         ` [PATCH 2/2] vnc: don't mess up with iohandlers in the vnc thread Corentin Chary
2011-03-10 12:59                           ` [Qemu-devel] " Corentin Chary
2011-03-10 13:06                           ` Paolo Bonzini
2011-03-10 13:06                             ` [Qemu-devel] " Paolo Bonzini
2011-03-10 13:45                             ` Anthony Liguori
2011-03-10 13:45                               ` [Qemu-devel] " Anthony Liguori
2011-03-10 13:54                               ` Corentin Chary
2011-03-10 13:54                                 ` [Qemu-devel] " Corentin Chary
2011-03-10 13:58                                 ` Paolo Bonzini
2011-03-10 13:58                                   ` [Qemu-devel] " Paolo Bonzini
2011-03-10 13:56                               ` Paolo Bonzini
2011-03-10 13:56                                 ` [Qemu-devel] " Paolo Bonzini
2011-03-10 13:47                           ` Peter Lieven
2011-03-10 13:47                             ` [Qemu-devel] " Peter Lieven
2011-03-10 15:13                         ` [PATCH v5] " Corentin Chary
2011-03-10 15:13                           ` [Qemu-devel] " Corentin Chary
2011-03-14  9:19                           ` Corentin Chary
2011-03-14  9:19                             ` [Qemu-devel] " Corentin Chary
2011-03-14  9:55                             ` Peter Lieven
2011-03-14  9:55                               ` [Qemu-devel] " Peter Lieven
2011-03-15 16:55                             ` Peter Lieven
2011-03-15 16:55                               ` [Qemu-devel] " Peter Lieven
2011-03-15 18:07                               ` Peter Lieven
2011-03-15 18:07                                 ` [Qemu-devel] " Peter Lieven
2011-03-09 10:02   ` segmentation fault in qemu-kvm-0.14.0 Peter Lieven
2011-03-09 10:02     ` [Qemu-devel] " Peter Lieven
2011-03-09 10:16   ` Peter Lieven
2011-03-09 10:16     ` [Qemu-devel] " Peter Lieven
2011-03-09 10:20     ` Jan Kiszka
2011-03-09 10:20       ` [Qemu-devel] " Jan Kiszka
2011-03-09 10:31       ` Peter Lieven
2011-03-09 10:31         ` [Qemu-devel] " Peter Lieven
2011-03-09 11:20   ` Paolo Bonzini
2011-03-09 11:20     ` [Qemu-devel] " Paolo Bonzini
2011-03-09 11:44     ` Jan Kiszka
2011-03-09 11:44       ` [Qemu-devel] " Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D77658B.8000901@web.de \
    --to=jan.kiszka@web.de \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=corentin.chary@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=pl@dlh.net \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.