From: Tejun Heo <tj@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Spurious lockdep splat in v4.15-rc9
Date: Mon, 22 Jan 2018 09:10:18 -0800 [thread overview]
Message-ID: <20180122171018.GF1096857@devbig577.frc2.facebook.com> (raw)
Hello, Peter, Ingo.
I get the below lockdep warning if I try to write a config into cgroup
cpu.max file. It's warning about A-A deadlock, but it's obviously
spurious - the system doesn't lock up and the warning is about two
get_online_cpus() calls nesting.
Thanks.
[ 79.106704]
[ 79.106886] ============================================
[ 79.107319] WARNING: possible recursive locking detected
[ 79.107741] 4.15.0-rc9-work+ #61 Not tainted
[ 79.108080] --------------------------------------------
[ 79.108505] bash/2133 is trying to acquire lock:
[ 79.108872] (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000b3203afd>] static_key_slow_inc+0xe/0xa0
[ 79.109593]
[ 79.109593] but task is already holding lock:
[ 79.110058] (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000748e6cec>] tg_set_cfs_bandwidth+0x51/0x330
[ 79.110801]
[ 79.110801] other info that might help us debug this:
[ 79.111322] Possible unsafe locking scenario:
[ 79.111322]
[ 79.111792] CPU0
[ 79.111992] ----
[ 79.112197] lock(cpu_hotplug_lock.rw_sem);
[ 79.112537] lock(cpu_hotplug_lock.rw_sem);
[ 79.112880]
[ 79.112880] *** DEADLOCK ***
[ 79.112880]
[ 79.113355] May be due to missing lock nesting notation
[ 79.113355]
[ 79.113893] 5 locks held by bash/2133:
[ 79.114199] #0: (sb_writers#7){.+.+}, at: [<00000000259a9362>] vfs_write+0x18a/0x1c0
[ 79.114830] #1: (&of->mutex){+.+.}, at: [<00000000b1a2a028>] kernfs_fop_write+0xde/0x1a0
[ 79.115492] #2: (kn->count#182){.+.+}, at: [<000000008f74a9a4>] kernfs_fop_write+0xe6/0x1a0
[ 79.116182] #3: (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000748e6cec>] tg_set_cfs_bandwidth+0x51/0x330
[ 79.116956] #4: (cfs_constraints_mutex){+.+.}, at: [<000000007a63f0e9>] tg_set_cfs_bandwidth+0x5f/0x330
[ 79.117717]
[ 79.117717] stack backtrace:
[ 79.118072] CPU: 13 PID: 2133 Comm: bash Not tainted 4.15.0-rc9-work+ #61
[ 79.118616] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-3.el7_4.1 04/01/2014
[ 79.119331] Call Trace:
[ 79.119539] dump_stack+0x5e/0x8f
[ 79.119809] __lock_acquire+0x150e/0x15f0
[ 79.120136] ? tg_set_cfs_bandwidth+0x5f/0x330
[ 79.120497] ? __mutex_lock+0x204/0x930
[ 79.120805] ? tg_set_cfs_bandwidth+0x5f/0x330
[ 79.121164] lock_acquire+0xb0/0x200
[ 79.121454] ? static_key_slow_inc+0xe/0xa0
[ 79.121798] cpus_read_lock+0x43/0xb0
[ 79.122095] ? static_key_slow_inc+0xe/0xa0
[ 79.122438] static_key_slow_inc+0xe/0xa0
[ 79.122763] tg_set_cfs_bandwidth+0x30e/0x330
[ 79.123112] ? tg_set_cfs_bandwidth+0xaa/0x330
[ 79.123473] cpu_max_write+0xb8/0x100
[ 79.123773] cgroup_file_write+0x69/0x200
[ 79.124100] kernfs_fop_write+0x10e/0x1a0
[ 79.124430] __vfs_write+0x23/0x130
[ 79.124721] ? rcu_read_lock_sched_held+0x96/0xa0
[ 79.125100] ? rcu_sync_lockdep_assert+0x2a/0x50
[ 79.125475] ? __sb_start_write+0x194/0x230
[ 79.125812] ? vfs_write+0x18a/0x1c0
[ 79.126109] ? __close_fd+0x66/0xd0
[ 79.126392] vfs_write+0xbf/0x1c0
[ 79.126660] SyS_write+0x45/0xa0
[ 79.126928] entry_SYSCALL_64_fastpath+0x18/0x85
[ 79.127306] RIP: 0033:0x7f3b040e21f0
--
tejun
next reply other threads:[~2018-01-22 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 17:10 Tejun Heo [this message]
2018-01-22 17:40 ` Spurious lockdep splat in v4.15-rc9 Peter Zijlstra
2018-01-22 21:53 ` Peter Zijlstra
2018-01-22 22:03 ` Tejun Heo
2018-01-24 10:38 ` [tip:sched/urgent] sched/core: Fix cpu.max vs. cpuhotplug deadlock tip-bot for Peter Zijlstra
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=20180122171018.GF1096857@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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 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.