All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] RTcan: Assertation failed
       [not found] <27f25f2c-b872-9c8f-9068-bb3e8d3e1d1e@foxmail.com>
@ 2016-09-27  1:57 ` Jack Lee
  2016-09-27  6:13   ` Wolfgang Grandegger
  0 siblings, 1 reply; 5+ messages in thread
From: Jack Lee @ 2016-09-27  1:57 UTC (permalink / raw)
  To: xenomai, wg



On 09/27/2016 09:27 AM, Jack Lee wrote:
> Hello,
>
> more on that subject:
>
> Am 26.09.2016 um 14:04 schrieb Wolfgang Grandegger:
> >//>/[ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0% />/[ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14 />/[ 5911.271868] Assertion failed! />/drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket == 0 />/[ 5911.271872] (1) TX skb still in use />/[ 6011.087098] rtcan0: real bitrate 1000000, sampling point 75.0% />/[ 6011.087119] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14 />/[ 7985.615408] perf interrupt took too long (2512 > 2500), lowering />/kernel.perf_event_max_sample_rate to 50000 />//>//>/Hi, Wolfgang, />//>/I got this error with my advantech PCM26D2CA CAN-board when real-time />/applications were running. />//>/The PCM26D2CA board has two ports: "rtcan0" was used by user />/applications and "rtcan1" was used by "rtcanrecv" to monitor CAN bus. />//>/The bitrate was set previously and not set explicitly here./
> What do you mean? It looks like bitrate was set while the interface was
> active... which should not be allowed. But unfortunately, it is. Anyway,
> I can not see how that function is called accidentally. Must be done
> somehow by you system. Or are there any other related messages in kernel
> log (dmesg) indicating that there was a bus error.
>
> Wolfgang.
Well, you reminded me and I checked my code. It was done by myself 
explicitly in fact. I have
a script to initialize the real-time environment which started the CAN 
device
and set the bit rate, and I set the bit rate again in my application.
It's my fault to start this thread and waste your time. Sorry for that.
Beg your pardon!

If I have a chance to travel to the Europe one day, I really want to 
have a visit on
you guys. If you come to China, especially Beijing, Wuhan, Shenzhen, 
don't hesitate to contact me, I am glad to help :)

Have a good day!




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

* Re: [Xenomai] RTcan: Assertation failed
  2016-09-27  1:57 ` [Xenomai] RTcan: Assertation failed Jack Lee
@ 2016-09-27  6:13   ` Wolfgang Grandegger
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Grandegger @ 2016-09-27  6:13 UTC (permalink / raw)
  To: Jack Lee, xenomai

Hello,

