Issues with kernel 4.14.26-2 and mcp2515 Can-Bus driver

I’m using Raspberry Pi 3 B in my car with OSMC. I have compiled MCP2515 and Socket Can driver from osmc source files. Also I’m using Osmc with LEIA update. it was works perfectly until kernel update 4.14.26-2. when i updated it starts freezing after kodi start and there is nothing in Kodi.log. Kodi.log is emthy no error mesagges or e.g.

i wrote an script with python to get can messages from car. but when it starts after a couple second kodi freezes. when i disable script kodi runs normaly.

Script is using standard python-can library. nothing changed in script but i also tryed restore old script but same issue.

can any one help me please…

You probably need to speak with the developers of Socket Can.

I’m not sure about this… Because in 4.14.26-1 it was working. its same kernel isnt it. only difference is modified by osmc team that i think.

You first step then would be to post full debug logs.

Yes i know but log file is empty ad i dont know any other way to get log about it when it happens. it freezes and only thing i can do is powering it of. :frowning_face:

You can’t ssh in when it freezes?

Hi,

Have you compiled again for the new kernel?

Thanks Tom.

it freezes too :frowning: can’t connect or ping also

Yes i did but nothing changed…

Can you ssh in before the lockup a run

dmesg -w

maybe you’ll see the cause then. I’d still recommend that you contact the driver developer as he has more knowledge than we do here about the driver :wink: Since it’s causing a hard lockup, the driver seems to be doing something nasty.

only thing i can see as error is this

“can_dev: no symbol version for module_layout”
note without script running.

i will try with script now

after script started :

