From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKvr1-0005Z7-57 for qemu-devel@nongnu.org; Mon, 31 Oct 2011 13:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKvqy-0007ld-Tj for qemu-devel@nongnu.org; Mon, 31 Oct 2011 13:40:59 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:55876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKvqy-0007lK-KZ for qemu-devel@nongnu.org; Mon, 31 Oct 2011 13:40:56 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate01.web.de (Postfix) with ESMTP id 3CFFC1A2D1409 for ; Mon, 31 Oct 2011 18:40:55 +0100 (CET) Message-ID: <4EAECF62.2050805@web.de> Date: Mon, 31 Oct 2011 17:40:02 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <4E9D42D4.9070901@suse.de> <0B40C867-80E6-4FE1-A346-CAA807378745@logician.com> <4EADD380.1020100@web.de> <20111031163604.GH27570@redhat.com> In-Reply-To: <20111031163604.GH27570@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Problem under OSX Lion: GThread-ERROR **: GThread system may only be initialized once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Juan Pineda Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Am 31.10.2011 17:36, schrieb Daniel P. Berrange: > On Mon, Oct 31, 2011 at 09:25:26AM -0700, Juan Pineda wrote: >> The current Qemu master branch crashes under OSX with a GThread error. >> Commenting out vlc.c line 2188 (call to g_thread_init) allows it to run >> successfully. > > As a general rule all calls to 'g_thread_init(NULL)' should be protected > by a conditional thus: > > if (!g_thread_supported()) > g_thread_init(NULL); > > Even though QEMU calls g_thread_init() very early in main(), there is > always the possibility that some library QEMU links to, has got an ELF > initializer, triggering before main(), which calls g_thread_init(). Thanks to both of you! I checked: vl.c is the only use without such condition. So it seems this regression was introduced through coroutine-gthread.c and is not specific to Darwin. I'll post a patch shortly. Andreas