Am 27.09.2016 um 03:57 schrieb Jack Lee:
>
>
> On 09/27/2016 09:27 AM, Jack Lee wrote:
>> Hello,
>>
>> more on that subject:
>>
>> Am 26.09.2016 um 14:04 schrieb Wolfgang Grandegger:
>> >//>/[ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0%
>> />/[ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14 />/[
>> 5911.271868] Assertion failed!
>> />/drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket ==
>> 0 />/[ 5911.271872] (1) TX skb still in use />/[ 6011.087098] rtcan0:
>> real bitrate 1000000, sampling point 75.0% />/[ 6011.087119]
>> rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14 />/[ 7985.615408] perf
>> interrupt took too long (2512 > 2500), lowering
>> />/kernel.perf_event_max_sample_rate to 50000 />//>//>/Hi, Wolfgang,
>> />//>/I got this error with my advantech PCM26D2CA CAN-board when
>> real-time />/applications were running. />//>/The PCM26D2CA board has
>> two ports: "rtcan0" was used by user />/applications and "rtcan1" was
>> used by "rtcanrecv" to monitor CAN bus. />//>/The bitrate was set
>> previously and not set explicitly here./
>> What do you mean? It looks like bitrate was set while the interface was
>> active... which should not be allowed. But unfortunately, it is. Anyway,
>> I can not see how that function is called accidentally. Must be done
>> somehow by you system. Or are there any other related messages in kernel
>> log (dmesg) indicating that there was a bus error.
>>
>> Wolfgang.
> Well, you reminded me and I checked my code. It was done by myself
> explicitly in fact. I have
> a script to initialize the real-time environment which started the CAN
> device
> and set the bit rate, and I set the bit rate again in my application.
> It's my fault to start this thread and waste your time. Sorry for that.
> Beg your pardon!

No problem. It revealed a real bug, at least.

> If I have a chance to travel to the Europe one day, I really want to
> have a visit on
> you guys. If you come to China, especially Beijing, Wuhan, Shenzhen,
> don't hesitate to contact me, I am glad to help :)

You are welcome.

Wolfgang.


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

* Re: [Xenomai] RTcan: Assertation failed
  2016-09-26 12:04 ` Wolfgang Grandegger
@ 2016-09-26 12:55   ` Wolfgang Grandegger
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Grandegger @ 2016-09-26 12:55 UTC (permalink / raw)
  To: xenomai

Hello,

more on that subject:

Am 26.09.2016 um 14:04 schrieb Wolfgang Grandegger:
> Hello,
>
> Am 26.09.2016 um 09:49 schrieb Jack Lee:
>>
>>  [ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0%
>>  [ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>>  [ 5911.271868] Assertion failed!
>>  drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket == 0
>>  [ 5911.271872] (1) TX skb still in use
>>  [ 6011.087098] rtcan0: real bitrate 1000000, sampling point 75.0%
>>  [ 6011.087119] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>>  [ 7985.615408] perf interrupt took too long (2512 > 2500), lowering
>>  kernel.perf_event_max_sample_rate to 50000
>>
>>
>> Hi, Wolfgang,
>>
>> I got this error with my advantech PCM26D2CA CAN-board when real-time
>> applications were running.
>>
>> The PCM26D2CA board has two ports: "rtcan0" was used by user
>> applications and "rtcan1" was used by "rtcanrecv" to monitor CAN bus.
>>
>> The bitrate was set previously and not set explicitly here.
>
> What do you mean? It looks like bitrate was set while the interface was
> active... which should not be allowed. But unfortunately, it is. Anyway,
> I can not see how that function is called accidentally. Must be done
> somehow by you system. Or are there any other related messages in kernel
> log (dmesg) indicating that there was a bus error.

I had a closer look to the code. Actually it's allowed to set the 
bit-timing while interface is active. It will be stopped and restarted 
afterwards... but the reset of the loopback handling is missing. That 
needs a fix.

Wolfgang.


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

* Re: [Xenomai] RTcan: Assertation failed
  2016-09-26  7:49 Jack Lee
@ 2016-09-26 12:04 ` Wolfgang Grandegger
  2016-09-26 12:55   ` Wolfgang Grandegger
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2016-09-26 12:04 UTC (permalink / raw)
  To: xenomai

Hello,

Am 26.09.2016 um 09:49 schrieb Jack Lee:
>
>  [ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0%
>  [ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>  [ 5911.271868] Assertion failed!
>  drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket == 0
>  [ 5911.271872] (1) TX skb still in use
>  [ 6011.087098] rtcan0: real bitrate 1000000, sampling point 75.0%
>  [ 6011.087119] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
>  [ 7985.615408] perf interrupt took too long (2512 > 2500), lowering
>  kernel.perf_event_max_sample_rate to 50000
>
>
> Hi, Wolfgang,
>
> I got this error with my advantech PCM26D2CA CAN-board when real-time
> applications were running.
>
> The PCM26D2CA board has two ports: "rtcan0" was used by user
> applications and "rtcan1" was used by "rtcanrecv" to monitor CAN bus.
>
> The bitrate was set previously and not set explicitly here.

What do you mean? It looks like bitrate was set while the interface was 
active... which should not be allowed. But unfortunately, it is. Anyway, 
I can not see how that function is called accidentally. Must be done 
somehow by you system. Or are there any other related messages in kernel 
log (dmesg) indicating that there was a bus error.

Wolfgang.


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

* [Xenomai] RTcan: Assertation failed
@ 2016-09-26  7:49 Jack Lee
  2016-09-26 12:04 ` Wolfgang Grandegger
  0 siblings, 1 reply; 5+ messages in thread
From: Jack Lee @ 2016-09-26  7:49 UTC (permalink / raw)
  To: xenomai, wg


  [ 5911.271780] rtcan0: real bitrate 1000000, sampling point 75.0%
  [ 5911.271806] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
  [ 5911.271868] Assertion failed!
  drivers/xenomai/can/rtcan_raw.c:rtcan_tx_push:178 dev->tx_socket == 0
  [ 5911.271872] (1) TX skb still in use
  [ 6011.087098] rtcan0: real bitrate 1000000, sampling point 75.0%
  [ 6011.087119] rtcan_sja_set_bit_time: btr0=0x0 btr1=0x14
  [ 7985.615408] perf interrupt took too long (2512 > 2500), lowering
  kernel.perf_event_max_sample_rate to 50000


Hi, Wolfgang,

I got this error with my advantech PCM26D2CA CAN-board when real-time 
applications were running.

The PCM26D2CA board has two ports: "rtcan0" was used by user 
applications and "rtcan1" was used by "rtcanrecv" to monitor CAN bus.

The bitrate was set previously and not set explicitly here.

Could you give me some help please? Thanks!


Good luck!





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

end of thread, other threads:[~2016-09-27  6:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <27f25f2c-b872-9c8f-9068-bb3e8d3e1d1e@foxmail.com>
2016-09-27  1:57 ` [Xenomai] RTcan: Assertation failed Jack Lee
2016-09-27  6:13   ` Wolfgang Grandegger
2016-09-26  7:49 Jack Lee
2016-09-26 12:04 ` Wolfgang Grandegger
2016-09-26 12:55   ` Wolfgang Grandegger

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.