All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] CAN: Locked in rtdm_sem_timeddown of tx_sem; Lost TX IRQ ?
@ 2012-03-20 17:26 Thierry Bultel
  2012-04-01 22:15 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Bultel @ 2012-03-20 17:26 UTC (permalink / raw)
  To: xenomai, Jean-Baptiste Tredez

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Hello,

the issue I am describing here happens on a dual-core Atom (without 
hyperthreading)

It is easy to reproduce with 2.6.32.7+xenomai 2.5.2, which was my 
initial configuration until
I remembered that Philippe told us that SMP was correctly supported from 
2.6.38.8

The fact is that I have been able to reproduce it with 
2.6.38.8+xenomai-2.6 as well. Only once, but I did.

I am using CAN with a IXXAT PCI-04 board .
There is a single thread per bus.

With the old kernel, after about 400-500 seconds, and heavy load the 
communication stops, and after some
analysis, I found out that my process was stuck at :

rtcan_raw.c

   /* Try to pass the guard in order to access the controller */
*  ret = rtdm_sem_timeddown(&dev->tx_sem, timeout, NULL);*


The Refcount shown in /proc/rtcan/rtcan0/info is 1.

The workaround I found was to set the timeout to a non-zero value with 
the appropriate ioctl,
and when a timeout issues, to stop and restart the bus, with the effect 
to destroy and re-recreate the semaphore and
thus to communicate again.

By reading the code, the only reason I can see is that a TX interrupt is 
lost.

I do not have much more ways to analyze deeper, so any advice would be 
greatly appreciated

Cheers,
Thierry

[-- Attachment #2: Type: text/html, Size: 1988 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] CAN: Locked in rtdm_sem_timeddown of tx_sem; Lost TX IRQ ?
  2012-03-20 17:26 [Xenomai-help] CAN: Locked in rtdm_sem_timeddown of tx_sem; Lost TX IRQ ? Thierry Bultel
@ 2012-04-01 22:15 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-01 22:15 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: xenomai, Jean-Baptiste Tredez

On 03/20/2012 06:26 PM, Thierry Bultel wrote:
> Hello,
> 
> the issue I am describing here happens on a dual-core Atom (without 
> hyperthreading)
> 
> It is easy to reproduce with 2.6.32.7+xenomai 2.5.2, which was my 
> initial configuration until
> I remembered that Philippe told us that SMP was correctly supported from 
> 2.6.38.8
> 
> The fact is that I have been able to reproduce it with 
> 2.6.38.8+xenomai-2.6 as well. Only once, but I did.
> 
> I am using CAN with a IXXAT PCI-04 board .
> There is a single thread per bus.
> 
> With the old kernel, after about 400-500 seconds, and heavy load the 
> communication stops, and after some
> analysis, I found out that my process was stuck at :
> 
> rtcan_raw.c
> 
>    /* Try to pass the guard in order to access the controller */
> *  ret = rtdm_sem_timeddown(&dev->tx_sem, timeout, NULL);*
> 
> 
> The Refcount shown in /proc/rtcan/rtcan0/info is 1.
> 
> The workaround I found was to set the timeout to a non-zero value with 
> the appropriate ioctl,
> and when a timeout issues, to stop and restart the bus, with the effect 
> to destroy and re-recreate the semaphore and
> thus to communicate again.
> 
> By reading the code, the only reason I can see is that a TX interrupt is 
> lost.
> 
> I do not have much more ways to analyze deeper, so any advice would be 
> greatly appreciated

Have you tried xenomai 2.5.6 ?

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-01 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 17:26 [Xenomai-help] CAN: Locked in rtdm_sem_timeddown of tx_sem; Lost TX IRQ ? Thierry Bultel
2012-04-01 22:15 ` 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.