From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] vnc: threaded server depends on io-thread Date: Wed, 09 Mar 2011 12:33:31 +0100 Message-ID: <4D77658B.8000901@web.de> References: <4D77539E.8090509@web.de> <1299667284-15157-1-git-send-email-corentin.chary@gmail.com> <34D09CB3-4BD5-4FF5-B65C-11932CE54503@dlh.net> <4D7763BE.7070002@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigAD22DC8E0675EE5BDBC4B1F5" Cc: Stefan Hajnoczi , Corentin Chary , qemu-devel , kvm@vger.kernel.org, Anthony Liguori To: Peter Lieven Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:58238 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932113Ab1CILdm (ORCPT ); Wed, 9 Mar 2011 06:33:42 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAD22DC8E0675EE5BDBC4B1F5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-09 12:32, Peter Lieven wrote: >=20 > Am 09.03.2011 um 12:25 schrieb Jan Kiszka: >=20 >> On 2011-03-09 12:05, Stefan Hajnoczi wrote: >>> On Wed, Mar 9, 2011 at 10:57 AM, Corentin Chary >>> wrote: >>>>>> The threaded VNC servers messed up with QEMU fd handlers without >>>>>> any kind of locking, and that can cause some nasty race conditions= =2E >>>>>> >>>>>> The IO-Thread provides appropriate locking primitives to avoid tha= t. >>>>>> 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 ther= e 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. >=20 > do i understand you right, that i should be able to use vnc-thread toge= ther with qemu-kvm > just now if I add Corentin's patch without the io-thread dependency? Yep. >=20 > if yes, i will do and try if I can force a crash again. >=20 TIA, Jan --------------enigAD22DC8E0675EE5BDBC4B1F5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk13ZYsACgkQitSsb3rl5xTxhwCgt0wY97okFGI67vG+s5E8ToC1 15wAoKiFTUlxS9cbW02w/hweopVq1UXA =ONkf -----END PGP SIGNATURE----- --------------enigAD22DC8E0675EE5BDBC4B1F5--