cancel
Showing results for 
Search instead for 
Did you mean: 

Linux running on A7 corrupted when FreeRTOS with virtual uart application running on CM4 freeze. How to fix this in Linux 5.4.31?

SunnyGeGe
Associate III

We have an virtual uart FreeRTOS application running on CM4, it captures SPI data and sends to A7 through virtual uart. Sometimes, the FreeRTOS application freezed, A7 can not read the data through /dev/ttyRPMSG0 again, at the same thime, Linux 5.4.31 running on A7 corrupted. the following is the log of Linux kernel.

[  491.026690] rcu: INFO: rcu_preempt self-detected stall on CPU
[  491.026718] rcu:     0-....: (2099 ticks this GP) idle=592/1/0x40000004 softirq=15656/15656 fqs=1049 
[  491.026727]  (t=2100 jiffies g=19741 q=7229)
[  491.026736] NMI backtrace for cpu 0
[  491.026749] CPU: 0 PID: 155 Comm: kworker/0:4 Tainted: G            E     5.4.31 #1
[  491.026754] Hardware name: STM32 (Device Tree Support)
[  491.026779] Workqueue: mlahb:m4@10000000 stm32_rproc_mb_vq_work
[  491.026814] [<c01124dc>] (unwind_backtrace) from [<c010d784>] (show_stack+0x10/0x14)
[  491.026837] [<c010d784>] (show_stack) from [<c0beacf4>] (dump_stack+0xb0/0xc4)
[  491.026860] [<c0beacf4>] (dump_stack) from [<c0bf1a7c>] (nmi_cpu_backtrace+0x88/0xbc)
[  491.026880] [<c0bf1a7c>] (nmi_cpu_backtrace) from [<c0bf1bdc>] (nmi_trigger_cpumask_backtrace+0x12c/0x1a0)
[  491.026903] [<c0bf1bdc>] (nmi_trigger_cpumask_backtrace) from [<c0196070>] (rcu_dump_cpu_stacks+0xa4/0xcc)
[  491.026924] [<c0196070>] (rcu_dump_cpu_stacks) from [<c019504c>] (rcu_sched_clock_irq+0x9d8/0xc90)
[  491.026947] [<c019504c>] (rcu_sched_clock_irq) from [<c019eedc>] (update_process_times+0x30/0x60)
[  491.026967] [<c019eedc>] (update_process_times) from [<c01b1f1c>] (tick_sched_handle+0x54/0x60)
[  491.026983] [<c01b1f1c>] (tick_sched_handle) from [<c01b2174>] (tick_sched_timer+0x58/0xb4)
[  491.027000] [<c01b2174>] (tick_sched_timer) from [<c019ff24>] (__hrtimer_run_queues+0x174/0x3e8)
[  491.027019] [<c019ff24>] (__hrtimer_run_queues) from [<c01a0d30>] (hrtimer_interrupt+0x128/0x2d0)
[  491.027040] [<c01a0d30>] (hrtimer_interrupt) from [<c091bfe4>] (arch_timer_handler_virt+0x28/0x30)
[  491.027060] [<c091bfe4>] (arch_timer_handler_virt) from [<c01801d4>] (handle_percpu_devid_irq+0xa0/0x2c4)
[  491.027080] [<c01801d4>] (handle_percpu_devid_irq) from [<c0179eb8>] (generic_handle_irq+0x24/0x34)
[  491.027098] [<c0179eb8>] (generic_handle_irq) from [<c017a4b0>] (__handle_domain_irq+0x7c/0xe8)
[  491.027119] [<c017a4b0>] (__handle_domain_irq) from [<c05e2a58>] (gic_handle_irq+0x4c/0x90)
[  491.027139] [<c05e2a58>] (gic_handle_irq) from [<c0101a8c>] (__irq_svc+0x6c/0xa8)
[  491.027147] Exception stack(0xd191dba0 to 0xd191dbe8)
[  491.027164] dba0: c0f7f5cc 00000000 1e960000 c1180400 c1180400 00000000 c11803cc 00000202
[  491.027180] dbc0: d191c000 00000000 df010800 d191dbf0 00000000 d191dbf0 c0102254 c0102268
[  491.027189] dbe0: 20070113 ffffffff
[  491.027208] [<c0101a8c>] (__irq_svc) from [<c0102268>] (__do_softirq+0xc0/0x43c)
[  491.027226] [<c0102268>] (__do_softirq) from [<c012ca8c>] (irq_exit+0xc8/0xe0)
[  491.027245] [<c012ca8c>] (irq_exit) from [<c017a4b4>] (__handle_domain_irq+0x80/0xe8)
[  491.027266] [<c017a4b4>] (__handle_domain_irq) from [<c05e2a58>] (gic_handle_irq+0x4c/0x90)
[  491.027284] [<c05e2a58>] (gic_handle_irq) from [<c0101a8c>] (__irq_svc+0x6c/0xa8)
[  491.027291] Exception stack(0xd191dc90 to 0xd191dcd8)
[  491.027301] dc80:                                     60070093 1e960000 00000000 20070013
[  491.027316] dca0: 00000000 00000000 c12f4e0c c12f45e0 0000005f c12f45e8 c1204ea8 c12f40e0
[  491.027328] dcc0: c12774c8 d191dce0 c01777fc c0177804 60070013 ffffffff
[  491.027344] [<c0101a8c>] (__irq_svc) from [<c0177804>] (console_unlock.part.0+0x354/0x520)
[  491.027361] [<c0177804>] (console_unlock.part.0) from [<c0178f10>] (vprintk_emit+0x160/0x234)
[  491.027381] [<c0178f10>] (vprintk_emit) from [<c06e6ac0>] (dev_vprintk_emit+0x1e0/0x204)
[  491.027400] [<c06e6ac0>] (dev_vprintk_emit) from [<c06e6b14>] (dev_printk_emit+0x30/0x5c)
[  491.027416] [<c06e6b14>] (dev_printk_emit) from [<c06e6bb0>] (__dev_printk+0x70/0x84)
[  491.027432] [<c06e6bb0>] (__dev_printk) from [<c06e6dcc>] (_dev_err+0x48/0x74)
[  491.027452] [<c06e6dcc>] (_dev_err) from [<c09466d4>] (rpmsg_tty_cb+0x130/0x15c)
[  491.027474] [<c09466d4>] (rpmsg_tty_cb) from [<c0947c78>] (rpmsg_recv_done+0xb0/0x2ac)
[  491.027497] [<c0947c78>] (rpmsg_recv_done) from [<c0644c60>] (vring_interrupt+0x7c/0xe8)
[  491.027517] [<c0644c60>] (vring_interrupt) from [<c09452d8>] (stm32_rproc_mb_vq_work+0x1c/0x54)
[  491.027537] [<c09452d8>] (stm32_rproc_mb_vq_work) from [<c01424b8>] (process_one_work+0x1dc/0x58c)
[  491.027554] [<c01424b8>] (process_one_work) from [<c01428b4>] (worker_thread+0x4c/0x528)
[  491.027572] [<c01428b4>] (worker_thread) from [<c0148810>] (kthread+0x11c/0x144)
[  491.027590] [<c0148810>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  491.027597] Exception stack(0xd191dfb0 to 0xd191dff8)
[  491.027608] dfa0:                                     00000000 00000000 00000000 00000000
[  491.027621] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  491.027632] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000

How to fix this issue and keep Linux running when CM4 freezed, so we can restart it again?

0 REPLIES 0