On Thu, Jun 12, 2014 at 1:35 AM, Chris Mason <c...@fb.com> wrote:
> On 06/11/2014 08:12 PM, Filipe David Borba Manana wrote:
>> Often when running the qgroups sanity test, a crash or a hang happened.
>> This is because the extent buffer the test uses for the root node doesn't
>> have an header level explicitly set, making it have a random level value.
>> This is a problem when it's not zero for the btrfs_search_slot() calls
>> the test ends up doing, resulting in crashes or hangs such as the following:
>>
>
>> Therefore initialize the extent buffer as an empty leaf (level 0).
>>
>> Issue easy to reproduce when btrfs is built as a module via:
>>
>>     $ for ((i = 1; i <= 1000000; i++)); do rmmod btrfs; modprobe btrfs; done
>
> Nice, thanks Filipe, I hadn't been able to trigger this yet.

It's a bit rare for me too, happens about 1/100 in my vm. Every time
it fails root->node's header level is a non-zero value, usually way
bigger than BTRFS_MAX_LEVEL (8), causing all sorts of badness in
btrfs_search_slot() due to out of bounds accesses to the arrays
path->{locks | nodes | slots}

>
> -chris



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to