From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sd0109e.au.ibm.com (d23rh905.au.ibm.com [202.81.18.225]) by e23smtp04.au.ibm.com (8.13.1/8.13.1) with ESMTP id m3E84aUZ015695 for ; Mon, 14 Apr 2008 18:04:36 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by sd0109e.au.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m3E87msM278186 for ; Mon, 14 Apr 2008 18:07:49 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m3E83slv007651 for ; Mon, 14 Apr 2008 18:03:54 +1000 Message-ID: <48030F69.7040801@linux.vnet.ibm.com> Date: Mon, 14 Apr 2008 13:31:45 +0530 From: Balbir Singh Reply-To: balbir@linux.vnet.ibm.com MIME-Version: 1.0 Subject: Re: kernel warning: tried to kill an mm-less task! References: <4803030D.3070906@cn.fujitsu.com> In-Reply-To: <4803030D.3070906@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Li Zefan Cc: "linux-mm@kvack.org" , LKML , Andrew Morton , KAMEZAWA Hiroyuki , Pavel Emelianov List-ID: Li Zefan wrote: > When I ran the same test program I described in a previous patch, > I got the following warning: > > WARNING: at mm/oom_kill.c:320 __oom_kill_task+0x6d/0x101() > Modules linked in: > > Pid: 3856, comm: a.out Not tainted 2.6.25-rc8-mm2 #37 > [] warn_on_slowpath+0x64/0xa2 > [] printk+0x5e/0x7b > [] page_count+0x25/0x49 > [] show_mem+0x125/0x15a > [] __oom_kill_task+0x6d/0x101 > [] oom_kill_process+0x16c/0x22e > [] select_bad_process+0xb0/0x122 > [] mem_cgroup_out_of_memory+0x65/0x8a > [] mem_cgroup_charge_common+0xf8/0x215 > [] handle_mm_fault+0x216/0x6c8 > [] follow_page+0x191/0x27d > [] need_resched+0x31/0x4f > [] get_user_pages+0x2f5/0x3eb > [] make_pages_present+0x9e/0xca > [] mmap_region+0x38c/0x452 > [] arch_get_unmapped_area_topdown+0x1bf/0x2a7 > [] do_mmap_pgoff+0x321/0x39b > [] _cond_resched+0x1c/0x5f > [] sys_mmap+0xf5/0x138 > [] tracesys+0xd5/0xda > ---[ end trace fe959fb2f0473e7c ]--- > tried to kill an mm-less task! > > This showed up several times in some seconds, but then didn't appear > any more. And it's reproducable in a x86_64 box, but doesn't happen > in a x86_32 one. > > And this happens both with and without the oops fixing. > Could we get some more details on which task was chosen to be killed? It will be nice to see the task flags as well to see if PF_EXITING is set. oom_kill_task() has a big WARNING in the comment /* WARNING: mm may not be dereferenced since we did not obtain its * value from get_task_mm(p). This is OK since all we need to do is * compare mm to q->mm below. I want to see the flags to see if PF_BORROWED_MM or PF_EXIT* is set. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL -- 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/ . Don't email: email@kvack.org