linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Tino Lehnig <tino.lehnig@contabo.de>,
	ngupta@vflare.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Zram writeback feature unstable with heavy swap utilization - BUG: Bad page state in process...
Date: Tue, 24 Jul 2018 19:51:24 -0700	[thread overview]
Message-ID: <20180725025124.GC16271@bombadil.infradead.org> (raw)
In-Reply-To: <20180725013250.GA66792@rodete-desktop-imager.corp.google.com>

On Wed, Jul 25, 2018 at 10:32:50AM +0900, Minchan Kim wrote:
> > [  804.485321] BUG: Bad page state in process qemu-system-x86  pfn:1c4b08e
> > [  804.485403] page:ffffe809312c2380 count:0 mapcount:0
> > mapping:0000000000000000 index:0x1
> > [  804.485483] flags: 0x17fffc000000008(uptodate)
> > [  804.485554] raw: 017fffc000000008 0000000000000000 0000000000000001
> > 00000000ffffffff
> > [  804.485632] raw: dead000000000100 dead000000000200 0000000000000000
> > 0000000000000000
> > [  804.485709] page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag set
> > [  804.485782] bad because of flags: 0x8(uptodate)

The message here even tells you what the problem is.  The page
was marked Uptodate at the time that it was allocated.  There aren't
any other flags that alias Uptodate, so somebody is failing to clear
the Uptodate bit when they ought to.

> > [  804.485891] Call Trace:
> > [  804.485899]  dump_stack+0x5c/0x7b
> > [  804.485902]  bad_page+0xba/0x120
> > [  804.485905]  get_page_from_freelist+0x1016/0x1250
> > [  804.485908]  __alloc_pages_nodemask+0xfa/0x250

Also note that this is in the allocation path; this flag isn't checked
at free.  But it is cleared on free, so someone's stomping on page->flags
after they're freed.  I suggest enabling more debugging code.

  parent reply	other threads:[~2018-07-25  2:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 12:29 Zram writeback feature unstable with heavy swap utilization - BUG: Bad page state in process Tino Lehnig
2018-07-24  1:03 ` Minchan Kim
2018-07-24  2:53   ` Sergey Senozhatsky
2018-07-24  6:47     ` Minchan Kim
2018-07-24  7:30   ` Tino Lehnig
2018-07-25  1:32     ` Minchan Kim
2018-07-25  1:55       ` Matthew Wilcox
2018-07-25  2:16         ` Minchan Kim
2018-07-25  2:35           ` Matthew Wilcox
2018-07-25  2:51             ` Minchan Kim
2018-07-25  2:55               ` Matthew Wilcox
2018-07-25  3:02                 ` Minchan Kim
2018-07-25  2:51       ` Matthew Wilcox [this message]
2018-07-25  4:07         ` Sergey Senozhatsky
2018-07-25 13:21     ` Minchan Kim
2018-07-25 15:12       ` Tino Lehnig
2018-07-26  2:03         ` Minchan Kim
2018-07-26  6:10           ` Tino Lehnig
2018-07-26  6:21             ` Minchan Kim
2018-07-26  6:34               ` Tino Lehnig
2018-07-26 10:00             ` Tino Lehnig
2018-07-26 10:30               ` Minchan Kim
2018-07-26 12:35                 ` Tino Lehnig
2018-07-27  9:14                   ` Minchan Kim
2018-07-27 11:00                     ` Tino Lehnig
2018-07-27 12:05                       ` Minchan Kim
2018-07-27 12:13                         ` Tino Lehnig
2018-07-27 22:58                           ` Minchan Kim
2018-07-30  6:09                             ` Tino Lehnig
2018-08-02  5:15                               ` Minchan Kim

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=20180725025124.GC16271@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=tino.lehnig@contabo.de \
    /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;
as well as URLs for NNTP newsgroup(s).