From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755135AbYFVPeO (ORCPT ); Sun, 22 Jun 2008 11:34:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752471AbYFVPeH (ORCPT ); Sun, 22 Jun 2008 11:34:07 -0400 Received: from rv-out-0506.google.com ([209.85.198.230]:20521 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbYFVPeF (ORCPT ); Sun, 22 Jun 2008 11:34:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=ARBlJOjLD0I3JBLb48jta0+Pewb/4enCJxD5sckHr+yJpHH2Th5PhvPFxJjJWctYoq bTtQ/hCMDFZFdJeDDOniK3BXRA1g+J8fQUseWyGWv1RH+vPKkwlrF0f875UQdlGiWe1k KO/qW7JwCp+U9q02fJ9kVdIwblPdSpZAaSmXI= Message-ID: <2f11576a0806220834m3572ee80i72229cb9a1613558@mail.gmail.com> Date: Mon, 23 Jun 2008 00:34:04 +0900 From: "KOSAKI Motohiro" To: "Vegard Nossum" Subject: Re: v2.6.26-rc7/cgroups: circular locking dependency Cc: "Paul Menage" , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "Paul Jackson" In-Reply-To: <20080621173859.GA6846@damson.getinternet.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080621173859.GA6846@damson.getinternet.no> X-Google-Sender-Auth: a7dc08d754098b98 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). -> #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.