All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: <kaixuxia@tencent.com>, <frankjpliu@tencent.com>,
	<kasong@tencent.com>, <sagazchen@tencent.com>,
	<kernelxing@tencent.com>, <aurelianliu@tencent.com>,
	<deshengwu@tencent.com>, <flyingpeng@tencent.com>,
	<jingqunli@tencent.com>, <jason.zeng@intel.com>,
	<wu.zheng@intel.com>, <yingbao.jia@intel.com>,
	<pei.p.jia@intel.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>, <oliver.sang@intel.com>
Subject: [opencloudos:next] [rue/mm]  0d35c4c639: WARNING:suspicious_RCU_usage
Date: Wed, 9 Oct 2024 16:13:05 +0800	[thread overview]
Message-ID: <202410091610.3345ae6c-oliver.sang@intel.com> (raw)



Hello,

kernel test robot noticed "WARNING:suspicious_RCU_usage" on:

commit: 0d35c4c63934d43cba984351ade6326acfe3a631 ("rue/mm: introduce memcg priority oom")
https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git next

in testcase: kernel-selftests
version: kernel-selftests-x86_64-977d51cf-1_20240508
with following parameters:

	group: cgroup



compiler: gcc-12
test machine: 256 threads 4 sockets INTEL(R) XEON(R) PLATINUM 8592+ (Emerald Rapids) with 256G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)



If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202410091610.3345ae6c-oliver.sang@intel.com


kern  :warn  : [  245.730287] WARNING: suspicious RCU usage
kern  :warn  : [  245.736314] 6.6.47-01324-g0d35c4c63934 #1 Not tainted
kern  :warn  : [  245.743549] -----------------------------
kern  :warn  : [  245.749628] include/linux/cgroup.h:444 suspicious rcu_dereference_check() usage!
kern  :warn  : [  245.759512]
other info that might help us debug this:

