Wind River Support Network

HomeDefectsLIN1018-5703
Fixed

LIN1018-5703 : WARNING: CPU: 5 PID: 9119 at kernel/rcu/tree_plugin.h:309 rcu_note_context_switch+0x130/0x598

Created: Feb 10, 2020    Updated: Apr 13, 2020
Resolved Date: Mar 29, 2020
Found In Version: 10.18.44.1
Fix Version: 10.18.44.16
Severity: Standard
Applicable for: Wind River Linux LTS 18
Component/s: Kernel

Description

we are in a process of WRL8 to WRL18 uplift. During the boot, we found out that a WARNING is emited in the `dmesg`:

 
 [  255.563549] WARNING: CPU: 5 PID: 9119 at kernel/rcu/tree_plugin.h:309 rcu_note_context_switch+0x130/0x598
 [  255.563551] Modules linked in: adkNetD ncp lttng_ring_buffer_client_overwrite(C) lttng_ring_buffer_client_discard(C) lttng_ring_buffer_client_mmap_discard(C) lttng_ring_buffer_metadata_client(C) lttng_ring_buffer_client_mmap_overwrite(C) lttng_probe_printk(C) lttng_ring_buffer_metadata_mmap_client(C) lttng_probe_irq(C) lttng_probe_signal(C) lttng_probe_sched(C) lttng_tracer(C) lttng_statedump(C) lttng_ftrace(C) lttng_lib_ring_buffer(C) lttng_clock_plugin_arm_cntpct(C) lttng_clock(C)
 [  255.563580] CPU: 5 PID: 9119 Comm: lits-tmo-server Tainted: G         C        4.18.20-rt820-custom #1
 [  255.563582] Hardware name: DUS53 (CPM2-30) (DT)
 [  255.563585] pstate: 20000085 (nzCv daIf -PAN -UAO)
 [  255.563588] pc : rcu_note_context_switch+0x130/0x598
 [  255.563590] lr : rcu_note_context_switch+0x24/0x598
 [  255.563592] sp : ffffffc17f91fd30
 [  255.563594] x29: ffffffc17f91fd30 x28: ffffffc190bfdb00
 [  255.563597] x27: ffffff80086e4000 x26: 0000000000000105
 [  255.563601] x25: ffffff80086d3ec0 x24: ffffff8008b19fb8
 [  255.563604] x23: 0000000000000000 x22: ffffffc190bfdb00
 [  255.563607] x21: 0000000000000000 x20: ffffffc190bfdb00
 [  255.563610] x19: ffffffc190bfdb00 x18: 0000000000000000
 [  255.563612] x17: 0000000000000000 x16: ffffff800811dee0
 [  255.563615] x15: 0000000000000000 x14: 00000000f78bff3f
 [  255.563618] x13: 00000000f1b34ed0 x12: 0000000000000105
 [  255.563620] x11: 00000000f1932318 x10: 0000000000000930
 [  255.563623] x9 : ffffffc17f91fca0 x8 : ffffffc190bfe490
 [  255.563626] x7 : 0fffffffffffffff x6 : 0000000000000003
 [  255.563628] x5 : 0000000000000000 x4 : 00000041f7421000
 [  255.563631] x3 : 0000000000000001 x2 : ffffff8008aec000
 [  255.563633] x1 : 0000000000000000 x0 : 0000000000000001
 [  255.563636] Call trace:
 [  255.563639]  rcu_note_context_switch+0x130/0x598
 [  255.563644]  __schedule+0x60/0x5c0
 [  255.563647]  schedule+0x40/0xf0
 [  255.563651]  hrtimer_wait_for_timer+0x60/0x98
 [  255.563655]  timer_wait_for_callback+0x70/0x80
 [  255.563657]  sys_timer_delete+0xa8/0x160
 [  255.563661]  __sys_trace_return+0x0/0x4
 [  255.563662] ---[ end trace 0000000000000002 ]---
  

After some quick search through the `rbs_platform/rcs/rcs-linux-arm` codebase (note that we are using branch `topic/uabmuj/4.18-uplift3`), there is a statement in `kernel/rcu/tree_plugin.h` at the beggining of the function `rcu_preempt_note_context_switch` that emits this WARNING:

 

WARN_ON_ONCE(!preempt && t->rcu_read_lock_nesting > 0 && !sleeping_l);

 

This WARNING is part of the schedule Linux subsystem, specifically, it is a part of the `RCU-preempt`. We didn't have such a WARNING on `wrl8-rcpl20-dev` since it didn't exist. It was introduced later on in commit `5b72f9643b52a`.

  

 

[1] <[https://lkml.org/lkml/2019/7/19/1107]>

[2] Upstream commit: `77c5f4a8fb4da182d855520c3645e94fc8b7531b` on branch `origin/v4.19-rt` from <[https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git]>.
Live chat
Online