From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>,
Ming Lei <ming.lei@canonical.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>, Mel Gorman <mel@csn.ul.ie>,
Johannes Weiner <hannes@cmpxchg.org>,
Pauli Nieminen <suokkos@gmail.com>,
Dave Airlie <airlied@linux.ie>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: bugzilla-daemon@bugzilla.kernel.org,
luke-jr+linuxbugs@utopios.org, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org
Subject: Re: [Bug 87891] New: kernel BUG at mm/slab.c:2625!
Date: Thu, 13 Nov 2014 08:04:21 +0100 [thread overview]
Message-ID: <546457F5.4010908@suse.cz> (raw)
In-Reply-To: <20141111153120.9131c8e1459415afff8645bc@linux-foundation.org>
On 11/12/2014 12:31 AM, Andrew Morton wrote:
>
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Thu, 06 Nov 2014 17:28:41 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=87891
>>
>> Bug ID: 87891
>> Summary: kernel BUG at mm/slab.c:2625!
>> Product: Memory Management
>> Version: 2.5
>> Kernel Version: 3.17.2
>> Hardware: i386
>> OS: Linux
>> Tree: Mainline
>> Status: NEW
>> Severity: blocking
>> Priority: P1
>> Component: Slab Allocator
>> Assignee: akpm@linux-foundation.org
>> Reporter: luke-jr+linuxbugs@utopios.org
>> Regression: No
>
> Well this is interesting.
>
>
>> [359782.842112] kernel BUG at mm/slab.c:2625!
>> ...
>> [359782.843008] Call Trace:
>> [359782.843017] [<ffffffff8115181f>] __kmalloc+0xdf/0x200
>> [359782.843037] [<ffffffffa0466285>] ? ttm_page_pool_free+0x35/0x180 [ttm]
>> [359782.843060] [<ffffffffa0466285>] ttm_page_pool_free+0x35/0x180 [ttm]
>> [359782.843084] [<ffffffffa046674e>] ttm_pool_shrink_scan+0xae/0xd0 [ttm]
>> [359782.843108] [<ffffffff8111c2fb>] shrink_slab_node+0x12b/0x2e0
>> [359782.843129] [<ffffffff81127ed4>] ? fragmentation_index+0x14/0x70
>> [359782.843150] [<ffffffff8110fc3a>] ? zone_watermark_ok+0x1a/0x20
>> [359782.843171] [<ffffffff8111ceb8>] shrink_slab+0xc8/0x110
>> [359782.843189] [<ffffffff81120480>] do_try_to_free_pages+0x300/0x410
>> [359782.843210] [<ffffffff8112084b>] try_to_free_pages+0xbb/0x190
>> [359782.843230] [<ffffffff81113136>] __alloc_pages_nodemask+0x696/0xa90
>> [359782.843253] [<ffffffff8115810a>] do_huge_pmd_anonymous_page+0xfa/0x3f0
>> [359782.843278] [<ffffffff812dffe7>] ? debug_smp_processor_id+0x17/0x20
>> [359782.843300] [<ffffffff81118dc7>] ? __lru_cache_add+0x57/0xa0
>> [359782.843321] [<ffffffff811385ce>] handle_mm_fault+0x37e/0xdd0
>
> It went pagefault
> ->__alloc_pages_nodemask
> ->shrink_slab
> ->ttm_pool_shrink_scan
> ->ttm_page_pool_free
> ->kmalloc
> ->cache_grow
> ->BUG_ON(flags & GFP_SLAB_BUG_MASK);
>
> And I don't really know why - I'm not seeing anything in there which
> can set a GFP flag which is outside GFP_SLAB_BUG_MASK. However I see
> lots of nits.
>
> Core MM:
>
> __alloc_pages_nodemask() does
>
> if (unlikely(!page)) {
> /*
> * Runtime PM, block IO and its error handling path
> * can deadlock because I/O on the device might not
> * complete.
> */
> gfp_mask = memalloc_noio_flags(gfp_mask);
> page = __alloc_pages_slowpath(gfp_mask, order,
> zonelist, high_zoneidx, nodemask,
> preferred_zone, classzone_idx, migratetype);
> }
>
> so it permanently alters the value of incoming arg gfp_mask. This
> means that the following trace_mm_page_alloc() will print the wrong
> value of gfp_mask, and if we later do the `goto retry_cpuset', we retry
> with a possibly different gfp_mask. Isn't this a bug?
I think so. I noticed and fixed it in the RFC about reducing
alloc_pages* parameters [1], but it's buried in patch 2/4 Guess I should
have made it a separate non-RFC patch. Will do soon hopefully.
Vlastimil
[1] https://lkml.org/lkml/2014/8/6/249
--
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>
prev parent reply other threads:[~2014-11-13 7:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-87891-27@https.bugzilla.kernel.org/>
2014-11-11 23:31 ` Andrew Morton
2014-11-12 0:36 ` Christoph Lameter
2014-11-12 0:49 ` Andrew Morton
2014-11-12 0:54 ` Luke Dashjr
2014-11-12 1:02 ` Andrew Morton
2014-11-12 1:22 ` Joonsoo Kim
2014-11-12 1:44 ` Andrew Morton
2014-11-12 2:13 ` Joonsoo Kim
2014-11-12 4:08 ` Tetsuo Handa
2014-11-12 4:38 ` Andrew Morton
2014-11-13 13:43 ` [PATCH] drm/ttm: Avoid memory allocation from shrinker functions Tetsuo Handa
2014-11-12 1:22 ` [Bug 87891] New: kernel BUG at mm/slab.c:2625! Kirill A. Shutemov
2014-11-12 1:47 ` Kirill A. Shutemov
2014-11-12 1:56 ` Andrew Morton
2014-11-12 2:07 ` Kirill A. Shutemov
2014-11-12 2:17 ` Joonsoo Kim
2014-11-12 2:37 ` Kirill A. Shutemov
2014-11-12 8:21 ` Joonsoo Kim
2014-11-12 10:39 ` Mel Gorman
2014-11-13 6:37 ` Joonsoo Kim
2014-11-12 0:44 ` Joonsoo Kim
2014-11-12 0:53 ` Andrew Morton
2014-11-12 1:04 ` Christoph Lameter
2014-11-13 7:04 ` Vlastimil Babka [this message]
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=546457F5.4010908@suse.cz \
--to=vbabka@suse.cz \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=cl@linux.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.org \
--cc=luke-jr+linuxbugs@utopios.org \
--cc=mel@csn.ul.ie \
--cc=ming.lei@canonical.com \
--cc=penberg@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rientjes@google.com \
--cc=suokkos@gmail.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