All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Christoph Lameter <cl@linux.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Theodore Ts'o" <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Subject: Re: BUG: Bad page state in process (current git)
Date: Mon, 15 Nov 2010 13:23:41 -0800	[thread overview]
Message-ID: <AANLkTikWaADzUrqKhZ9gviW8sk8mPjC9kKFJyitvzQmx@mail.gmail.com> (raw)
In-Reply-To: <20101115195439.GA1569@arch.trippelsdorf.de>

On Mon, Nov 15, 2010 at 11:54 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2010.11.15 at 13:38 +0100, Markus Trippelsdorf wrote:
>> On 2010.11.12 at 13:20 +0100, Markus Trippelsdorf wrote:
>> >
>> > Yes. Fortunately the BUG is gone since I pulled the upcoming drm fixes
>>
>> No. I happend again today (with those fixes already applied):
>>
>> BUG: Bad page state in process knode  pfn:7f0a8
>> page:ffffea0001bca4c0 count:0 mapcount:0 mapping:          (null) index:0x0
>> page flags: 0x4000000000000008(uptodate)
>> Pid: 18310, comm: knode Not tainted 2.6.37-rc1-00549-gae712bf-dirty #16
>> Call Trace:
>>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>>  [<ffffffff8102e50e>] ? apic_timer_interrupt+0xe/0x20
>>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>>  [<ffffffff810a2dd4>] ? file_read_actor+0xc4/0x190
>>  [<ffffffff810a4a70>] ? generic_file_aio_read+0x560/0x6b0
>>  [<ffffffff810bdf8d>] ? handle_mm_fault+0x6bd/0x970
>>  [<ffffffff8104b1d0>] ? do_page_fault+0x120/0x410
>>  [<ffffffff810c3d85>] ? do_brk+0x275/0x360
>>  [<ffffffff81452d8f>] ? page_fault+0x1f/0x30
>> Disabling lock debugging due to kernel taint
>
> And another one. But this time it seems to point to ext4:
>
> BUG: Bad page state in process rm  pfn:52e54
> page:ffffea0001222260 count:0 mapcount:0 mapping:          (null) index:0x0
> page flags: 0x4000000000000008(uptodate)
> Pid: 2084, comm: rm Not tainted 2.6.37-rc1-00549-gae712bf-dirty #23
> Call Trace:
>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>  [<ffffffff81142ae6>] ? ext4_ext_put_in_cache+0x46/0x90
>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>  [<ffffffff8118f0c7>] ? number.clone.2+0x2b7/0x2f0
>  [<ffffffff810a38d5>] ? find_get_page+0x75/0xb0
>  [<ffffffff810a4011>] ? find_or_create_page+0x51/0xb0
>  [<ffffffff810ff4d7>] ? __getblk+0xd7/0x260
>  [<ffffffff8113158f>] ? ext4_getblk+0x8f/0x1e0
>  [<ffffffff811316ed>] ? ext4_bread+0xd/0x70
>  [<ffffffff811369f4>] ? htree_dirblock_to_tree+0x34/0x190
>  [<ffffffff8113870f>] ? ext4_htree_fill_tree+0x9f/0x250
>  [<ffffffff810e109d>] ? do_filp_open+0x12d/0x5e0
>  [<ffffffff811289ed>] ? ext4_readdir+0x14d/0x5a0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e50a8>] ? vfs_readdir+0xa8/0xd0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e51b1>] ? sys_getdents+0x81/0xf0
>  [<ffffffff8102dc2b>] ? system_call_fastpath+0x16/0x1b
> Disabling lock debugging due to kernel taint
>
> I don't know. Could a possible bug in linux/fs/ext4/page-io.c be
> responsible for something like this?

I do think you're right: every one of your "Bad page state" reports
has been complaining only about the PageUptodate bit being set, and
that SetPageUpdate() in ext4_end_bio() does look suspicious, coming
after the put_page().

The more suspicious given that other races have been noticed in
precisely that area, and fixed with put_io_page() in the current git
tree.

Perhaps that fixes your problem, but my guess would be not: I suspect
the "if (!partial_write) SetPageUpdate(page);" should be done before
the block (or put_io_page) which does the put_page().

Hugh

WARNING: multiple messages have this Message-ID (diff)
From: Hugh Dickins <hughd@google.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Christoph Lameter <cl@linux.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Theodore Ts'o" <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Subject: Re: BUG: Bad page state in process (current git)
Date: Mon, 15 Nov 2010 13:23:41 -0800	[thread overview]
Message-ID: <AANLkTikWaADzUrqKhZ9gviW8sk8mPjC9kKFJyitvzQmx@mail.gmail.com> (raw)
In-Reply-To: <20101115195439.GA1569@arch.trippelsdorf.de>

