From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKfp1-0007TH-QH for qemu-devel@nongnu.org; Tue, 26 Mar 2013 22:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKfp0-0006ZL-Jx for qemu-devel@nongnu.org; Tue, 26 Mar 2013 22:10:39 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:56742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKfp0-0006Yr-2m for qemu-devel@nongnu.org; Tue, 26 Mar 2013 22:10:38 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Mar 2013 07:37:44 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id DF567E0053 for ; Wed, 27 Mar 2013 07:42:07 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2R2ASVC53477464 for ; Wed, 27 Mar 2013 07:40:28 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2R2AWhT017549 for ; Wed, 27 Mar 2013 13:10:32 +1100 Message-ID: <51525513.8060503@linux.vnet.ibm.com> Date: Wed, 27 Mar 2013 10:10:27 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <51510CE8.7090208@linux.vnet.ibm.com> <51514856.8010405@redhat.com> <20130326095455.GD24025@stefanha-thinkpad.redhat.com> <51517289.1020909@redhat.com> <20130326162110.GA3391@stefanha-thinkpad.redhat.com> In-Reply-To: <20130326162110.GA3391@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Paolo Bonzini , qemu-devel 于 2013-3-27 0:21, Stefan Hajnoczi 写道: > On Tue, Mar 26, 2013 at 11:03:53AM +0100, Paolo Bonzini wrote: >> 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). > > That's interesting. Maybe it can be fixed if the gthread backend is > actually needed. > > Stefan > If not hard I hope gthread backend works, since it works with gdb and valgrind. I guess with default backend, gdb and valgrind need some tricks to make they work. -- Best Regards Wenchao Xia