xfs
[Top] [All Lists]

Re: 2.6.23 kdb in xfs_bmbt_get_block with unwritten extents

To: "Richard Troxell (rtroxell)" <rtroxell@xxxxxxxxx>
Subject: Re: 2.6.23 kdb in xfs_bmbt_get_block with unwritten extents
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sat, 23 Jan 2010 23:09:41 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <212AA327A3557741A058E787E06188731FA4AA@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <212AA327A3557741A058E787E06188731FA4AA@xxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Jan 21, 2010 at 05:41:48PM -0800, Richard Troxell (rtroxell) wrote:
> Hello All,
> 
> I am getting random kdbs when creating preallocated files that are
> excessively 'holey' (ex: 500MB+ file with alternating 4K written
> 4K unwritten extents). Creating such files is not my intention,
> and is being addressing in the userspace writer. That said, I am
> still concerned with running into kdb.
> 
> I am currently running 2.6.23.9, and have done some digging
> through the changelogs, but cant seem to find a match. Also,
> 2.6.24 seems to have a massive rewrite in this area, which
> significantly limits the scope that I can search.
> 
> The cause of the crash is a straigtforward NULL derference in
> xfs_bmap_btree.c:xfs_bmbt_get_block(), but I suspect the root
> cause is going to be some complex condition that corrupts the
> cursor...

There were lots of bugs found and fixed in the btree code between
2.6.23 and 2.6.26 that caused filesystem corruption or crashes like
this one. If you are hitting such problems, I'd suggest your easiest
solution is to upgrade to >= 2.6.27 and you should see the problems go
away.

> Given the trace, I assume that if I avoid all B+tree managed
> unwritten extents, I can avoid the crash. However avoiding such
> files completely seems a bit unrealistic, as I have the need to
> store files with a reasonable amount of holes...

The problems really had nothing to do with unwritten extents;
writing into holes or unwritten extents were simply one way to
trigger the corner cases containing the bugs.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>