public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: strange allocation failures
Date: Mon, 13 Mar 2017 13:31:06 +0300	[thread overview]
Message-ID: <cac135d2-7ed4-c066-6316-22be9f7d16a3@virtuozzo.com> (raw)
In-Reply-To: <CACT4Y+bD0S9CY0ahvZ=pOpXqHAkH6P0OTHPTeBi-Pb2Nw6ph4w@mail.gmail.com>



On 03/13/2017 01:10 PM, Dmitry Vyukov wrote:
> On Mon, Mar 13, 2017 at 11:08 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
>> On Mon, Mar 13, 2017 at 11:04 AM, Andrey Ryabinin
>> <aryabinin@virtuozzo.com> 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.

> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

       reply	other threads:[~2017-03-13 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACT4Y+ZVWUYda9zr74QOmcXzd0S7P714LhzrVu7wRO0oDM0P2w@mail.gmail.com>
     [not found] ` <d849e961-7120-2ba5-1d58-df81d0ae3293@virtuozzo.com>
     [not found]   ` <CACT4Y+Y=Pz6wFN66BGdPkTPJWrnbxCL2GX-R0q5_jr5kwjF+zA@mail.gmail.com>
     [not found]     ` <CACT4Y+bD0S9CY0ahvZ=pOpXqHAkH6P0OTHPTeBi-Pb2Nw6ph4w@mail.gmail.com>
2017-03-13 10:31       ` Andrey Ryabinin [this message]
2017-03-13 10:37         ` strange allocation failures Dmitry Vyukov
2017-03-13 10:45           ` Dmitry Vyukov
2017-03-13 10:59             ` Michal Hocko
2017-03-13 10:51           ` Michal Hocko
2017-03-13 10:37         ` 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=cac135d2-7ed4-c066-6316-22be9f7d16a3@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    /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