[ 24.058216] can: controller area network core (rev 20170425 abi 9)
[ 24.058349] NET: Registered protocol family 29
[ 24.066710] can: raw protocol (rev 20170425)
[ 24.358243] ------------[ cut here ]------------
[ 24.358275] kernel BUG at net/netlink/af_netlink.c:1326!
[ 24.358287] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 24.358302] Modules linked in: can_raw can bnep hci_uart bluetooth ecdh_generic ipt_MASQUERADE nf_nat_masquerade_ipv4 8021q garp bridge stp llc iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack uinput iptable_mangle iptable_filter brcmfmac brcmutil cfg80211 rfkill joydev mcp251x evdev snd_bcm2835© can_dev snd_pcm snd_timer snd bcm2835_thermal bcm2835_gpiomem spi_bcm2835 uio_pdrv_genirq fixed uio ip_tables x_tables ipv6
[ 24.358474] CPU: 3 PID: 515 Comm: ntpd Tainted: G C 4.14.26-2-osmc #1
[ 24.358487] Hardware name: BCM2835
[ 24.358497] task: aae50000 task.stack: a50f6000
[ 24.358518] PC is at netlink_has_listeners+0x98/0x9c
[ 24.358537] LR is at __sk_free+0xb4/0xe4
[ 24.358548] pc : [<8086363c>] lr : [<807f9ab0>] psr: 60070013
[ 24.358561] sp : a50f7e98 ip : a50f7eb0 fp : a50f7eac
[ 24.358572] r10: a75ec720 r9 : 00000008 r8 : 00000000
[ 24.358584] r7 : a75ec720 r6 : 00000000 r5 : 00000002 r4 : add8cb80
[ 24.358597] r3 : 8037bbe8 r2 : 00000000 r1 : 00000002 r0 : add8cb80
[ 24.358612] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 24.358625] Control: 10c5383d Table: 250fc06a DAC: 00000055
[ 24.358637] Process ntpd (pid: 515, stack limit = 0xa50f6210)
[ 24.358649] Stack: (0xa50f7e98 to 0xa50f8000)
[ 24.358661] 7e80: adfb49c0 adfb4b40
[ 24.358679] 7ea0: a50f7ec4 a50f7eb0 807f9ab0 808635b0 adfb49c0 adfb4b40 a50f7ee4 a50f7ec8
[ 24.358697] 7ec0: 807fabb0 807f9a08 adfb49c0 a75ec700 ae9f4110 a75ec720 a50f7ef4 a50f7ee8
[ 24.358719] 7ee0: 808af7a8 807faad4 a50f7f0c a50f7ef8 808c0dcc 808af7a4 a75ec720 00000000
[ 24.358739] 7f00: a50f7f24 a50f7f10 807f3b80 808c0d84 aada59c0 a762ebb0 a50f7f64 a50f7f28
[ 24.358760] 7f20: 80315f14 807f3b58 00000000 00000000 aada59c0 aada59c8 aae50000 00000000
[ 24.358780] 7f40: aae50550 aae50000 aae5056c 80f8abc0 aada59c0 00000000 a50f7f8c a50f7f68
[ 24.358801] 7f60: 80151b50 80315e80 00000004 a50f6000 a50f7fb0 8010c7a8 8010c7a8 a50f6000
[ 24.358821] 7f80: a50f7fac a50f7f90 80110554 80151abc 00000005 7eadde80 00000080 00000006
[ 24.358841] 7fa0: 00000000 a50f7fb0 8010c5f4 8011048c 00000000 7eadde4c 76f71c64 00000002
[ 24.358862] 7fc0: 00000005 7eadde80 00000080 00000006 005265bc 00000000 0052aad8 005265bc
[ 24.358882] 7fe0: 00000000 7eadde68 00000000 76cf64f2 00070030 00000005 2f7fa861 2f7fac61
[ 24.358918] [<8086363c>] (netlink_has_listeners) from [<807f9ab0>] (__sk_free+0xb4/0xe4)
[ 24.358943] [<807f9ab0>] (__sk_free) from [<807fabb0>] (sk_common_release+0xe8/0x118)
[ 24.358969] [<807fabb0>] (sk_common_release) from [<808af7a8>] (udp_lib_close+0x10/0x14)
[ 24.358996] [<808af7a8>] (udp_lib_close) from [<808c0dcc>] (inet_release+0x54/0x80)
[ 24.359018] [<808c0dcc>] (inet_release) from [<807f3b80>] (sock_close+0x34/0xc8)
[ 24.359042] [<807f3b80>] (sock_close) from [<80315f14>] (____fput+0xa0/0x1f0)
[ 24.359065] [<80315f14>] (____fput) from [<80151b50>] (task_work_run+0xa0/0xc0)
[ 24.359090] [<80151b50>] (task_work_run) from [<80110554>] (do_work_pending+0xd4/0xd8)
[ 24.359113] [<80110554>] (do_work_pending) from [<8010c5f4>] (slow_work_pending+0xc/0x20)
[ 24.359136] Code: e1a00004 e89da830 e3a04000 eafffffa (e7f001f2)
[ 24.359153] —[ end trace 725de02c9123599c ]—
[ 24.934384] ------------[ cut here ]------------
[ 24.934418] kernel BUG at net/netlink/af_netlink.c:1326!
[ 24.934432] Internal error: Oops - BUG: 0 [#2] PREEMPT SMP ARM
[ 24.934448] Modules linked in: can_raw can bnep hci_uart bluetooth ecdh_generic ipt_MASQUERADE nf_nat_masquerade_ipv4 8021q garp bridge stp llc iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack uinput iptable_mangle iptable_filter brcmfmac brcmutil cfg80211 rfkill joydev mcp251x evdev snd_bcm2835© can_dev snd_pcm snd_timer snd bcm2835_thermal bcm2835_gpiomem spi_bcm2835 uio_pdrv_genirq fixed uio ip_tables x_tables ipv6
[ 24.934628] CPU: 1 PID: 609 Comm: sudo Tainted: G D C 4.14.26-2-osmc #1
[ 24.934645] Hardware name: BCM2835
[ 24.934658] task: a50edb80 task.stack: a5246000
[ 24.934681] PC is at netlink_has_listeners+0x98/0x9c
[ 24.934696] LR is at __sk_free+0xb4/0xe4
[ 24.934709] pc : [<8086363c>] lr : [<807f9ab0>] psr: 60070013
[ 24.934723] sp : a5247e98 ip : a5247eb0 fp : a5247eac
[ 24.934736] r10: ad8528e0 r9 : 00000008 r8 : 00000000
[ 24.934751] r7 : ad8528e0 r6 : 00000000 r5 : 00000002 r4 : add8cb80
[ 24.934765] r3 : 8037bbe8 r2 : 00000000 r1 : 00000002 r0 : add8cb80
[ 24.934783] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 24.934800] Control: 10c5383d Table: 2532406a DAC: 00000055
[ 24.934814] Process sudo (pid: 609, stack limit = 0xa5246210)
[ 24.934828] Stack: (0xa5247e98 to 0xa5248000)
[ 24.934843] 7e80: ade34d00 ade34e80
[ 24.934865] 7ea0: a5247ec4 a5247eb0 807f9ab0 808635b0 ade34d00 ade34e80 a5247ee4 a5247ec8
[ 24.934887] 7ec0: 807fabb0 807f9a08 ade34d00 ad8528c0 ae9f4110 ad8528e0 a5247ef4 a5247ee8
[ 24.934907] 7ee0: 808af7a8 807faad4 a5247f0c a5247ef8 808c0dcc 808af7a4 ad8528e0 00000000
[ 24.934930] 7f00: a5247f24 a5247f10 807f3b80 808c0d84 a51936c0 a7755088 a5247f64 a5247f28
[ 24.934950] 7f20: 80315f14 807f3b58 00000000 00000000 a51936c0 a51936c8 a50edb80 00000000
[ 24.934972] 7f40: a50ee0d0 a50edb80 a50ee0ec 80f8abc0 a51936c0 00000000 a5247f8c a5247f68
[ 24.934994] 7f60: 80151b50 80315e80 00000004 a5246000 a5247fb0 8010c7a8 8010c7a8 a5246000
[ 24.935015] 7f80: a5247fac a5247f90 80110554 80151abc 7e954200 0070cff8 7e9543d8 00000006
[ 24.935036] 7fa0: 00000000 a5247fb0 8010c5f4 8011048c 00000000 0000001c ffffffff 0000000a
[ 24.935056] 7fc0: 7e954200 0070cff8 7e9543d8 00000006 00000003 7e954400 0000000f 00000006
[ 24.935078] 7fe0: 00000006 7e954110 76dbe9bf 76d4f6f6 60070030 0000000f 00000000 00000000
[ 24.935108] [<8086363c>] (netlink_has_listeners) from [<807f9ab0>] (__sk_free+0xb4/0xe4)
[ 24.935134] [<807f9ab0>] (__sk_free) from [<807fabb0>] (sk_common_release+0xe8/0x118)
[ 24.935160] [<807fabb0>] (sk_common_release) from [<808af7a8>] (udp_lib_close+0x10/0x14)
[ 24.935185] [<808af7a8>] (udp_lib_close) from [<808c0dcc>] (inet_release+0x54/0x80)
[ 24.935210] [<808c0dcc>] (inet_release) from [<807f3b80>] (sock_close+0x34/0xc8)
[ 24.935235] [<807f3b80>] (sock_close) from [<80315f14>] (____fput+0xa0/0x1f0)
[ 24.935257] [<80315f14>] (____fput) from [<80151b50>] (task_work_run+0xa0/0xc0)
[ 24.935282] [<80151b50>] (task_work_run) from [<80110554>] (do_work_pending+0xd4/0xd8)
[ 24.935306] [<80110554>] (do_work_pending) from [<8010c5f4>] (slow_work_pending+0xc/0x20)
[ 24.935328] Code: e1a00004 e89da830 e3a04000 eafffffa (e7f001f2)
[ 24.935344] —[ end trace 725de02c9123599d ]—

and frozen again…

now i tried all various version of can protocol even terminal… when i try to get message from can it freezes… not im sure that its about kernel and driver :frowning:

It looks like something with the driver. I’d once again suggest that you contact the driver developer. I bet he can give more help than we can give.

im trying to contact but no response yet. also i found another thing after sending or getting data from candevice if i try to connect over ssh system frozen again