Skip to contentSkip to conversation

RTcan: Assertation failed

Xenomai Jack Lee 2 participants 3 messages Sep 26, 2016

lore
Share & tools
lore

Jack Lee

author
#0 lore raw
 [ 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!

#1 lore raw

Hello,

Am 26.09.2016 um 09:49 schrieb Jack Lee:

Quoted 14 lines
 [ 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,

Quoted 7 lines

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.

#2 lore raw

Hello,

more on that subject:

Am 26.09.2016 um 14:04 schrieb Wolfgang Grandegger:

Quoted 23 lines

Hello,

Am 26.09.2016 um 09:49 schrieb Jack Lee:

Quoted 20 lines
 [ 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.

Quoted 7 lines
Quoted 1 line

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.