SAMA5D2 Xplained CAN Bus & Kernel Panic

Moderator: nferre

LucaLeoncavallo
Posts: 3
Joined: Tue Sep 18, 2018 11:02 am

SAMA5D2 Xplained CAN Bus & Kernel Panic

Tue Apr 23, 2019 3:37 pm

Hi,

We are working on a prototype that uses 2 SAMA5D2 Xplained board to convert CAN Bus messages in Crypted CAN Messages and then back to CAN Bus messages. To be clear these are the connection

PC #1 + CAN Sniffer

CAN1 Board #1
CAN0 Board #1

CAN0 Board #2
CAN1 Board #2

PC #2 + CAN Sniffer

Combined CAN rate (PC1 <-> PC2) is about 100 messages for second.

The application SW was wirtten in Qt. Developed and Debugged using a PC with Ubuntu.
Installed ad service on both boards after about 20 minutes (average) one of the two board stop due to Kernel Panic Crash.
Connected with Putty this is, as an example, one of the message after the crash:

root@sama5d2-xplained:~# ------------[ cut here ]------------
kernel BUG at drivers/net/can/dev.c:490!
Internal error: Oops - BUG: 0 [#1] ARM
Modules linked in:
CPU: 0 PID: 172 Comm: CanWorkerThread Not tainted 4.14.79-00584-ge04c02cf245d-dirty #0
Hardware name: Atmel SAMA5
task: d48f59c0 task.stack: d48d0000
pc : [<c0458b6c>]    lr : [<c045b7f8>]    psr: 80070193
sp : d48d1ef8  ip : d0000220  fp : c077bf94
r10: c077bfbc  r9 : 89400000  r8 : 00000000
r7 : d420460c  r6 : 00000001  r5 : 00000019  r4 : d4204000
r3 : 00000020  r2 : 00000730  r1 : 00000089  r0 : d4204000
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c53c7d  Table: 3485c059  DAC: 00000051
Process CanWorkerThread (pid: 172, stack limit = 0xd48d0208)
Stack: (0xd48d1ef8 to 0xd48d2000)
1ee0:                                                       d4204000 00000019
1f00: 00000001 c045b7f8 d498bec0 d40e3c00 00000000 d48d1f64 00000027 c0a37ee0
1f20: c077bfbc c01472dc d4734240 00000000 00000000 d40e3c00 00000000 d40e3c00
1f40: d40e3c00 00000000 00000001 d4005400 b4835dd0 00000020 00000020 c01473d0
1f60: 00000000 00000000 d4734241 d40e3c00 d400916c c0147434 d40e3c00 c014a080
1f80: c0a37498 00000000 00000000 c0146850 c0a37498 c0146cdc b66a6b9c a0070010
1fa0: ffffffff 10c53c7d 10c53c7d c010b930 b3f045a0 00000002 b6775000 00000025
1fc0: b3f045a0 b4835d34 b4835dd4 b4835d38 b4835d2c b4835dd0 00000020 00000020
1fe0: b6df1470 b4835cf8 b6991e7c b66a6b9c a0070010 ffffffff 00000000 00000000
Function entered at [<c0458b6c>] from [<c045b7f8>]
Function entered at [<c045b7f8>] from [<c01472dc>]
Function entered at [<c01472dc>] from [<c01473d0>]
Function entered at [<c01473d0>] from [<c0147434>]
Function entered at [<c0147434>] from [<c014a080>]
Function entered at [<c014a080>] from [<c0146850>]
Function entered at [<c0146850>] from [<c0146cdc>]
Function entered at [<c0146cdc>] from [<c010b930>]
Code: e7832105 e8bd8070 e1a00003 e8bd8070 (e7f001f2)
---[ end trace fb1fd198e65e2ca2 ]---
Kernel panic - not syncing: Fatal exception in interrupt
---[ end Kernel panic - not syncing: Fatal exception in interrupt

Discovered today that if I run in debug the application with Qt Creator the crash never happen (runned for over 5 hours without problem).

Any Idea about the fact that the Kernel crash on standard run and does not crash if in debug?
I'm going crazy trying to understand what are the difference from the 2 scenario!!?!?!?

Thanks

Luca
blue_z
Location: USA
Posts: 1889
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D2 Xplained CAN Bus & Kernel Panic

Tue Apr 23, 2019 8:23 pm

LucaLeoncavallo wrote: Any Idea about the fact that the Kernel crash on standard run and does not crash if in debug?
No, but you need to rebuild your kernel with symbols for debugging (i.e. make menuconfig -> Kernel hacking -> Compile the kernel with debug info : CONFIG_DEBUG_INFO) so that the trace is actually useful.

Regards
LucaLeoncavallo
Posts: 3
Joined: Tue Sep 18, 2018 11:02 am

Re: SAMA5D2 Xplained CAN Bus & Kernel Panic

Fri May 10, 2019 2:10 pm

Hi,

thanks for your suggestion.. I've done the rebuilt of Kernel using the DEBUG options.

Where the log files are stored after a crash?

A couple of crashes happen with the new kernel but i can't find log file on the file system.

Thanks

Luca
blue_z
Location: USA
Posts: 1889
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D2 Xplained CAN Bus & Kernel Panic

Sat May 11, 2019 12:28 am

LucaLeoncavallo wrote: Where the log files are stored after a crash?
Normally they are not stored anywhere (on the target board).
You could use a terminal emulator program that can log the session to a file on the host.

Regards

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests