ex_regs system call is forzed in the do_ipc process
Guanghui, Cheng
cheng.guanghui.ml at gmail.com
Wed Oct 21 09:25:51 CEST 2009
On Wednesday 21 October 2009 00:44:34 Adam Lackorzynski wrote:
> Hi,
>
> On Tue Oct 20, 2009 at 16:20:03 +0800, Guanghui, Cheng wrote:
> > When i use the ex_regs system call to trigger the exception ipc
> > it seems to be frozed in the do_ipc stange. I use jdb to debug this
> > current thread lists is like this:
> >
> > 9.04 l4ertl.exceptio 10 9.03 rcv,ipc_progr
> > 9.03 l4ertl.timer0 10 9.02 rcv,ipc_progr
> > 9.02 domain2.main 10 9.04 rcv,ipc_progr,exc_progr
> >
> > l4ertl.exceptio is the pager of domain2.main. And now l4ertl.timer0
> > is executing ex_regs system to trigger exception for domain2.main.
> > l4ertl.exceptio is waiting for the exception ipc from the l4ertl2.main2.
> > In detail l4ertl.exceptio is in ipc (user level registers).
> > l4ertl.timer0 is in ipc (user level registers), too. domain2.main is in
> > the exception 255. It seems to be dead lock in the kernel. Very strange.
>
> I think that's what the L4_THREAD_EX_REGS_NO_CANCEL flag is about.
> 'cancel' here means that a possibly ongoing IPC is being canceled, i.e.
> aborted. When you remove the flag, the IPCs will be aborted and return.
It can't work either. I tested my demo many times and found:
If the thread in which the exception ipc will be triggered is only 1 L4 thread
or is 1 L4eRTL thread (You know in my design there are many L4eRTL threads in
the L4 main thread), the exception ipc could be triggered correctly. But i
don't test two l4ertl threads because only one can't work.
If i ajust the exception handler when the L4 thread is runnning in the L4
thread but i try to trigger the exception ipc when the main thread is running
in the L4eRTL thread, the ex_regs system call can't return and it seems it
will be blocked in the kernel whatever i used "L4_THREAD_EX_REGS_NO_CANCEL"
or not. Vice versa.
Thanks.
Cheng Guanghui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20091021/6880ae5d/attachment.htm>
More information about the l4-hackers
mailing list