kern  :warn  : [  245.773278]
rcu_scheduler_active = 2, debug_locks = 1
kern  :warn  : [  245.783602] 3 locks held by test_memcontrol/4377:
kern :warn : [  245.790454] #0: ff11000249029660 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu (include/linux/mm.h:676 mm/memory.c:5477) 
kern :warn : [  245.802662] #1: ffffffff85be7e00 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg (mm/memcontrol.c:2242 mm/memcontrol.c:3175) 
kern :warn : [  245.814572] #2: ffffffff85b46ac8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory (mm/memcontrol.c:2005) 
kern  :warn  : [  245.826088]
stack backtrace:
kern  :warn  : [  245.834229] CPU: 1 PID: 4377 Comm: test_memcontrol Not tainted 6.6.47-01324-g0d35c4c63934 #1
kern  :warn  : [  245.845455] Call Trace:
kern  :warn  : [  245.849940]  <TASK>
kern :warn : [  245.854030] dump_stack_lvl (lib/dump_stack.c:108) 
kern :warn : [  245.859894] dump_stack (lib/dump_stack.c:115) 
kern :warn : [  245.865360] lockdep_rcu_suspicious (include/linux/context_tracking.h:153 kernel/locking/lockdep.c:6713) 
kern :warn : [  245.872211] mem_cgroup_account_oom_skip (include/linux/cgroup.h:444 mm/memcontrol.c:1069 mm/memcontrol.c:1368) 
kern :warn : [  245.879557] oom_evaluate_task (mm/oom_kill.c:372) 
kern :warn : [  245.885928] ? oom_badness (mm/oom_kill.c:313) 
kern :warn : [  245.891907] mem_cgroup_scan_tasks (mm/memcontrol.c:1482) 
kern :warn : [  245.898580] ? mem_cgroup_account_oom_skip (mm/memcontrol.c:1468) 
kern :warn : [  245.906133] ? lock_sync (kernel/locking/lockdep.c:5722) 
kern :warn : [  245.911942] ? trace_contention_end (include/trace/events/lock.h:122 include/trace/events/lock.h:122) 
kern :warn : [  245.918831] mem_cgroup_select_bad_process (mm/memcontrol.c:1515) 
kern :warn : [  245.926414] mem_cgroup_oom_select_bad_process (mm/memcontrol.c:1553) 
kern :warn : [  245.934290] out_of_memory (mm/oom_kill.c:1172) 
kern :warn : [  245.940308] ? oom_killer_disable (mm/oom_kill.c:1119) 
kern :warn : [  245.947020] mem_cgroup_out_of_memory (mm/memcontrol.c:2015) 
kern :warn : [  245.954124] ? mem_cgroup_margin (mm/memcontrol.c:1995) 
kern :warn : [  245.960748] ? __kasan_check_read (mm/kasan/shadow.c:32) 
kern :warn : [  245.967279] ? do_raw_spin_unlock (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:444 include/linux/atomic/atomic-instrumented.h:33 include/asm-generic/qspinlock.h:57 kernel/locking/spinlock_debug.c:100 kernel/locking/spinlock_debug.c:140) 
kern :warn : [  245.973905] ? _raw_spin_unlock (arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) 
kern :warn : [  245.980246] try_charge_memcg (mm/memcontrol.c:2248 mm/memcontrol.c:3175) 
kern :warn : [  245.986787] ? mem_cgroup_handle_over_high (mm/memcontrol.c:3060) 
kern :warn : [  245.994404] ? reacquire_held_locks (kernel/locking/lockdep.c:5405) 
kern :warn : [  246.001344] ? reacquire_held_locks (kernel/locking/lockdep.c:5405) 
kern :warn : [  246.008292] ? rcu_read_unlock (include/linux/rcupdate.h:344 (discriminator 9) include/linux/rcupdate.h:819 (discriminator 9)) 
kern :warn : [  246.014543] ? lock_release (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5776) 
kern :warn : [  246.020717] charge_memcg (mm/memcontrol.c:8092) 
kern :warn : [  246.026588] __mem_cgroup_charge (include/linux/cgroup_refcnt.h:78 mm/memcontrol.c:8113) 
kern :warn : [  246.033060] do_anonymous_page (mm/memory.c:4140) 
kern :warn : [  246.039634] ? rcu_read_unlock (include/linux/rcupdate.h:344 (discriminator 9) include/linux/rcupdate.h:819 (discriminator 9)) 
kern :warn : [  246.045929] handle_pte_fault (mm/memory.c:3673 mm/memory.c:5004) 
kern :warn : [  246.052309] ? do_numa_page (mm/memory.c:4971) 
kern :warn : [  246.058689] __handle_mm_fault (mm/memory.c:5156) 
kern :warn : [  246.065175] ? __down_read_trylock (arch/x86/include/asm/atomic64_64.h:20 include/linux/atomic/atomic-arch-fallback.h:2602 include/linux/atomic/atomic-long.h:79 include/linux/atomic/atomic-instrumented.h:3196 kernel/locking/rwsem.c:176 kernel/locking/rwsem.c:181 kernel/locking/rwsem.c:1288) 
kern :warn : [  246.072058] ? copy_page_range (mm/memory.c:5067) 
kern :warn : [  246.078557] ? lock_mm_and_find_vma (mm/memory.c:5467) 
kern :warn : [  246.085551] handle_mm_fault (mm/memory.c:5321) 
kern :warn : [  246.091857] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4566) 
kern :warn : [  246.100232] do_user_addr_fault (arch/x86/mm/fault.c:1324) 
kern :warn : [  246.106857] exc_page_fault (arch/x86/include/asm/irqflags.h:26 arch/x86/include/asm/irqflags.h:67 arch/x86/include/asm/irqflags.h:127 arch/x86/mm/fault.c:1473 arch/x86/mm/fault.c:1521) 
kern :warn : [  246.112892] asm_exc_page_fault (arch/x86/include/asm/idtentry.h:570) 
kern  :warn  : [  246.119322] RIP: 0033:0x560d42a8c335
kern :warn : [ 246.125238] Code: 48 89 75 d0 48 8b 45 d0 48 89 45 f0 48 8b 45 f0 48 89 c7 e8 9d be ff ff 48 89 45 e8 48 8b 45 e8 48 89 45 f8 eb 0f 48 8b 45 f8 <c6> 00 00 48 81 45 f8 00 10 00 00 48 8b 55 e8 48 8b 45 f0 48 01 d0
All code
========
   0:	48 89 75 d0          	mov    %rsi,-0x30(%rbp)
   4:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
   8:	48 89 45 f0          	mov    %rax,-0x10(%rbp)
   c:	48 8b 45 f0          	mov    -0x10(%rbp),%rax
  10:	48 89 c7             	mov    %rax,%rdi
  13:	e8 9d be ff ff       	call   0xffffffffffffbeb5
  18:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
  1c:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
  20:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
  24:	eb 0f                	jmp    0x35
  26:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
  2a:*	c6 00 00             	movb   $0x0,(%rax)		<-- trapping instruction
  2d:	48 81 45 f8 00 10 00 	addq   $0x1000,-0x8(%rbp)
  34:	00 
  35:	48 8b 55 e8          	mov    -0x18(%rbp),%rdx
  39:	48 8b 45 f0          	mov    -0x10(%rbp),%rax
  3d:	48 01 d0             	add    %rdx,%rax

