[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] coroutine-ucontext broken for x86-32
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] coroutine-ucontext broken for x86-32 |
Date: |
Wed, 09 May 2012 07:55:52 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-05-09 07:11, Kevin Wolf wrote:
> Am 08.05.2012 21:35, schrieb Jan Kiszka:
>> Hi,
>>
>> I hunted down a fairly subtle corruption of the VCPU thread signal mask
>> in KVM mode when using the ucontext version of coroutines:
>>
>> coroutine_new calls getcontext, makecontext, swapcontext. Those
>> functions get/set also the signal mask of the caller. Unfortunately,
>> they only use the sigprocmask syscall on i386, not the rt_sigprocmask
>> version. So they do not properly save/restore the blocked RT signals,
>> namely our SIG_IPI - it becomes unblocke this way.
>
> If other coroutine backends work (sigaltstack?),
Had a brief look at signalstack. Is kill(getpid(), SIGUSR2) in
coroutine_new correct? This should broadcast to the whole process, but
we only block SIGUSR2 in the caller's context. Why not pthread_kill?
I will give it a try nevertheless.
> we could try to detect
> the situation in configure and set the right default. Not sure what the
> condition is, glibc + i386?
So far it looks like a glibc/i386 thing, but maybe it is driven by the
ABI that defines the size of jmpbuf and, thus, the ability to store RT
signals as well. Then it is a generic i386 limitation.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] coroutine-ucontext broken for x86-32, Jan Kiszka, 2012/05/08
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Michael Tokarev, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Kevin Wolf, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32,
Jan Kiszka <=
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Peter Maydell, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Jan Kiszka, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Anthony Liguori, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Jan Kiszka, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Anthony Liguori, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Jan Kiszka, 2012/05/09
- Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Avi Kivity, 2012/05/09
Re: [Qemu-devel] coroutine-ucontext broken for x86-32, Michael Tokarev, 2012/05/09