[frederic-dynticks:timers/core-v2] [sched/cputime] 241fb10a88: WARNING:possible_recursive_locking_detected

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-lkp
Message-ID <[email protected]>

Hello,

kernel test robot noticed "WARNING:possible_recursive_locking_detected" on:

commit: 241fb10a88a04a5e3170333823d38159e97a5383 ("sched/cputime: Correctly support generic vtime idle time")
https://git.kernel.org/cgit/linux/kernel/git/frederic/linux-dynticks.git timers/core-v2

in testcase: boot

config: x86_64-randconfig-075-20250826
compiler: gcc-14
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 32G

(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 <[email protected]>
| Closes: https://lore.kernel.org/oe-lkp/[email protected]



[   14.567495][    T1] WARNING: possible recursive locking detected
[   14.567495][    T1] 6.19.0-rc2-00003-g241fb10a88a0 #1 Not tainted
[   14.567495][    T1] --------------------------------------------
[   14.567495][    T1] swapper/0/1 is trying to acquire lock:
[   14.567495][    T1] ffffffff86423ce8 (init_task.vtime_seqcount){....}-{0:0}, at: vtime_account_idle (kernel/sched/cputime.c:767)
[   14.567495][    T1]
[   14.567495][    T1] but task is already holding lock:
[   14.567495][    T1] ffffffff86423ce8 (init_task.vtime_seqcount){....}-{0:0}, at: vtime_task_switch_generic (kernel/sched/cputime.c:776)
[   14.567495][    T1]
[   14.567495][    T1] other info that might help us debug this:
[   14.567495][    T1]  Possible unsafe locking scenario:
[   14.567495][    T1]
[   14.567495][    T1]        CPU0
[   14.567495][    T1]        ----
[   14.567495][    T1]   lock(init_task.vtime_seqcount);
[   14.567495][    T1]
[   14.567495][    T1]  *** DEADLOCK ***
[   14.567495][    T1]
[   14.567495][    T1]  May be due to missing lock nesting notation
[   14.567495][    T1]
[   14.567495][    T1] 1 lock held by swapper/0/1:
[   14.567495][    T1]  #0: ffffffff86423ce8 (init_task.vtime_seqcount){....}-{0:0}, at: vtime_task_switch_generic (kernel/sched/cputime.c:776)
[   14.567495][    T1]
[   14.567495][    T1] stack backtrace:
[   14.567495][    T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.19.0-rc2-00003-g241fb10a88a0 #1 PREEMPT(lazy)
[   14.567495][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.567495][    T1] Call Trace:
[   14.567495][    T1]  <TASK>
[   14.567495][    T1]  dump_stack_lvl (lib/dump_stack.c:122)
[   14.567495][    T1]  print_deadlock_bug (kernel/locking/lockdep.c:3044)
[   14.567495][    T1]  validate_chain (kernel/locking/lockdep.c:3897)
[   14.567495][    T1]  __lock_acquire (kernel/locking/lockdep.c:5237 (discriminator 1))
[   14.567495][    T1]  ? vtime_account_idle (kernel/sched/cputime.c:767)
[   14.567495][    T1]  lock_acquire (include/trace/events/lock.h:24 (discriminator 1) kernel/locking/lockdep.c:5831 (discriminator 1))
[   14.567495][    T1]  ? vtime_account_idle (kernel/sched/cputime.c:767)
[   14.567495][    T1]  ? lock_acquire (include/trace/events/lock.h:24 (discriminator 2) kernel/locking/lockdep.c:5831 (discriminator 2))
[   14.567495][    T1]  do_write_seqcount_begin (include/linux/seqlock.h:431 include/linux/seqlock.h:478 include/linux/seqlock.h:503)
[   14.567495][    T1]  ? vtime_account_idle (kernel/sched/cputime.c:767)
[   14.567495][    T1]  vtime_account_idle (kernel/sched/cputime.c:767)
[   14.567495][    T1]  vtime_task_switch_generic (kernel/sched/cputime.c:777)
[   14.567495][    T1]  finish_task_switch+0x11e/0x4a0
[   14.567495][    T1]  ? rest_init (init/main.c:1570)
[   14.567495][    T1]  schedule_tail (kernel/sched/core.c:5185)
[   14.567495][    T1]  ? rest_init (init/main.c:1570)
[   14.567495][    T1]  ret_from_fork (arch/x86/kernel/process.c:157 (discriminator 1))
[   14.567495][    T1]  ? arch_exit_to_user_mode_prepare+0xe0/0xe0
[   14.567495][    T1]  ? __switch_to (arch/x86/include/asm/bitops.h:202 (discriminator 1) arch/x86/include/asm/bitops.h:232 (discriminator 1) include/asm-generic/bitops/instrumented-non-atomic.h:142 (discriminator 1) include/linux/thread_info.h:131 (discriminator 1) include/linux/sched.h:2018 (discriminator 1) arch/x86/include/asm/fpu/sched.h:34 (discriminator 1) arch/x86/kernel/process_64.c:619 (discriminator 1))
[   14.567495][    T1]  ? rest_init (init/main.c:1570)
[   14.567495][    T1]  ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
[   14.567495][    T1]  </TASK>


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20260126/[email protected]



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.