Code starting with the faulting instruction
===========================================
   0:	c6 00 00             	movb   $0x0,(%rax)
   3:	48 81 45 f8 00 10 00 	addq   $0x1000,-0x8(%rbp)
   a:	00 
   b:	48 8b 55 e8          	mov    -0x18(%rbp),%rdx
   f:	48 8b 45 f0          	mov    -0x10(%rbp),%rax
  13:	48 01 d0             	add    %rdx,%rax
kern  :warn  : [  246.148339] RSP: 002b:00007ffd6a0abda0 EFLAGS: 00010287
kern  :warn  : [  246.156206] RAX: 00007f5b70e58010 RBX: 00007ffd6a0acfd8 RCX: 00007f5b6de7e010
kern  :warn  : [  246.166245] RDX: 00007f5b6de7e010 RSI: 0000000006400000 RDI: 00007f5b6de7e010
kern  :warn  : [  246.176278] RBP: 00007ffd6a0abdd0 R08: 00000000ffffffff R09: 0000000000000000
kern  :warn  : [  246.186285] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000000000
kern  :warn  : [  246.196263] R13: 00007ffd6a0acfe8 R14: 0000560d42a8fdc8 R15: 00007f5b744a5020
kern  :warn  : [  246.206221]  </TASK>
kern  :warn  : [  246.210599] test_memcontrol invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
kern  :warn  : [  246.222662] CPU: 1 PID: 4377 Comm: test_memcontrol Not tainted 6.6.47-01324-g0d35c4c63934 #1
kern  :warn  : [  246.234067] Call Trace:
kern  :warn  : [  246.238716]  <TASK>
kern :warn : [  246.242931] dump_stack_lvl (lib/dump_stack.c:108) 
kern :warn : [  246.248908] dump_stack (lib/dump_stack.c:115) 
kern :warn : [  246.254497] dump_header (mm/oom_kill.c:74 mm/oom_kill.c:476) 
kern :warn : [  246.260373] ? do_raw_spin_unlock (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:444 include/linux/atomic/atomic-instrumented.h:33 include/asm-generic/qspinlock.h:57 kernel/locking/spinlock_debug.c:100 kernel/locking/spinlock_debug.c:140) 
kern :warn : [  246.267032] oom_kill_process (mm/oom_kill.c:1048) 
kern :warn : [  246.273399] out_of_memory (mm/oom_kill.c:1186 (discriminator 4)) 
kern :warn : [  246.279478] ? oom_killer_disable (mm/oom_kill.c:1119) 
kern :warn : [  246.286233] mem_cgroup_out_of_memory (mm/memcontrol.c:2015) 
kern :warn : [  246.293365] ? mem_cgroup_margin (mm/memcontrol.c:1995) 
kern :warn : [  246.300011] ? __kasan_check_read (mm/kasan/shadow.c:32) 
kern :warn : [  246.306547] ? do_raw_spin_unlock (arch/x86/include/asm/atomic.h:23 include/linux/atomic/atomic-arch-fallback.h:444 include/linux/atomic/atomic-instrumented.h:33 include/asm-generic/qspinlock.h:57 kernel/locking/spinlock_debug.c:100 kernel/locking/spinlock_debug.c:140) 
kern :warn : [  246.313190] ? _raw_spin_unlock (arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) 
kern :warn : [  246.319539] try_charge_memcg (mm/memcontrol.c:2248 mm/memcontrol.c:3175) 
kern :warn : [  246.326087] ? mem_cgroup_handle_over_high (mm/memcontrol.c:3060) 
kern :warn : [  246.333692] ? reacquire_held_locks (kernel/locking/lockdep.c:5405) 
kern :warn : [  246.340601] ? reacquire_held_locks (kernel/locking/lockdep.c:5405) 
kern :warn : [  246.347500] ? rcu_read_unlock (include/linux/rcupdate.h:344 (discriminator 9) include/linux/rcupdate.h:819 (discriminator 9)) 
kern :warn : [  246.353693] ? lock_release (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5776) 
kern :warn : [  246.359793] charge_memcg (mm/memcontrol.c:8092) 
kern :warn : [  246.365578] __mem_cgroup_charge (include/linux/cgroup_refcnt.h:78 mm/memcontrol.c:8113) 
kern :warn : [  246.371938] do_anonymous_page (mm/memory.c:4140) 
kern :warn : [  246.378400] ? rcu_read_unlock (include/linux/rcupdate.h:344 (discriminator 9) include/linux/rcupdate.h:819 (discriminator 9)) 
kern :warn : [  246.384579] handle_pte_fault (mm/memory.c:3673 mm/memory.c:5004) 
kern :warn : [  246.390852] ? do_numa_page (mm/memory.c:4971) 
kern :warn : [  246.397129] __handle_mm_fault (mm/memory.c:5156) 
kern :warn : [  246.403496] ? __down_read_trylock (arch/x86/include/asm/atomic64_64.h:20 include/linux/atomic/atomic-arch-fallback.h:2602 include/linux/atomic/atomic-long.h:79 include/linux/atomic/atomic-instrumented.h:3196 kernel/locking/rwsem.c:176 kernel/locking/rwsem.c:181 kernel/locking/rwsem.c:1288) 
kern :warn : [  246.410257] ? copy_page_range (mm/memory.c:5067) 
kern :warn : [  246.416634] ? lock_mm_and_find_vma (mm/memory.c:5467) 
kern :warn : [  246.423493] handle_mm_fault (mm/memory.c:5321) 
kern :warn : [  246.429664] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4566) 
kern :warn : [  246.437894] do_user_addr_fault (arch/x86/mm/fault.c:1324) 
kern :warn : [  246.444367] exc_page_fault (arch/x86/include/asm/irqflags.h:26 arch/x86/include/asm/irqflags.h:67 arch/x86/include/asm/irqflags.h:127 arch/x86/mm/fault.c:1473 arch/x86/mm/fault.c:1521) 
kern :warn : [  246.450243] asm_exc_page_fault (arch/x86/include/asm/idtentry.h:570) 
kern  :warn  : [  246.456506] RIP: 0033:0x560d42a8c335
kern :warn : [ 246.462273] Code: 48 89 75 d0 48 8b 45 d0 48 89 45 f0 48 8b 45 f0 48 89 c7 e8 9d be ff ff 48 89 45 e8 48 8b 45 e8 48 89 45 f8 eb 0f 48 8b 45 f8 <c6> 00 00 48 81 45 f8 00 10 00 00 48 8b 55 e8 48 8b 45 f0 48 01 d0
All code
========
   0:	48 89 75 d0          	mov    %rsi,-0x30(%rbp)
   4:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
   8:	48 89 45 f0          	mov    %rax,-0x10(%rbp)
   c:	48 8b 45 f0          	mov    -0x10(%rbp),%rax
  10:	48 89 c7             	mov    %rax,%rdi
  13:	e8 9d be ff ff       	call   0xffffffffffffbeb5
  18:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
  1c:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
  20:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
  24:	eb 0f                	jmp    0x35
  26:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
  2a:*	c6 00 00             	movb   $0x0,(%rax)		<-- trapping instruction
  2d:	48 81 45 f8 00 10 00 	addq   $0x1000,-0x8(%rbp)
  34:	00 
  35:	48 8b 55 e8          	mov    -0x18(%rbp),%rdx


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241009/202410091610.3345ae6c-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


                 reply	other threads:[~2024-10-09  8:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202410091610.3345ae6c-oliver.sang@intel.com \
    --to=oliver.sang@intel.com \
    --cc=aurelianliu@tencent.com \
    --cc=deshengwu@tencent.com \
    --cc=flyingpeng@tencent.com \
    --cc=frankjpliu@tencent.com \
    --cc=jason.zeng@intel.com \
    --cc=jingqunli@tencent.com \
    --cc=kaixuxia@tencent.com \
    --cc=kasong@tencent.com \
    --cc=kernelxing@tencent.com \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=pei.p.jia@intel.com \
    --cc=sagazchen@tencent.com \
    --cc=wu.zheng@intel.com \
    --cc=yingbao.jia@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.