kurt-vd / linux

Linux kernel source tree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

J1939 Driver 'Dies' on TPCM Connection Abort

rpkvt opened this issue · comments

commented

Hi Kurt,

My application has another mode which tunnels data packets over the J1939 CAN bus to a specific address using PropA PGN (manufacturer defined). After some time, the driver appears to send a Connection Abort request to the destination. The destination then responds and the J1939 driver stops working. In fact, the entire system restarts.

Here's an example where my device (address 128) is sending packets to my bus monitor (address 248):

image

The sequence in red illustrates a successful packet transfer. The sequence in blue shows the abort request and a response from the bus monitor.

This is the reason for the initial request made by the J1939 driver (already connected):
image

Response reason (resources needed):
image

These two messages repeat several times. Eventually the bus monitor sends an additional abort request (timeout is the reason):
image

image

This caused my linux box to restart. It seems to be the reception of this last abort request that does it.

Do you have any thoughts on this? I'm using sendto and it doesn't seem to be sending any errors back to the application.

Thanks,
Rich

commented

OK - should I just email this address: linux-can@vger.kernel.org with this problem? I looked at the archives and it doesn't appear to be very active.

I haven't tried the newer kernels.

commented

Here's the kernel dump:

[ 627.711174] j1939xtp_rx_rts: connection exists (4 80 f8)
[ 627.778856] j1939xtp_rx_rts: connection exists (4 80 f8)
[ 627.840687] j1939xtp_rx_rts: connection exists (4 80 f8)
[ 627.965453] ------------[ cut here ]------------
[ 627.970321] Kernel BUG at c012d928 [verbose debug info unavailable]
[ 627.976884] Internal error: Oops - BUG: 0 [#1] ARM
[ 627.981901] Modules linked in: usb_f_ecm g_ether usb_f_rndis u_ether libcomposite can_j1939 xt_tcpudp iptable_filter ip_tables xt_LED x_tables ti_am335x_adc kfifo_buf industrialio pps_gpio c_can_platform c_can ti_am335x_tscadc ext4 jbd2 mbcache
[ 628.004692] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.9.80-wsda #2
[ 628.011524] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 628.017902] task: de096cc0 task.stack: de09c000
[ 628.022662] PC is at tasklet_action+0xb4/0xb8
[ 628.027223] LR is at tasklet_action+0x68/0xb8
[ 628.031783] pc : [] lr : [] psr: 600f0013
[ 628.031783] sp : de09dea8 ip : 00000000 fp : de09c000
[ 628.043803] r10: 00000018 r9 : 00000100 r8 : 00000024
[ 628.049271] r7 : 00000000 r6 : c0b11780 r5 : de71f8e8 r4 : de71f8e8
[ 628.056104] r3 : 00000000 r2 : 600f0013 r1 : 00000000 r0 : de71f800
[ 628.062940] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 628.070410] Control: 10c5387d Table: 9d4fc019 DAC: 00000051
[ 628.076424] Process ksoftirqd/0 (pid: 3, stack limit = 0xde09c210)
[ 628.082894] Stack: (0xde09dea8 to 0xde09e000)
[ 628.087458] dea0: c0b76d98 00000006 c0b73126 c0b73cac 00000024 c012cd30
[ 628.096024] dec0: 00000001 00000000 00000003 c0b76d40 0000000a 0000801a c0b1a000 c0b113c4
[ 628.104590] dee0: 04208040 00000000 de09defc de021d40 de09c000 00000000 c0b113c4 ffffe000
[ 628.113155] df00: 00000000 00000000 00000000 c012d098 de021d40 c014d1f8 00000000 de021d00
[ 628.121721] df20: de021d40 c014d0e8 00000000 c01494b8 60000093 00000001 00000000 de021d40
[ 628.130287] df40: 00000000 00000001 dead4ead ffffffff ffffffff c0b7728c c0ca6e48 00000000
[ 628.138853] df60: c0859e54 de09df64 de09df64 00000000 00000001 dead4ead ffffffff ffffffff
[ 628.147419] df80: c0b7728c 00000000 00000000 c0859e54 de09df90 de09df90 de021d00 de021d00
[ 628.155984] dfa0: c01493dc 00000000 00000000 c01074fc 00000000 00000000 00000000 00000000
[ 628.164548] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 628.173113] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 628.181685] [] (tasklet_action) from [] (__do_softirq+0x144/0x488)
[ 628.189980] [] (__do_softirq) from [] (run_ksoftirqd+0x24/0x48)
[ 628.198011] [] (run_ksoftirqd) from [] (smpboot_thread_fn+0x110/0x168)
[ 628.206678] [] (smpboot_thread_fn) from [] (kthread+0xdc/0xf0)
[ 628.214615] [] (kthread) from [] (ret_from_fork+0x14/0x38)
[ 628.222182] Code: f1080080 e2554000 1affffef e8bd81f0 (e7f001f2)
[ 628.228585] ---[ end trace ea8a926c2184b999 ]---
[ 628.233421] Kernel panic - not syncing: Fatal exception in interrupt
[ 628.240081] ---[ end Kernel panic - not syncing: Fatal exception in interrupt