public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<linux-kernel@vger.kernel.org>,
	Lai Jiangshan <jiangshan.ljs@antgroup.com>,
	Tejun Heo <tj@kernel.org>,
	"Lai Jiangshan" <jiangshanlai@gmail.com>, <oliver.sang@intel.com>
Subject: Re: [PATCH V2 4/5] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.
Date: Mon, 8 Jul 2024 15:54:19 +0800	[thread overview]
Message-ID: <202407081521.83b627c1-lkp@intel.com> (raw)
In-Reply-To: <20240704034915.2164-5-jiangshanlai@gmail.com>



Hello,

kernel test robot noticed "WARNING:possible_recursive_locking_detected" on:

commit: 1d4c6111406c8306a9b87ba6c496996cd4539cfd ("[PATCH V2 4/5] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.")
url: https://github.com/intel-lab-lkp/linux/commits/Lai-Jiangshan/workqueue-Register-sysfs-after-the-whole-creation-of-the-new-wq/20240705-043238
base: v6.10-rc5
patch subject: [PATCH V2 4/5] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.

in testcase: rcutorture
version: 
with following parameters:

	runtime: 300s
	test: default
	torture_type: srcu



compiler: gcc-13
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(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/202407081521.83b627c1-lkp@intel.com


[    2.233457][    T1] WARNING: possible recursive locking detected
[    2.233457][    T1] 6.10.0-rc5-00004-g1d4c6111406c #1 Not tainted
[    2.233457][    T1] --------------------------------------------
[    2.233457][    T1] swapper/0/1 is trying to acquire lock:
[ 2.233457][ T1] c27760f4 (cpu_hotplug_lock){++++}-{0:0}, at: alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) 
[    2.233457][    T1]
[    2.233457][    T1] but task is already holding lock:
[ 2.233457][ T1] c27760f4 (cpu_hotplug_lock){++++}-{0:0}, at: padata_alloc (kernel/padata.c:1007) 
[    2.233457][    T1]
[    2.233457][    T1] other info that might help us debug this:
[    2.245549][    T1]  Possible unsafe locking scenario:
[    2.245549][    T1]
[    2.245549][    T1]        CPU0
[    2.245549][    T1]        ----
[    2.245549][    T1]   lock(cpu_hotplug_lock);
[    2.245549][    T1]
[    2.245549][    T1]  *** DEADLOCK ***
[    2.245549][    T1]
[    2.251678][    T1]  May be due to missing lock nesting notation
[    2.251678][    T1]
[    2.253463][    T1] 1 lock held by swapper/0/1:
[ 2.253463][ T1] #0: c27760f4 (cpu_hotplug_lock){++++}-{0:0}, at: padata_alloc (kernel/padata.c:1007) 
[    2.253463][    T1]
[    2.253463][    T1] stack backtrace:
[    2.257461][    T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.10.0-rc5-00004-g1d4c6111406c #1 c89023213b7b89ade58aa28d4c172b811b00908c
[    2.257461][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[    2.261462][    T1] Call Trace:
[ 2.261462][ T1] dump_stack_lvl (lib/dump_stack.c:117) 
[ 2.261462][ T1] dump_stack (lib/dump_stack.c:124) 
[ 2.261462][ T1] print_deadlock_bug (kernel/locking/lockdep.c:3013) 
[ 2.265464][ T1] validate_chain (kernel/locking/lockdep.c:3859) 
[ 2.265464][ T1] __lock_acquire (kernel/locking/lockdep.c:5137 (discriminator 1)) 
[ 2.265464][ T1] ? __this_cpu_preempt_check (lib/smp_processor_id.c:67) 
[ 2.265464][ T1] lock_acquire (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5756) 
[ 2.265464][ T1] ? alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) 
[ 2.269463][ T1] ? __might_sleep (kernel/sched/core.c:10126) 
[ 2.269463][ T1] ? is_dynamic_key (include/linux/rcupdate.h:779 kernel/locking/lockdep.c:1257) 
[ 2.269463][ T1] cpus_read_lock (include/linux/percpu-rwsem.h:53 kernel/cpu.c:488) 
[ 2.269463][ T1] ? alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) 
[ 2.273463][ T1] alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) 
[ 2.273463][ T1] padata_alloc (kernel/padata.c:1007 (discriminator 1)) 
[ 2.273463][ T1] ? nhpoly1305_mod_init (crypto/pcrypt.c:345) 
[ 2.273463][ T1] pcrypt_init_padata (crypto/pcrypt.c:327 (discriminator 1)) 
[ 2.277463][ T1] ? nhpoly1305_mod_init (crypto/pcrypt.c:345) 
[ 2.277463][ T1] pcrypt_init (crypto/pcrypt.c:353) 
[ 2.277463][ T1] ? nhpoly1305_mod_init (crypto/pcrypt.c:345) 
[ 2.277463][ T1] do_one_initcall (init/main.c:1267) 
[ 2.281464][ T1] ? next_arg (lib/cmdline.c:274) 
[ 2.281464][ T1] do_initcalls (init/main.c:1328 (discriminator 1) init/main.c:1345 (discriminator 1)) 
[ 2.281464][ T1] ? rdinit_setup (init/main.c:1313) 
[ 2.281464][ T1] kernel_init_freeable (init/main.c:1364) 
[ 2.285464][ T1] ? kernel_init (init/main.c:1469) 
[ 2.285464][ T1] ? rest_init (init/main.c:1459) 
[ 2.285464][ T1] kernel_init (init/main.c:1469) 
[ 2.285464][ T1] ? schedule_tail (kernel/sched/core.c:5346) 
[ 2.285464][ T1] ret_from_fork (arch/x86/kernel/process.c:153) 
[ 2.289466][ T1] ? rest_init (init/main.c:1459) 
[ 2.289466][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:737) 
[ 2.289466][ T1] entry_INT80_32 (arch/x86/entry/entry_32.S:944) 



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240708/202407081521.83b627c1-lkp@intel.com



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


  reply	other threads:[~2024-07-08  7:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  3:49 [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 1/5] workqueue: Register sysfs after the whole creation of the new wq Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 2/5] workqueue: Make rescuer initialization as the last step of the creation of a " Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 3/5] workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs() Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 4/5] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S Lai Jiangshan
2024-07-08  7:54   ` kernel test robot [this message]
2024-07-08 18:16     ` Tejun Heo
2024-07-09 14:55       ` Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 5/5] workqueue: Init rescuer's affinities as the wq's effective cpumask Lai Jiangshan
2024-07-05 19:15 ` [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic Tejun Heo

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=202407081521.83b627c1-lkp@intel.com \
    --to=oliver.sang@intel.com \
    --cc=jiangshan.ljs@antgroup.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=tj@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox