From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWqp2-0006je-P4 for qemu-devel@nongnu.org; Wed, 15 Jun 2011 10:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWqoy-0000cc-2y for qemu-devel@nongnu.org; Wed, 15 Jun 2011 10:11:56 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:48693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWqox-0000cO-Nz for qemu-devel@nongnu.org; Wed, 15 Jun 2011 10:11:51 -0400 Received: by pzk30 with SMTP id 30so290759pzk.4 for ; Wed, 15 Jun 2011 07:11:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DF86174.7090406@siemens.com> References: <1308115231-33690-1-git-send-email-cerbere@gmail.com> <4DF86174.7090406@siemens.com> From: Alexandre Raymond Date: Wed, 15 Jun 2011 10:11:30 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread is enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "pbonzini@redhat.com" , "andreas.faerber@web.de" , "qemu-devel@nongnu.org" , "agraf@suse.de" Hi Jan, > Why? Ahh, because of qemu_cpu_kick_self: raise(SIG_IPI)! That should > generate a per-process SIG_IPI. And that may not only affect Darwin. > Looks good. Actually, with io-thread enabled, it goes through qemu_cpu_kick_self() -> qemu_cpu_kick_thread() -> pthread_kill(..., SIG_IPI). I think the problem is with sigwait(). It doesn't state so in the Linux or Darwin man pages, but on Solaris, it says : "All signals identified by the set argument must be blocked on all threads, including the calling thread; otherwise, sigwait() might not work correctly", which might correspond to the issue I've been witnessing (ie: sigwait() unblocking once in a while on a SIGUSR1 (SIG_IPI) in the event thread). In any case, I don't think it should attempt to catch this signal at all since the cpu thread is already catching it. Alexandre