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 18.104.22.168, 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
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
> 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.