xfs
[Top] [All Lists]

Re: [BUG report]xfs_btree_make_block_unfull generated an OOPS

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [BUG report]xfs_btree_make_block_unfull generated an OOPS
From: hank peng <pengxihan@xxxxxxxxx>
Date: Tue, 15 Dec 2009 13:36:29 +0800
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=u+b8YLcMwubvT+Rxac5gPNtxWRsbNcEYHBuNVmMgX5w=; b=DBZbspGOBh5+ezLTzJIu5Rc7Cnl/4rnwqKrNdPSO458Ur3HjDOPn83zfxt9BTYEyuO OVd1pqFD5517XhliWj7iQd8y6C/Y/pHxrYLCFHA+K06PO06L1lsEroUXkBBxM0gQ66Wv 6fiqZMypGR9zE4NWOFarLtF/n71TDcE7nK8n4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=t8Jc7sbVsEoHVSLG3qquzSazr6lLs6wPtEGsewj2nFBcHk5rxRime0X1M02WKD409t 1s3Z5WQDM1bmmdfY99CySjXy3WSpMxOZTfi+9urOFJCnOitTakxVpfDapvuanN9gva98 6HiNyZC4PvSCf5Jp2M71LGLb5Sq8hCSQaVPfQ=
In-reply-to: <20091215012640.GA4850@xxxxxxxxxxxxxxxx>
References: <4B1F1211.90607@xxxxxxxxxxx> <4B1F18C4.3060704@xxxxxxxxxxx> <389deec70912082053v4310057dg479f6d4b6c4b46f7@xxxxxxxxxxxxxx> <4B1F31FD.3020705@xxxxxxxxxxx> <389deec70912082220pcb3b5d1q516ac197d31502c5@xxxxxxxxxxxxxx> <389deec70912082230g38987576pc48d7699f23844c5@xxxxxxxxxxxxxx> <389deec70912140119q40ed91cao62fe9c9ebdf13601@xxxxxxxxxxxxxx> <4B26604B.3060901@xxxxxxxxxxx> <389deec70912141649g767a1540hdeae66707c4c68fd@xxxxxxxxxxxxxx> <20091215012640.GA4850@xxxxxxxxxxxxxxxx>
2009/12/15 Dave Chinner <david@xxxxxxxxxxxxx>:
> On Tue, Dec 15, 2009 at 08:49:37AM +0800, hank peng wrote:
>> Hi, Eric:
>> I add some code like this:
>> if (*stat) {
>>                 printk("*stat = 0x%08x, oindex = %p, index = %p\n",
>>                                 *stat, oindex, index);
>>                 if (oindex == NULL || index == NULL) {
>
> This won't catch bad non-NULL pointers like you are seeing.
>
>>                         printk("BUG occured!\n");
>>                         printk("oindex = %p, index = %p\n", oindex, index);
>>                         BUG();
>>                 }
>>                 *oindex = *index = cur->bc_ptrs[level];
>>                 return 0;
>>         }
>>
>> And the same OOPS happened again but a little different, kernel messages are:
>>
>> <snip>
>> *stat = 0x00000001, oindex = e87d7bf8, index = e87d7bfc
>> *stat = 0x00000001, oindex = e87d7bf8, index = e87d7bfc
>> *stat = 0x00000001, oindex = e87d7bf8, index = e87d7bfc
>> *stat = 0x00000001, oindex = e87d7bf8, index = e87d7bfc
>> *stat = 0x00000001, oindex = 00000501, index = 22008424
>> Unable to handle kernel paging request for data at address 0x22008424
>
> Given that oindex and index are stack varibles, this indicates some

In xfs_btree_make_block_unfull, it seems that oindex and index are
optimised to register variables. So, it become more odd.

> thing is probably smashing the stack. Possibly a buffer overrun. To
> narrow down the possible cause, can you add the debug:
>
>        printk("%s:%s: oindex = %p, index = %p\n",
>                        __func__, __LINE__, oindex, index);
>
> throughout the xfs_btree_make_block_unfull() function? i.e. at
> first entry, before the xfs_btree_rshift() call, before the
> xfs_btree_lshift() call, etc, to see if any of the parameters
> are being modified during execution of the function?
>
> If the variables being passed into xfs_btree_make_block_unfull() are
> already bad, then do the same thing for the caller
> xfs_btree_insert(). This may help narrow down where the problem
> is coming from....
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@xxxxxxxxxxxxx
>



-- 
The simplest is not all best but the best is surely the simplest!

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