From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKQjb-0001Wi-Ao for qemu-devel@nongnu.org; Tue, 26 Mar 2013 06:04:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKQjX-00070T-RL for qemu-devel@nongnu.org; Tue, 26 Mar 2013 06:04:03 -0400 Received: from mail-qe0-f42.google.com ([209.85.128.42]:42622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKQjX-00070G-Ma for qemu-devel@nongnu.org; Tue, 26 Mar 2013 06:03:59 -0400 Received: by mail-qe0-f42.google.com with SMTP id da11so2873113qeb.29 for ; Tue, 26 Mar 2013 03:03:58 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51517289.1020909@redhat.com> Date: Tue, 26 Mar 2013 11:03:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <51510CE8.7090208@linux.vnet.ibm.com> <51514856.8010405@redhat.com> <20130326095455.GD24025@stefanha-thinkpad.redhat.com> In-Reply-To: <20130326095455.GD24025@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] coroutine: hung when using gthread backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Wenchao Xia , qemu-devel Il 26/03/2013 10:54, Stefan Hajnoczi ha scritto: > On Tue, Mar 26, 2013 at 08:03:50AM +0100, Paolo Bonzini wrote: >> Il 26/03/2013 03:50, Wenchao Xia ha scritto: >>> When I using tcg with coroutine backend = gthread, >>> x86_64-softmmu/qemu-system-x86_64 will hung. Any one >>> working on it? >> >> coroutine backend gthread hardly works for qemu, only qemu-io and qemu-img. > > Do you know why it doesn't work? Because it screws up the signals. Coroutines can start in a thread and later move to another. If you use the gthread backend, coroutines keep the signal mask of the thread where they were created. It is basically the same bug that was fixed in commit 6ab7e54 (Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp(), 2013-02-20). Paolo