Re: [memcg BUG] unable to handle kernel NULL pointer derefence at 00000000

Li Zefan
2008-10-21T09:54:28Z

KAMEZAWA Hiroyuki wrote:
> On Tue, 21 Oct 2008 17:13:20 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>> KAMEZAWA Hiroyuki wrote:
>>> On Tue, 21 Oct 2008 16:35:09 +0800
>>> Li Zefan <lizf@cn.fujitsu.com> wrote:
>>>
>>>> KAMEZAWA Hiroyuki wrote:
>>>>> On Tue, 21 Oct 2008 15:21:07 +0800
>>>>> Li Zefan <lizf@cn.fujitsu.com> wrote:
>>>>>> dmesg is attached.
>>>>>>
>>>>> Thanks....I think I caught some. (added Mel Gorman to CC:)
>>>>>
>>>>> NODE_DATA(nid)->spanned_pages just means sum of zone->spanned_pages in node.
>>>>>
>>>>> So, If there is a hole between zone, node->spanned_pages doesn't mean
>>>>> length of node's memmap....(then, some hole can be skipped.)
>>>>>
>>>>> OMG....Could you try this ?
>>>>>
>>>> No luck, the same bug still exists. :(
>>>>
>>> This is a little fixed one..
>>>
>> I tried the patch, but it doesn't solve the problem..
>>
> Hmm.. Can you catch "pfn" of troublesome page_cgroup ?
> By patch like this ?
>

I got what you want:

pc c1d589dc pc->page 00000000 page c105f67c pfn 1d5b
...
pc c1d589f0 pc->page 00000000 page c105f6b0 pfn 1d5c

> ==
> Index: linux-2.6.27/mm/memcontrol.c
> ===================================================================
> --- linux-2.6.27.orig/mm/memcontrol.c
> +++ linux-2.6.27/mm/memcontrol.c
> @@ -544,6 +544,10 @@ static int mem_cgroup_charge_common(stru
>
> goto done;
> }
> +
> + printk(KERN_DEBUG "pc %p pc->page %p page %p pfn %lx\n",
> + pc, pc->page, page, page_to_pfn(page));
> + BUG_ON(!pc->page);
> pc->mem_cgroup = mem;
> /*
> * If a page is accounted as a page cache, insert to inactive list.