linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-mips@vger.kernel.org, linux-mm@kvack.org
Subject: Re: MIPS/CI20: BUG: Bad page state
Date: Wed, 24 Apr 2019 12:18:30 -0700	[thread overview]
Message-ID: <20190424191830.GF19031@bombadil.infradead.org> (raw)
In-Reply-To: <20190424182012.GA21072@darkstar.musicnaut.iki.fi>

On Wed, Apr 24, 2019 at 09:20:12PM +0300, Aaro Koskinen wrote:
> [33617.740799] BUG: Bad page state in process cc1plus  pfn:3df51
> [33617.746545] page:81023764 count:0 mapcount:-64768 mapping:00000000 index:0x1
> [33617.753577] flags: 0x40000000()
> [33617.756716] raw: 40000000 00000100 00000200 00000000 00000001 00000000 ffff02ff 00000000
> [33617.742940] raw: 00000000
> [33617.745548] page dumped because: nonzero mapcount

When a page is freed, it's not supposed to be mapped to userspace
any more, so mapcount should be 0.  In your case, it's either -64768,
which is a massive underflow, or it's 0xffff02ff which is a nonsensical
combination of flags.  Or a user is putting their own information into
that field (as, eg, slab does).  Or it's become corrupted for some reason
unknown to me.

> [33617.760052] Call Trace:
> [33617.740656] [<80019c7c>] show_stack+0x8c/0x130
> [33617.745092] [<8009cf78>] bad_page+0x138/0x140
> [33617.749437] [<8009d764>] free_pcppages_bulk+0x15c/0x4dc
> [33617.754652] [<8009eca8>] free_unref_page_list+0x130/0x168
> [33617.760041] [<800a7b90>] release_pages+0x98/0x404
> [33617.742894] [<800cea78>] tlb_flush_mmu_free+0x54/0x60
> [33617.747934] [<800c5874>] unmap_page_range+0x574/0x864
> [33617.752972] [<800c5cf8>] unmap_vmas+0x70/0x78
> [33617.757319] [<800cc690>] exit_mmap+0x110/0x1b8

Given this stack trace, the page was mapped into userspace, so something's
gone terribly wrong.  My money is on corruption; I haven't seen anyone
report anything like this before.


  reply	other threads:[~2019-04-24 19:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 18:20 Aaro Koskinen
2019-04-24 19:18 ` Matthew Wilcox [this message]
2019-04-24 19:29 ` Paul Burton
2019-04-24 20:40   ` Aaro Koskinen
2019-04-24 20:50     ` Paul Burton
2019-05-28 23:37       ` Aaro Koskinen
2019-05-30 23:23         ` Aaro Koskinen

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=20190424191830.GF19031@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.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