Spurious task resume due to SIGSHADOW

Richard Weinberger <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <CAFLxGvw_cRpJbBKg2YG9_oi5Bv_DU39OB41nPyJcq7hv7hK6YQ@mail.gmail.com>
I'm currently debugging an issue on a very old Xenomai system, while
reading the source I noticed that the very same issue could also exist
on recent Xenomai releases.

What I see is the following:
- A task gets suspended and unblocked using rt_task_suspend() and
rt_task_unblock()
- In some cases it happens that the task resumes to execute
- It resumes because a Linux signal is pending, being SIGSHADOW

Since SIGSHADOW is internally used to suspend a task, this alerted me.
So, I suspect the following issue:
When xnthread_suspend() fires SIGSHADOW using
__xnthread_signal(thread, SIGSHADOW, SIGSHADOW_ACTION_HARDEN); nothing
seems to prevent the case where the target task enters the primary
domain right before it sees SIGSHADOW. In the next step
do_sigwake_event() causes it to resume instead of sleeping.

Hmm?

-- 
Thanks,
//richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.