On Mon, Nov 15, 2010 at 11:54 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2010.11.15 at 13:38 +0100, Markus Trippelsdorf wrote:
>> On 2010.11.12 at 13:20 +0100, Markus Trippelsdorf wrote:
>> >
>> > Yes. Fortunately the BUG is gone since I pulled the upcoming drm fixes
>>
>> No. I happend again today (with those fixes already applied):
>>
>> BUG: Bad page state in process knode  pfn:7f0a8
>> page:ffffea0001bca4c0 count:0 mapcount:0 mapping:          (null) index:0x0
>> page flags: 0x4000000000000008(uptodate)
>> Pid: 18310, comm: knode Not tainted 2.6.37-rc1-00549-gae712bf-dirty #16
>> Call Trace:
>>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>>  [<ffffffff8102e50e>] ? apic_timer_interrupt+0xe/0x20
>>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>>  [<ffffffff810a2dd4>] ? file_read_actor+0xc4/0x190
>>  [<ffffffff810a4a70>] ? generic_file_aio_read+0x560/0x6b0
>>  [<ffffffff810bdf8d>] ? handle_mm_fault+0x6bd/0x970
>>  [<ffffffff8104b1d0>] ? do_page_fault+0x120/0x410
>>  [<ffffffff810c3d85>] ? do_brk+0x275/0x360
>>  [<ffffffff81452d8f>] ? page_fault+0x1f/0x30
>> Disabling lock debugging due to kernel taint
>
> And another one. But this time it seems to point to ext4:
>
> BUG: Bad page state in process rm  pfn:52e54
> page:ffffea0001222260 count:0 mapcount:0 mapping:          (null) index:0x0
> page flags: 0x4000000000000008(uptodate)
> Pid: 2084, comm: rm Not tainted 2.6.37-rc1-00549-gae712bf-dirty #23
> Call Trace:
>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>  [<ffffffff81142ae6>] ? ext4_ext_put_in_cache+0x46/0x90
>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>  [<ffffffff8118f0c7>] ? number.clone.2+0x2b7/0x2f0
>  [<ffffffff810a38d5>] ? find_get_page+0x75/0xb0
>  [<ffffffff810a4011>] ? find_or_create_page+0x51/0xb0
>  [<ffffffff810ff4d7>] ? __getblk+0xd7/0x260
>  [<ffffffff8113158f>] ? ext4_getblk+0x8f/0x1e0
>  [<ffffffff811316ed>] ? ext4_bread+0xd/0x70
>  [<ffffffff811369f4>] ? htree_dirblock_to_tree+0x34/0x190
>  [<ffffffff8113870f>] ? ext4_htree_fill_tree+0x9f/0x250
>  [<ffffffff810e109d>] ? do_filp_open+0x12d/0x5e0
>  [<ffffffff811289ed>] ? ext4_readdir+0x14d/0x5a0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e50a8>] ? vfs_readdir+0xa8/0xd0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e51b1>] ? sys_getdents+0x81/0xf0
>  [<ffffffff8102dc2b>] ? system_call_fastpath+0x16/0x1b
> Disabling lock debugging due to kernel taint
>
> I don't know. Could a possible bug in linux/fs/ext4/page-io.c be
> responsible for something like this?

I do think you're right: every one of your "Bad page state" reports
has been complaining only about the PageUptodate bit being set, and
that SetPageUpdate() in ext4_end_bio() does look suspicious, coming
after the put_page().

The more suspicious given that other races have been noticed in
precisely that area, and fixed with put_io_page() in the current git
tree.

Perhaps that fixes your problem, but my guess would be not: I suspect
the "if (!partial_write) SetPageUpdate(page);" should be done before
the block (or put_io_page) which does the put_page().

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Hugh Dickins <hughd@google.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Christoph Lameter <cl@linux.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Theodore Ts'o <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Subject: Re: BUG: Bad page state in process (current git)
Date: Mon, 15 Nov 2010 13:23:41 -0800	[thread overview]
Message-ID: <AANLkTikWaADzUrqKhZ9gviW8sk8mPjC9kKFJyitvzQmx@mail.gmail.com> (raw)
In-Reply-To: <20101115195439.GA1569@arch.trippelsdorf.de>

