[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread i
From: |
Alexandre Raymond |
Subject: |
Re: [Qemu-devel] [PATCH] Fix signal handling of SIG_IPI when io-thread is enabled |
Date: |
Wed, 15 Jun 2011 10:11:30 -0400 |
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