cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cgroup/for-next: WARNING: possible circular locking dependency detected in cpuset_write_resmask
@ 2017-11-28  1:22 Andrei Vagin
  2017-11-28 11:35 ` [PATCH] cgroup/cpuset: fix circular locking dependency Prateek Sood
  0 siblings, 1 reply; 40+ messages in thread
From: Andrei Vagin @ 2017-11-28  1:22 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA, Tejun Heo, Prateek Sood

Hi,

We run CRIU tests for cgroup/for-next regularly, and today they
detected this warning:


[  380.301034] ======================================================
[  380.301096] WARNING: possible circular locking dependency detected
[  380.301159] 4.15.0-rc1+ #1 Not tainted
[  380.301223] ------------------------------------------------------
[  380.301284] criu/14277 is trying to acquire lock:
[  380.301346]  (cpuset_mutex){+.+.}, at: [<ffffffffb3160191>]
cpuset_write_resmask+0x61/0x1100
[  380.301423]
[  380.301423] but task is already holding lock:
[  380.301489]  (cpu_hotplug_lock.rw_sem){++++}, at:
[<ffffffffb3160183>] cpuset_write_resmask+0x53/0x1100
[  380.301559]
[  380.301559] which lock already depends on the new lock.
[  380.301559]
[  380.301632]
[  380.301632] the existing dependency chain (in reverse order) is:
[  380.301699]
[  380.301699] -> #1 (cpu_hotplug_lock.rw_sem){++++}:
[  380.301770]        cpus_read_lock+0x3e/0x80
[  380.301835]        static_key_slow_inc+0xe/0xa0
[  380.301897]        cpuset_css_online+0x62/0x330
[  380.301961]        online_css+0x26/0x80
[  380.302022]        cgroup_apply_control_enable+0x266/0x3d0
[  380.302084]        cgroup_mkdir+0x37d/0x4f0
[  380.302148]        kernfs_iop_mkdir+0x53/0x80
[  380.302213]        vfs_mkdir+0x10e/0x1a0
[  380.302275]        SyS_mkdirat+0xb3/0xe0
[  380.302338]        entry_SYSCALL_64_fastpath+0x23/0x9a
[  380.302399]
[  380.302399] -> #0 (cpuset_mutex){+.+.}:
[  380.302468]        lock_acquire+0xec/0x1e0
[  380.302531]        __mutex_lock+0x89/0x920
[  380.302593]        cpuset_write_resmask+0x61/0x1100
[  380.302655]        cgroup_file_write+0x7b/0x200
[  380.302716]        kernfs_fop_write+0x112/0x1a0
[  380.302779]        __vfs_write+0x23/0x150
[  380.302840]        vfs_write+0xc8/0x1c0
[  380.302901]        SyS_write+0x45/0xa0
[  380.302963]        entry_SYSCALL_64_fastpath+0x23/0x9a
[  380.303023]
[  380.303023] other info that might help us debug this:
[  380.303023]
[  380.303095]  Possible unsafe locking scenario:
[  380.303095]
[  380.303162]        CPU0                    CPU1
[  380.303225]        ----                    ----
[  380.303285]   lock(cpu_hotplug_lock.rw_sem);
[  380.303347]                                lock(cpuset_mutex);
[  380.303408]                                lock(cpu_hotplug_lock.rw_sem);
[  380.303470]   lock(cpuset_mutex);
[  380.303531]
[  380.303531]  *** DEADLOCK ***
[  380.303531]
[  380.303609] 3 locks held by criu/14277:
[  380.303677]  #0:  (sb_writers#12){.+.+}, at: [<ffffffffb3284a70>]
vfs_write+0x1a0/0x1c0
[  380.303746]  #1:  (&of->mutex){+.+.}, at: [<ffffffffb3317dc2>]
kernfs_fop_write+0xe2/0x1a0
[  380.303816]  #2:  (cpu_hotplug_lock.rw_sem){++++}, at:
[<ffffffffb3160183>] cpuset_write_resmask+0x53/0x1100
[  380.303886]
[  380.303886] stack backtrace:
[  380.303953] CPU: 0 PID: 14277 Comm: criu Not tainted 4.15.0-rc1+ #1
[  380.304015] Hardware name: Google Google Compute Engine/Google
Compute Engine, BIOS Google 01/01/2011
[  380.304081] Call Trace:
[  380.304146]  dump_stack+0x7c/0xbe
[  380.304212]  print_circular_bug+0x20d/0x320
[  380.304276]  ? copy_trace+0xb0/0xb0
[  380.304337]  check_prev_add+0x41d/0x770
[  380.304400]  ? __lock_acquire+0x1091/0x1130
[  380.304461]  __lock_acquire+0x1091/0x1130
[  380.304523]  lock_acquire+0xec/0x1e0
[  380.304586]  ? cpuset_write_resmask+0x61/0x1100
[  380.304649]  __mutex_lock+0x89/0x920
[  380.304711]  ? cpuset_write_resmask+0x61/0x1100
[  380.304774]  ? cpuset_write_resmask+0x61/0x1100
[  380.304837]  ? cpuset_write_resmask+0x27f/0x1100
[  380.304900]  ? cpuset_write_resmask+0x27f/0x1100
[  380.304962]  ? cpuset_write_resmask+0x61/0x1100
[  380.305024]  cpuset_write_resmask+0x61/0x1100
[  380.305086]  ? kernfs_fop_write+0xea/0x1a0
[  380.305148]  cgroup_file_write+0x7b/0x200
[  380.305215]  kernfs_fop_write+0x112/0x1a0
[  380.305277]  __vfs_write+0x23/0x150
[  380.305341]  ? rcu_read_lock_sched_held+0x3f/0x70
[  380.305404]  ? rcu_sync_lockdep_assert+0x2a/0x50
[  380.305466]  ? __sb_start_write+0xd2/0x1b0
[  380.305527]  ? vfs_write+0x1a0/0x1c0
[  380.305588]  vfs_write+0xc8/0x1c0
[  380.305650]  SyS_write+0x45/0xa0
[  380.305712]  entry_SYSCALL_64_fastpath+0x23/0x9a
[  380.305774] RIP: 0033:0x145971dc4330
[  380.305835] RSP: 002b:00007ffeaffb30b8 EFLAGS: 00000246 ORIG_RAX:
0000000000000001
[  380.305903] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000145971dc4330
[  380.305964] RDX: 0000000000000003 RSI: 000000000137aac0 RDI: 0000000000000003
[  380.306026] RBP: 0000000000000000 R08: 737570632e746573 R09: 6f72702070756f72
[  380.306087] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000137b440
[  380.306149] R13: 0000000001373448 R14: 0000000001373450 R15: 000000000137a970


[avagin@laptop linux]$ git describe cgroup/for-next
v4.15-rc1-3-gddf7005f3221

All logs are here: https://travis-ci.org/avagin/linux/jobs/308154268

Thanks,
Andrei

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2018-01-16 16:27 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28  1:22 cgroup/for-next: WARNING: possible circular locking dependency detected in cpuset_write_resmask Andrei Vagin
2017-11-28 11:35 ` [PATCH] cgroup/cpuset: fix circular locking dependency Prateek Sood
     [not found]   ` <1511868946-23959-1-git-send-email-prsood-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-04  5:14     ` Prateek Sood
     [not found]       ` <623f214b-8b9a-f967-7a3d-ca9c06151267-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-04 20:22         ` Tejun Heo
