Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> On Mon, May 5, 2008 at 6:08 PM, Philippe Gerum <[EMAIL PROTECTED]> wrote:
>>>>  do_schedule_event() is the culprit when it reads the pending signals on 
>>>> the
>>>>  shared queue (XNDEBUG check for rearming the timers),
>>> A stupid suggestion: if we know that the spinlock is always locked
>>> when calling do_schedule_event, maybe we can simply avoid the lock
>>> there ?
>> Would be the best solution - but I don't think so. After reading a bit
>> more into the lockdep output, I think the issue is that _some_other_
>> task my hold the siglock and then acquire our rq_lock, but not
>> necessarily along a similar code path we took to acquire the siglock now.
> Actually, this locking around the sigmask retrieval looks overkill, since we
> only address ptracing signals here, and those should go through the shared
> pending set, not through the task's private one. I.e. There should be no way 
> to
> get fooled by any asynchronous update of that mask.

This is a debug helper anyway, so we risk (if I got this right) at worst
a spurious unfreeze of the Xenomai timers. Does not really compare to
the current deadlock...

I will let my colleagues run the hunk below tomorrow (which works for me) -
let's see if they manage to crash it again :P (they are experts in this!).


Index: xenomai-2.4.x/ksrc/nucleus/shadow.c
--- xenomai-2.4.x/ksrc/nucleus/shadow.c (Revision 3734)
+++ xenomai-2.4.x/ksrc/nucleus/shadow.c (Arbeitskopie)
@@ -2194,9 +2194,7 @@ static inline void do_schedule_event(str
                        if (signal_pending(next)) {
                                sigset_t pending;
-                               spin_lock(&wrap_sighand_lock(next));    /* 
Already interrupt-safe. */
                                wrap_get_sigpending(&pending, next);
-                               spin_unlock(&wrap_sighand_lock(next));
                                if (sigismember(&pending, SIGSTOP) ||
                                    sigismember(&pending, SIGINT))

Attachment: signature.asc
Description: OpenPGP digital signature

Xenomai-core mailing list

Reply via email to