From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Hugh Dickins <hughd@google.com>
Cc: Ying Han <yinghan@google.com>, Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: 3.0rc2 oops in mem_cgroup_from_task
Date: Fri, 10 Jun 2011 11:33:11 +0900 [thread overview]
Message-ID: <20110610113311.409bb423.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.LSU.2.00.1106091812030.4904@sister.anvils>
On Thu, 9 Jun 2011 18:30:49 -0700 (PDT)
Hugh Dickins <hughd@google.com> wrote:
> On Fri, 10 Jun 2011, KAMEZAWA Hiroyuki wrote:
> > On Thu, 9 Jun 2011 16:42:09 -0700
> > Ying Han <yinghan@google.com> wrote:
> >
> > > ++cc Hugh who might have seen similar crashes on his machine.
>
> Yes, I was testing my tmpfs changes, and saw it on i386 yesterday
> morning. Same trace as Dave's (including khugepaged, which may or
> may not be relevant), aside from the i386/x86_64 differences.
>
> BUG: unable to handle kernel paging request at 6b6b6b87
>
> I needed to move forward with other work on that laptop, so just
> jotted down the details to come back to later. It came after one
> hour of building swapping load in memcg, I've not tried again since.
>
> >
> > Thank you for forwarding. Hmm. It seems the panic happens at khugepaged's
> > page collapse_huge_page().
>
> Yes, the inlining in my kernel was different,
> so collapse_huge_page() showed up in my backtrace.
>
> >
> > ==
> > count_vm_event(THP_COLLAPSE_ALLOC);
> > if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
> > ==
> > It passes target mm to memcg and memcg gets a cgroup by
> > ==
> > mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
> > ==
> > Panic here means....mm->owner's task_subsys_state contains bad pointer ?
>
> 781cc621 <mem_cgroup_from_task>:
> 781cc621: 55 push %ebp
> 781cc622: 31 c0 xor %eax,%eax
> 781cc624: 89 e5 mov %esp,%ebp
> 781cc626: 8b 55 08 mov 0x8(%ebp),%edx
> 781cc629: 85 d2 test %edx,%edx
> 781cc62b: 74 09 je 781cc636 <mem_cgroup_from_task+0x15>
> 781cc62d: 8b 82 fc 08 00 00 mov 0x8fc(%edx),%eax
> 781cc633: 8b 40 1c mov 0x1c(%eax),%eax <==========
> 781cc636: c9 leave
> 781cc637: c3 ret
>
then, access to task->cgroups->subsys[?] causes access to 6b6b6b87...
Then, task->cgroups or task->cgroups->subsys contains bad pointer.
Considering khugepaged, it grabs mm_struct and memcg make an access to
(mm->owner)->cgroups->subsys.
Then, from memcg's point of view, we need to doubt mm->owner is valid or not
for this kind of tasks.
Thank you for inputs.
-Kame
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-06-10 2:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110609212956.GA2319@redhat.com>
2011-06-09 22:47 ` Ying Han
2011-06-09 23:42 ` Ying Han
2011-06-10 0:13 ` KAMEZAWA Hiroyuki
2011-06-10 1:30 ` Hugh Dickins
2011-06-10 2:33 ` KAMEZAWA Hiroyuki [this message]
2011-06-10 3:19 ` KAMEZAWA Hiroyuki
2011-06-10 3:55 ` KAMEZAWA Hiroyuki
2011-06-10 4:30 ` [PATCH] [BUGFIX] update mm->owner even if no next owner KAMEZAWA Hiroyuki
2011-06-10 5:06 ` Daisuke Nishimura
2011-06-10 5:21 ` Xiaotian Feng
2011-06-10 5:22 ` KAMEZAWA Hiroyuki
2011-06-10 21:49 ` Hugh Dickins
2011-06-10 23:54 ` Johannes Weiner
2011-06-11 17:51 ` Johannes Weiner
2011-06-11 18:44 ` Andrea Arcangeli
2011-06-11 23:04 ` Hiroyuki Kamezawa
2011-06-13 1:41 ` Hugh Dickins
2011-06-13 1:54 ` KAMEZAWA Hiroyuki
2011-06-13 14:03 ` Hugh Dickins
2011-06-11 0:46 ` Hiroyuki Kamezawa
2011-06-11 16:04 ` Hugh Dickins
2011-06-11 16:39 ` Andrea Arcangeli
2011-06-11 18:04 ` Johannes Weiner
2011-06-11 8:19 ` 3.0rc2 oops in mem_cgroup_from_task Michal Hocko
2011-06-11 15:46 ` Hugh Dickins
2011-06-12 9:09 ` Michal Hocko
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=20110610113311.409bb423.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=davej@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yinghan@google.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