Re: problem with nilfs_cleanerd

2010-07-07 Thread Ryusuke Konishi
Hi,

On Tue, 06 Jul 2010 11:02:41 +0200, Łukasz_Wójcicki wrote:
 I'am using kernel 2.6.20 with nilf_utils-2-0-18 and nilfs kernel module
 2-0-20 .
 
 1Unable to handle kernel NULL pointer dereference at virtual address
 
 1pgd = c4eb
 1[] *pgd=c4e2d031, *pte=, *ppte=
 4Internal error: Oops: 17 [#1]
 4Modules linked in:
 4CPU: 0
 4PC is at nilfs_btree_lookup_dirty_buffers+0x10c/0x1ec
 4LR is at 0xc4c99b24
snip

Could you try the following patch to narrow down the cause?

There is a function lacking range check in the btree code.  This patch
will catch the defect if the oops comes from a range error.

I'm now reviewing the btree code to find out root cause of the range
error.

Thanks,
Ryusuke Konishi
---

diff --git a/fs/btree.c b/fs/btree.c
index beb11fe..9622ff4 100644
--- a/fs/btree.c
+++ b/fs/btree.c
@@ -2007,6 +2007,15 @@ static void nilfs_btree_add_dirty_buffer(struct 
nilfs_btree *btree,
node = (struct nilfs_btree_node *)bh-b_data;
key = nilfs_btree_node_get_key(node, 0);
level = nilfs_btree_node_get_level(node);
+   if (level  NILFS_BTREE_LEVEL_NODE_MIN ||
+   level = NILFS_BTREE_LEVEL_MAX) {
+   dump_stack();
+   printk(KERN_CRIT
+  %s: invalid btree level: %d (ino=%lu)\n, __func__,
+  level, NILFS_BMAP_I(btree-bt_bmap)-vfs_inode.i_ino);
+   return;
+   }
+
list_for_each(head, lists[level]) {
cbh = list_entry(head, struct buffer_head, b_assoc_buffers);
cnode = (struct nilfs_btree_node *)cbh-b_data;
-- 
1.6.6.2



Re: problem with nilfs_cleanerd

2010-07-07 Thread Łukasz Wójcicki
Does this patch eliminate the problem?
Unfortunately I can not generate this error again because after
re-formatting the memory (mkfs.nilfs2) the problem disappeared.

Łukasz Wójcicki 
 



Dnia 2010-07-07, śro o godzinie 15:02 +0900, Ryusuke Konishi pisze:
 Hi,
 
 On Tue, 06 Jul 2010 11:02:41 +0200, Łukasz_Wójcicki wrote:
  I'am using kernel 2.6.20 with nilf_utils-2-0-18 and nilfs kernel module
  2-0-20 .
  
  1Unable to handle kernel NULL pointer dereference at virtual address
  
  1pgd = c4eb
  1[] *pgd=c4e2d031, *pte=, *ppte=
  4Internal error: Oops: 17 [#1]
  4Modules linked in:
  4CPU: 0
  4PC is at nilfs_btree_lookup_dirty_buffers+0x10c/0x1ec
  4LR is at 0xc4c99b24
 snip
 
 Could you try the following patch to narrow down the cause?
 
 There is a function lacking range check in the btree code.  This patch
 will catch the defect if the oops comes from a range error.
 
 I'm now reviewing the btree code to find out root cause of the range
 error.
 
 Thanks,
 Ryusuke Konishi
 ---
 
 diff --git a/fs/btree.c b/fs/btree.c
 index beb11fe..9622ff4 100644
 --- a/fs/btree.c
 +++ b/fs/btree.c
 @@ -2007,6 +2007,15 @@ static void nilfs_btree_add_dirty_buffer(struct 
 nilfs_btree *btree,
   node = (struct nilfs_btree_node *)bh-b_data;
   key = nilfs_btree_node_get_key(node, 0);
   level = nilfs_btree_node_get_level(node);
 + if (level  NILFS_BTREE_LEVEL_NODE_MIN ||
 + level = NILFS_BTREE_LEVEL_MAX) {
 + dump_stack();
 + printk(KERN_CRIT
 +%s: invalid btree level: %d (ino=%lu)\n, __func__,
 +level, NILFS_BMAP_I(btree-bt_bmap)-vfs_inode.i_ino);
 + return;
 + }
 +
   list_for_each(head, lists[level]) {
   cbh = list_entry(head, struct buffer_head, b_assoc_buffers);
   cnode = (struct nilfs_btree_node *)cbh-b_data;

--
To unsubscribe from this list: send the line unsubscribe linux-nilfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: problem with nilfs_cleanerd

2010-07-07 Thread Ryusuke Konishi
On Wed, 07 Jul 2010 15:02:25 +0900 (JST), Ryusuke Konishi wrote:
 Hi,
 
 On Tue, 06 Jul 2010 11:02:41 +0200, Łukasz_Wójcicki wrote:
  I'am using kernel 2.6.20 with nilf_utils-2-0-18 and nilfs kernel module
  2-0-20 .
  
  1Unable to handle kernel NULL pointer dereference at virtual address
  
  1pgd = c4eb
  1[] *pgd=c4e2d031, *pte=, *ppte=
  4Internal error: Oops: 17 [#1]
  4Modules linked in:
  4CPU: 0
  4PC is at nilfs_btree_lookup_dirty_buffers+0x10c/0x1ec
  4LR is at 0xc4c99b24
 snip
 
 Could you try the following patch to narrow down the cause?
 
 There is a function lacking range check in the btree code.  This patch
 will catch the defect if the oops comes from a range error.
 
 I'm now reviewing the btree code to find out root cause of the range
 error.
 
 Thanks,
 Ryusuke Konishi

Let me ask you a question.

Are there any warnings or errors earlier in the log?

Ryusuke Konishi


Re: problem with nilfs_cleanerd - part 2

2010-07-07 Thread Łukasz Wójcicki


Dnia 2010-07-07, śro o godzinie 12:32 +0200, Łukasz Wójcicki pisze:
 I notice another problem with nilfs_cleanerd :
 
 2nilfs_ioctl_move_inode_block: conflicting data buffer: ino=4, cno=0,
 offset=0, blocknr=19063, vblocknr=2389
 3NILFS: GC failed during preparation: cannot read source blocks:
 err=-17
 
 
 Łukasz Wójcicki
 

Problem disappeared after rmcp command .

--
To unsubscribe from this list: send the line unsubscribe linux-nilfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: problem with nilfs_cleanerd - part 2

2010-07-07 Thread Ryusuke Konishi
On Wed, 07 Jul 2010 12:48:49 +0200, Łukasz_Wójcicki  wrote:
 Dnia 2010-07-07, śro o godzinie 12:32 +0200, Łukasz Wójcicki pisze:
  I notice another problem with nilfs_cleanerd :
  
  2nilfs_ioctl_move_inode_block: conflicting data buffer: ino=4, cno=0,
  offset=0, blocknr=19063, vblocknr=2389
  3NILFS: GC failed during preparation: cannot read source blocks:
  err=-17
  
  
  Łukasz Wójcicki
  
 
 Problem disappeared after rmcp command .

Thanks.  Uum, this looks another tough problem since it's impossible
in principle.

Did it arise before reformatting the partition ?  Or after that ?

Regards,
Ryusuke Konishi
N�r��yb�X��ǧv�^�)޺{.n�+{��)_�)w*jg����ݢj/���z�ޖ��2�ޙ�)ߡ�a�����G���h��j:+v���w��٥

Re: problem with nilfs_cleanerd - part 2

2010-07-07 Thread Łukasz Wójcicki

 
 Did it arise before reformatting the partition ?  Or after that ?
 
 Regards,
 Ryusuke Konishi

After.

--
To unsubscribe from this list: send the line unsubscribe linux-nilfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html