On Mon, Nov 15, 2010 at 11:54 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2010.11.15 at 13:38 +0100, Markus Trippelsdorf wrote:
>> On 2010.11.12 at 13:20 +0100, Markus Trippelsdorf wrote:
>> >
>> > Yes. Fortunately the BUG is gone since I pulled the upcoming drm fixes
>>
>> No. I happend again today (with those fixes already applied):
>>
>> BUG: Bad page state in process knode  pfn:7f0a8
>> page:ffffea0001bca4c0 count:0 mapcount:0 mapping:          (null) index:0x0
>> page flags: 0x4000000000000008(uptodate)
>> Pid: 18310, comm: knode Not tainted 2.6.37-rc1-00549-gae712bf-dirty #16
>> Call Trace:
>>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>>  [<ffffffff8102e50e>] ? apic_timer_interrupt+0xe/0x20
>>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>>  [<ffffffff810a2dd4>] ? file_read_actor+0xc4/0x190
>>  [<ffffffff810a4a70>] ? generic_file_aio_read+0x560/0x6b0
>>  [<ffffffff810bdf8d>] ? handle_mm_fault+0x6bd/0x970
>>  [<ffffffff8104b1d0>] ? do_page_fault+0x120/0x410
>>  [<ffffffff810c3d85>] ? do_brk+0x275/0x360
>>  [<ffffffff81452d8f>] ? page_fault+0x1f/0x30
>> Disabling lock debugging due to kernel taint
>
> And another one. But this time it seems to point to ext4:
>
> BUG: Bad page state in process rm  pfn:52e54
> page:ffffea0001222260 count:0 mapcount:0 mapping:          (null) index:0x0
> page flags: 0x4000000000000008(uptodate)
> Pid: 2084, comm: rm Not tainted 2.6.37-rc1-00549-gae712bf-dirty #23
> Call Trace:
>  [<ffffffff810a9022>] ? bad_page+0x92/0xe0
>  [<ffffffff810aa240>] ? get_page_from_freelist+0x4b0/0x570
>  [<ffffffff81142ae6>] ? ext4_ext_put_in_cache+0x46/0x90
>  [<ffffffff810aa413>] ? __alloc_pages_nodemask+0x113/0x6b0
>  [<ffffffff8118f0c7>] ? number.clone.2+0x2b7/0x2f0
>  [<ffffffff810a38d5>] ? find_get_page+0x75/0xb0
>  [<ffffffff810a4011>] ? find_or_create_page+0x51/0xb0
>  [<ffffffff810ff4d7>] ? __getblk+0xd7/0x260
>  [<ffffffff8113158f>] ? ext4_getblk+0x8f/0x1e0
>  [<ffffffff811316ed>] ? ext4_bread+0xd/0x70
>  [<ffffffff811369f4>] ? htree_dirblock_to_tree+0x34/0x190
>  [<ffffffff8113870f>] ? ext4_htree_fill_tree+0x9f/0x250
>  [<ffffffff810e109d>] ? do_filp_open+0x12d/0x5e0
>  [<ffffffff811289ed>] ? ext4_readdir+0x14d/0x5a0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e50a8>] ? vfs_readdir+0xa8/0xd0
>  [<ffffffff810e4e80>] ? filldir+0x0/0xd0
>  [<ffffffff810e51b1>] ? sys_getdents+0x81/0xf0
>  [<ffffffff8102dc2b>] ? system_call_fastpath+0x16/0x1b
> Disabling lock debugging due to kernel taint
>
> I don't know. Could a possible bug in linux/fs/ext4/page-io.c be
> responsible for something like this?

I do think you're right: every one of your "Bad page state" reports
has been complaining only about the PageUptodate bit being set, and
that SetPageUpdate() in ext4_end_bio() does look suspicious, coming
after the put_page().

The more suspicious given that other races have been noticed in
precisely that area, and fixed with put_io_page() in the current git
tree.

Perhaps that fixes your problem, but my guess would be not: I suspect
the "if (!partial_write) SetPageUpdate(page);" should be done before
the block (or put_io_page) which does the put_page().

Hugh

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-11-15 21:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 15:25 BUG: Bad page state in process (current git) Markus Trippelsdorf
2010-11-10 15:25 ` Markus Trippelsdorf
2010-11-10 15:40 ` Markus Trippelsdorf
2010-11-10 15:40   ` Markus Trippelsdorf
2010-11-10 21:46   ` Christoph Lameter
2010-11-10 21:46     ` Christoph Lameter
2010-11-12 12:20     ` Markus Trippelsdorf
2010-11-12 12:20       ` Markus Trippelsdorf
2010-11-15 12:38       ` Markus Trippelsdorf
2010-11-15 12:38         ` Markus Trippelsdorf
2010-11-15 19:54         ` Markus Trippelsdorf
2010-11-15 19:54           ` Markus Trippelsdorf
2010-11-15 21:23           ` Hugh Dickins [this message]
2010-11-15 21:23             ` Hugh Dickins
2010-11-15 21:23             ` Hugh Dickins
2010-11-16 11:13             ` [PATCH] ext4 Fix setting random pages PageUptodate Markus Trippelsdorf
2010-11-16 11:13               ` Markus Trippelsdorf
2010-11-16 11:13               ` Markus Trippelsdorf
2010-11-16 20:38               ` Ted Ts'o
2010-11-16 20:38                 ` Ted Ts'o

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=AANLkTikWaADzUrqKhZ9gviW8sk8mPjC9kKFJyitvzQmx@mail.gmail.com \
    --to=hughd@google.com \
    --cc=cl@linux.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=markus@trippelsdorf.de \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.