From: "tj@kernel.org" <tj@kernel.org>
To: "Alex Ng (LIS)" <alexng@microsoft.com>
Cc: "lizefan@huawei.com" <lizefan@huawei.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [OOPS] BUG_ON in cgroups on 4.4.0-rc5-next
Date: Wed, 23 Dec 2015 11:54:23 -0500 [thread overview]
Message-ID: <20151223165423.GJ5003@mtj.duckdns.org> (raw)
In-Reply-To: <BLUPR0301MB2001D645D9055C4DB1BF47BFD8E50@BLUPR0301MB2001.namprd03.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Hello, Alex.
On Tue, Dec 22, 2015 at 07:06:41PM +0000, Alex Ng (LIS) wrote:
> > Can you please let me know the steps to reproduce the bug?
>
> I tried this on a Hyper-V VM hosted in Windows Server 2012R2 and ran
> the attached script. The script clones the linux-next tree in a
> random directory under /tmp in a tight loop.
>
> This panic is not always reproducible, and I have only hit it once
> after running the script about 10 times. A different kernel panic
> happens each time I run this script; and the panics always happen
> during the first iteration of the loop.
Heh, I don't get it. The script doesn't do anything cgroup specific.
Can you please apply the attached patch, reproduce the issue and
report the kernel log?
Thanks.
--
tejun
[-- Attachment #2: dbg --]
[-- Type: text/plain, Size: 1137 bytes --]
---
kernel/cgroup.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -779,6 +779,22 @@ static inline void get_css_set(struct cs
atomic_inc(&cset->refcount);
}
+static void dump_cset(struct css_set *cset)
+{
+ struct cgrp_cset_link *link;
+
+ printk("XXX dumping cset %p\n", cset);
+ list_for_each_entry(link, &cset->cgrp_links, cgrp_link) {
+ struct cgroup *cgrp = link->cgrp;
+ struct cgroup_root *root = cgrp->root;
+
+ printk("root %d:0x%04x:%s ",
+ root->hierarchy_id, root->subsys_mask, root->name);
+ pr_cont_cgroup_path(cgrp);
+ pr_cont("\n");
+ }
+}
+
/**
* compare_css_sets - helper function for find_existing_css_set().
* @cset: candidate css_set being tested
@@ -831,7 +847,10 @@ static bool compare_css_sets(struct css_
cgrp1 = link1->cgrp;
cgrp2 = link2->cgrp;
/* Hierarchies should be linked in the same order. */
- BUG_ON(cgrp1->root != cgrp2->root);
+ if (WARN_ON(cgrp1->root != cgrp2->root)) {
+ dump_cset(cset);
+ dump_cset(old_cset);
+ }
/*
* If this hierarchy is the hierarchy of the cgroup
prev parent reply other threads:[~2015-12-23 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 20:08 Alex Ng (LIS)
2015-12-21 21:56 ` tj
2015-12-22 19:06 ` Alex Ng (LIS)
2015-12-23 16:54 ` tj [this message]
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=20151223165423.GJ5003@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=alexng@microsoft.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
/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
all inboxes | Powered by JetHome®