* [Xenomai] Fighting with deadlock in xenomai 2.6.3 + linux 3.5.7...
@ 2015-09-04 14:24 Stephane Grosjean
2015-09-04 15:17 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Grosjean @ 2015-09-04 14:24 UTC (permalink / raw)
To: xenomai
Hello,
I'm working on a RT device driver on a dual-kernel configuration (see
subject).
I'm going to be crazy with this simple case of a user task filling with
data a driver
internal Tx queue, and going to sleep when the queue is full. The task
enters the sleep state,
thanks to a rtdm_event_timedwait() call. The ISR uses the
rtdm_event_signal() to wake any
sleeping task up (something actually very close to the 16550A serial
driver).
My problem is that, as soon as the fifo is full, the whole system hangs,
and a terminal
connected to the serial port (kernel cmd line changed with
"console=ttyS0,115200")
displays such infos:
[ 3802.078363] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.078363] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #2)
[ 3802.078363] owner = kernel/xenomai/skins/rtdm/drvlib.c:857
(rtdm_event_signal(), CPU #0)
[ 3802.077955] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.077955] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #1)
[ 3802.077955] owner = kernel/xenomai/skins/rtdm/drvlib.c:857
(rtdm_event_signal(), CPU #0)
[ 3802.078610] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.078610] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #3)
[ 3802.078610] owner = kernel/xenomai/skins/rtdm/drvlib.c:857
(rtdm_event_signal(), CPU #0)
[ 3802.077955] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.077955] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #1)
[ 3802.077955] owner = kernel/xenomai/skins/rtdm/drvlib.c:857
(rtdm_event_signal(), CPU #0)
[ 3802.078610] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.078610] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #3)
[ 3802.078610] owner = kernel/xenomai/skins/rtdm/drvlib.c:857
(rtdm_event_signal(), CPU #0)
[ 3802.078363] Xenomai: stuck on nucleus lock c188d4c0
[ 3802.078363] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #2)
...
(yes, mys PC is equipped with a 4xcores i7).
My question is: how and why a "simple" "rtdm_event_signal()" may lock
the entire system?
I know these system calls are using some global locks, but, in that
case, why the
"rtdm_event_signal()" does not put this lock back?
Note that the rtdm_event_signal() is called by the ISR each time the Tx
fifo is not full.
Thus, there are many calls before the hang that succeed! So it is
reasonable to omit the cases
when the event pointer and/or its content is invalid...
Finally, note that the lock may also occur when the user task enters the
rtdm_event_timedwait() call:
[ 343.660015] waiter = kernel/xenomai/nucleus/intr.c:114
(xnintr_clock_handler(), CPU #3)
[ 343.660015] owner = kernel/xenomai/skins/rtdm/drvlib.c:957
(rtdm_event_timedwait(), CPU #1)
Any suggestion would be welcome.
Many thanks in advance for your help!
Stephane
--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt
Handelsregister Darmstadt HRB 9183
Geschaeftsfuehrung: Alexander Gach, Uwe Wilhelm
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai] Fighting with deadlock in xenomai 2.6.3 + linux 3.5.7...
2015-09-04 14:24 [Xenomai] Fighting with deadlock in xenomai 2.6.3 + linux 3.5.7 Stephane Grosjean
@ 2015-09-04 15:17 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2015-09-04 15:17 UTC (permalink / raw)
To: Stephane Grosjean; +Cc: xenomai
Stephane Grosjean wrote:
> Hello,
>
> I'm working on a RT device driver on a dual-kernel configuration (see
> subject).
> (...)
>
> Any suggestion would be welcome.
>
> Many thanks in advance for your help!
Do you have the same problem with Xenomai latest stable release?
Please have a look at https://xenomai.org/asking-for-help/
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-04 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 14:24 [Xenomai] Fighting with deadlock in xenomai 2.6.3 + linux 3.5.7 Stephane Grosjean
2015-09-04 15:17 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.