2017-12-04 22:58           ` Tejun Heo
     [not found]             ` <20171204225825.GP2421075-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-04 23:01               ` Peter Zijlstra
2017-12-08  9:40                 ` Prateek Sood
     [not found]                   ` <4e63b5e9-1696-910f-16ac-4d4d7eb98725-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-08 11:45                     ` Prateek Sood
     [not found]                       ` <40968aea-cd73-5ce4-d559-962d91e315c5-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-11 15:32                         ` Tejun Heo
2017-12-13 14:28                           ` Prateek Sood
2017-12-13 15:40                             ` Tejun Heo
     [not found]                               ` <20171213154041.GP3919388-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-15  8:54                                 ` Prateek Sood
2017-12-15 13:22                                   ` Tejun Heo
2017-12-15 19:06                                     ` Prateek Sood
     [not found]                                       ` <b50d7b64-121f-9a4c-5269-aec9a73787ba-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-12-19  7:26                                         ` [PATCH] cgroup: Fix deadlock in cpu hotplug path Prateek Sood
2017-12-19 13:39                                           ` Tejun Heo
     [not found]                 ` <20171204230117.GF20227-IIpfhp3q70z/8w/KjCw3T+5/BudmfyzbbVWyRVo5IupeoWH0uzbU5w@public.gmane.org>
2017-12-11 15:20                   ` [PATCH] cgroup/cpuset: fix circular locking dependency Tejun Heo
     [not found]                     ` <20171211152059.GH2421075-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-13  7:50                       ` Prateek Sood
2017-12-13 16:06                         ` Tejun Heo
     [not found]                           ` <20171213160617.GQ3919388-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-15 19:04                             ` Prateek Sood
2017-12-28 20:37                             ` Prateek Sood
2018-01-02 16:16                               ` Tejun Heo
     [not found]                                 ` <20180102161656.GD3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-02 17:44                                   ` Paul E. McKenney
2018-01-02 18:01                                     ` Paul E. McKenney
     [not found]                                       ` <20180102180119.GA1355-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-01-08 12:28                                         ` Tejun Heo
     [not found]                                           ` <20180108122823.GL3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-08 13:47                                             ` [PATCH wq/for-4.16 1/2] workqueue: separate out init_rescuer() Tejun Heo
2018-01-08 13:47                                               ` [PATCH wq/for-4.16 2/2] workqueue: allow WQ_MEM_RECLAIM on early init workqueues Tejun Heo
2018-01-08 22:52                                             ` [PATCH] cgroup/cpuset: fix circular locking dependency Paul E. McKenney
2018-01-09  0:31                                               ` Paul E. McKenney
     [not found]                                                 ` <20180109003127.GA30224-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-01-09  3:42                                                   ` Tejun Heo
2018-01-09  4:20                                                     ` Paul E. McKenney
2018-01-09 13:44                                                       ` Tejun Heo
     [not found]                                                         ` <20180109134448.GE3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-09 15:21                                                           ` Paul E. McKenney
2018-01-09 15:37                                                             ` Tejun Heo
     [not found]                                                               ` <20180109153752.GI3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-09 16:00                                                                 ` Paul E. McKenney
2018-01-10 20:08                                                                   ` Paul E. McKenney
     [not found]                                                                     ` <20180110200821.GA22541-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2018-01-10 21:41                                                                       ` Tejun Heo
     [not found]                                                                         ` <20180110214101.GE3460072-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-10 22:10                                                                           ` Paul E. McKenney
2018-01-15 12:02                                   ` Prateek Sood
2018-01-16 16:27                                     ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).