From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752471AbYFVPvm (ORCPT ); Sun, 22 Jun 2008 11:51:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752447AbYFVPvc (ORCPT ); Sun, 22 Jun 2008 11:51:32 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:45020 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbYFVPvc (ORCPT ); Sun, 22 Jun 2008 11:51:32 -0400 Subject: Re: v2.6.26-rc7/cgroups: circular locking dependency From: Peter Zijlstra To: KOSAKI Motohiro Cc: Vegard Nossum , Paul Menage , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Paul Jackson , maxk In-Reply-To: <2f11576a0806220834m3572ee80i72229cb9a1613558@mail.gmail.com> References: <20080621173859.GA6846@damson.getinternet.no> <2f11576a0806220834m3572ee80i72229cb9a1613558@mail.gmail.com> Content-Type: text/plain Date: Sun, 22 Jun 2008 17:50:21 +0200 Message-Id: <1214149823.3223.313.camel@lappy.programming.kicks-ass.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2008-06-23 at 00:34 +0900, KOSAKI Motohiro wrote: > CC'ed Paul Jackson > > it seems typical ABBA deadlock. > I think cpuset use cgrou_lock() by mistake. > > IMHO, cpuset_handle_cpuhp() sholdn't use cgroup_lock() and > shouldn't call rebuild_sched_domains(). Looks like Max forgot to test with lockdep enabled... Well, someone should when you change the online map. Max, Paul, can we handle this in update_sched_domains() instead? > -> #1 (cgroup_mutex){--..}: > [] __lock_acquire+0xf45/0x1040 > [] lock_acquire+0x98/0xd0 > [] mutex_lock_nested+0xb1/0x300 > [] cgroup_lock+0xf/0x20 cgroup_lock > [] cpuset_handle_cpuhp+0x20/0x180 > [] notifier_call_chain+0x37/0x70 > [] __raw_notifier_call_chain+0x19/0x20 > [] _cpu_down+0x78/0x240 cpu_hotplug.lock > [] cpu_down+0x2b/0x40 cpu_add_remove_lock > [] store_online+0x39/0x80 > [] sysdev_store+0x2b/0x40 > [] sysfs_write_file+0xa2/0x100 > [] vfs_write+0x96/0x130 > [] sys_write+0x3d/0x70 > [] sysenter_past_esp+0x78/0xd1 > [] 0xffffffff > > -> #0 (&cpu_hotplug.lock){--..}: > [] __lock_acquire+0xaf5/0x1040 > [] lock_acquire+0x98/0xd0 > [] mutex_lock_nested+0xb1/0x300 > [] get_online_cpus+0x2c/0x40 cpu_hotplug.lock > [] rebuild_sched_domains+0x7d/0x3a0 > [] cpuset_common_file_write+0x204/0x440 cgroup_lock > [] cgroup_file_write+0x67/0x130 > [] vfs_write+0x96/0x130 > [] sys_write+0x3d/0x70 > [] sysenter_past_esp+0x78/0xd1 > [] 0xffffffff > > > > Hi, > > > > I decided to see what cgroups is all about, and followed the instructions > > in Documentation/cgroups.txt :-) It happened when I did this: > > > > [root@damson /dev/cgroup/Vegard 0] > > # echo 1 > cpuset.cpus > > > > I can also provide the kernel config if necessary. > > > > > > Vegard > > > > > > ======================================================= > > [ INFO: possible circular locking dependency detected ] > > 2.6.26-rc7 #25 > > ------------------------------------------------------- > > bash/10032 is trying to acquire lock: > > (&cpu_hotplug.lock){--..}, at: [] get_online_cpus+0x2c/0x40 > > > > but task is already holding lock: > > (cgroup_mutex){--..}, at: [] cgroup_lock+0xf/0x20 > > > > which lock already depends on the new lock. > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/