linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>, Christoph Lameter <cl@gentwo.org>
Subject: Re: bad page state in 3.13-rc4
Date: Wed, 18 Dec 2013 20:40:07 -0800	[thread overview]
Message-ID: <CA+55aFwweoGs3eGWXFULcqnbRbpDhpj2qrefXB5OpQOiWW8wYA@mail.gmail.com> (raw)
In-Reply-To: <20131219040738.GA10316@redhat.com>

On Wed, Dec 18, 2013 at 8:07 PM, Dave Jones <davej@redhat.com> wrote:
> Just hit this while fuzzing with lots of child processes.
> (trinity -C128)

Ok, there's a BUG_ON() in the middle, the "bad page" part is just this:

> BUG: Bad page state in process trinity-c93  pfn:100499
> page:ffffea0004012640 count:0 mapcount:0 mapping:          (null) index:0x389
> page flags: 0x2000000000000c(referenced|uptodate)
> Call Trace:
>  [<ffffffff816db2f5>] dump_stack+0x4e/0x7a
>  [<ffffffff816d8b05>] bad_page.part.71+0xcf/0xe8
>  [<ffffffff8113a645>] free_pages_prepare+0x185/0x190
>  [<ffffffff8113b085>] free_hot_cold_page+0x35/0x180
>  [<ffffffff811403f3>] __put_single_page+0x23/0x30
>  [<ffffffff81140665>] put_page+0x35/0x50
>  [<ffffffff811e8705>] aio_free_ring+0x55/0xf0
>  [<ffffffff811e9c5a>] SyS_io_setup+0x59a/0xbe0
>  [<ffffffff816edb24>] tracesys+0xdd/0xe2

at free_pages() time, and I don't see anything bad in the printout wrt
the page counts of flags.

Which makes me wonder if this is mem_cgroup_bad_page_check()
triggering. Of course, if it's a race, it may be that by the time we
print out the counts they all look good, even if they weren't good at
the time we did that bad_page() *check*.

And the fact that we do have a concurrent BUG_ON() triggering with a
zero page count obviously does look suspicious. Looks like a possible
race with memory compaction happening at the same time aio_free_ring()
frees the page.

Somebody who knows the migration code needs to look at this. ChristophL?

                        Linus

--
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:[~2013-12-19  4:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  4:07 Dave Jones
2013-12-19  4:40 ` Linus Torvalds [this message]
2013-12-19 15:41   ` Christoph Lameter
2013-12-19 20:11     ` Mel Gorman
2013-12-19 20:30       ` Dave Jones
2013-12-19 15:53   ` Dave Jones
2013-12-19 17:07     ` Linus Torvalds
2013-12-19 17:17       ` Dave Jones
2013-12-19 18:11       ` Kent Overstreet
2013-12-19 18:29         ` Benjamin LaHaise
2013-12-19 18:35           ` Dave Jones
2013-12-19 19:19           ` Linus Torvalds
2013-12-19 19:26             ` Benjamin LaHaise
2013-12-19 19:45               ` Linus Torvalds
2013-12-19 19:53                 ` Benjamin LaHaise
2013-12-19 20:02                   ` Linus Torvalds
2013-12-19 20:11                     ` Linus Torvalds
2013-12-19 20:31                       ` Benjamin LaHaise
2013-12-19 20:31                       ` Linus Torvalds
2013-12-19 20:42                         ` Benjamin LaHaise
2013-12-19 20:24                   ` Dave Jones
2013-12-19 23:38                     ` Benjamin LaHaise
2013-12-20  1:00                       ` Dave Jones
2013-12-21 23:06                         ` [PATCHes - aio / migrate page, please review] " Benjamin LaHaise
2013-12-22 19:09                           ` Linus Torvalds
2013-12-22 21:30                             ` Dave Jones

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=CA+55aFwweoGs3eGWXFULcqnbRbpDhpj2qrefXB5OpQOiWW8wYA@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@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