From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by kanga.kvack.org (Postfix) with ESMTP id D713D6B0038 for ; Mon, 13 Mar 2017 06:37:52 -0400 (EDT) Received: by mail-wr0-f200.google.com with SMTP id u48so43138537wrc.0 for ; Mon, 13 Mar 2017 03:37:52 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id 76si7194198wmw.165.2017.03.13.03.37.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 13 Mar 2017 03:37:51 -0700 (PDT) Date: Mon, 13 Mar 2017 11:37:50 +0100 From: Michal Hocko Subject: Re: strange allocation failures Message-ID: <20170313103750.GJ31518@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Ryabinin Cc: Dmitry Vyukov , "Kirill A. Shutemov" , kasan-dev , "linux-mm@kvack.org" On Mon 13-03-17 13:31:06, Andrey Ryabinin wrote: > > > On 03/13/2017 01:10 PM, Dmitry Vyukov wrote: > > On Mon, Mar 13, 2017 at 11:08 AM, Dmitry Vyukov wrote: > >> On Mon, Mar 13, 2017 at 11:04 AM, Andrey Ryabinin > >> wrote: > >>> > >>> > >>> On 03/13/2017 12:50 PM, Dmitry Vyukov wrote: > >>>> Hello Andrey, Kirill, > >>>> > >>>> Can you please help me understand where is all my memory? > >>>> I am running very moderate workload on a machine with 7.5GB of memory > >>>> with KASAN. And I see constant vmalloc allocation failures for very > >>>> moderate sizes. I am confused why it happens and where is all my > >>>> memory... > >>>> > >>> > >>> > >>> Perhaps it's SIGKILL generated by syzkaller? > >>> > >>> static void *__vmalloc_area_node() > >>> { > >>> ..... > >>> if (fatal_signal_pending(current)) { > >>> area->nr_pages = i; > >>> goto fail; > >>> } > >> > >> > >> Ah, that would make sense. Syzkaller can indeed kill processes frequently. > >> > >> Perhaps we should not print the lengthy allocation failure message > >> with all the details in such. Not sure how easy it is to filter out > >> such cases. > >> I have constant stream of these messages that just make everything > >> else lost between them. And they are quite confusing. I've starred at > >> the numbers trying to understand why I am short on memory. > > > > > > Seems trivial. What do you think of: > > > > Makes sense. ACK. yes, looks reasonably to me as well. I will ack the patch with the full changelog. Please CC me. > > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > > index 0dd80222b20b..0b057628a7ba 100644 > > --- a/mm/vmalloc.c > > +++ b/mm/vmalloc.c > > @@ -1683,7 +1683,7 @@ static void *__vmalloc_area_node(struct > > vm_struct *area, gfp_t gfp_mask, > > > > if (fatal_signal_pending(current)) { > > area->nr_pages = i; > > - goto fail; > > + goto fail_no_warn; > > } > > > > if (node == NUMA_NO_NODE) > > @@ -1709,6 +1709,7 @@ static void *__vmalloc_area_node(struct > > vm_struct *area, gfp_t gfp_mask, > > warn_alloc(gfp_mask, NULL, > > "vmalloc: allocation failure, allocated %ld > > of %ld bytes", > > (area->nr_pages*PAGE_SIZE), area->size); > > +fail_no_warn: > > vfree(area->addr); > > return NULL; > > } > > > > > > ? > > > > -- > 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 -- Michal Hocko SUSE Labs -- 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