Re: [2.4] page->buffers vanished in journal_try_to_free_buffers()

From: Marcelo Tosatti
Date: Mon Jun 21 2004 - 11:01:54 EST


Hi Stephen,

On Mon, Jun 21, 2004 at 04:06:50PM +0100, Stephen C. Tweedie wrote:
> Hi,
>
> On Thu, 2004-06-17 at 14:16, Marcelo Tosatti wrote:
>
> > Stephen, Andrew, do you have any idea how the buffers could have vanished
> > under us with the page locked? That should not be possible.
>
> No, especially not on UP as Frank reported.
>
> > I dont see how this "page->buffers = NULL" could be caused by hardware problem,
> > which is usually one or two bit flip.
>
> We don't know for sure that it's page->buffers. If we have gone round
> the bh->b_this_page loop already, we could have ended up following the
> pointers either to an invalid bh, or to one that's not on the current
> page. So it could also be the previous buffer's b_this_page that got
> clobbered, rather than page->buffers.
>
> That's possible in this case, but it's still a bit surprising that we'd
> *always* get a NULL pointer rather than some other random pointer as a
> result.

I dont remember seeing any case which was not a NULL pointer dereference.

> The buffer-ring debug patch that you posted looks like the obvious way
> to dig further into this. If that doesn't get anyway, we can also trap
> the case where following bh->b_this_page gives us a buffer whose b_page
> is on a different page.

Fine. Just printing out bh->b_page at debug_page() will allow us to verify that, yes?

--- transaction.c.orig 2004-06-21 12:50:01.090082264 -0300
+++ transaction.c 2004-06-21 12:50:45.574319632 -0300
@@ -1704,9 +1704,9 @@ void debug_page(struct page *p)
p->index, atomic_read(&p->count), p->flags);

while (bh) {
- printk(KERN_ERR "%s: bh b_next:%p blocknr:%lu b_list:%u state:%lx\n",
+ printk(KERN_ERR "%s: bh b_next:%p blocknr:%lu b_list:%u state:%lx b_page:%p\n",
__FUNCTION__, bh->b_next, bh->b_blocknr, bh->b_list,
- bh->b_state);
+ bh->b_state, bh->b_page);
bh = bh->b_this_page;
}
}



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/