With FreeBSD 8.0 it seems like you can't block pending but undelivered signals

Richard Sharpe realrichardsharpe at gmail.com
Tue Jan 8 16:21:06 MST 2013


On Tue, Jan 8, 2013 at 2:50 PM, Jeremy Allison <jra at samba.org> wrote:
> On Tue, Jan 08, 2013 at 11:15:39AM -0800, Richard Sharpe wrote:
>>
>> OK, it seems that it is not so bad. Based on a response I got from the
>> FreeBSD Hackers mailing list, and some digging, I think the answer is:
>>
>>             sigaddset(&((ucontext_t *)uctx)->uc_sigmask, sig);
>>
>> I will try this soon and get back to you.
>>
>> >From here: http://stackoverflow.com/questions/5531006/returning-from-a-signal-handler-and-leaving-signal-masked
>
> Ok, the correct fix here (and one that will work on Linux too)
> is to ensure we never issue more aio requests than we have
> real-time-signal buckets to receive the responses for them.
>
> i.e. the "100" value inside smbd/aio.c is the real problem
> here, not blocking the rt-signal inside the handler.
>
> Match those sizes and you should not see this error
> occuring.

Well, that is very true. That was my first approach but I thought
someone was wedded to the notion of using a larger number in the aio
code than the tevent code.

We probably should allow the aio code to fetch the number of buckets
so it never issues more requests than there are bucked available.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list