Skip to contentSkip to conversation

PAP-12365: check_after_balance_leaf: S is incorrectkernel BUG at prints.c:334! (Part 4)

PATCH Xuan Baldauf 3 participants 4 messages Aug 12, 2002 – Aug 13, 2002

lore
Share & tools
lore
#0 lore raw

I checked the filesystem multiple times with reiserfsck-3.x.0b (first) and reiserfsck-3.x.0k-pre8 (then). The first run showed a bitmap error which was fixed then with "--fix-fixable". All subsequent runs could not find any error. All logs above were captured aftere these reiserfsck runs.

The first shown errors

Aug 10 22:15:44 router0 kernel: B_FREE_SPACE
(PATH_H_PBUFFER(tb->tb_path,0)) = 1596; MAX_CHILD_SIZE
(4072) - dc_size( [dc_number=-981319276, dc_size=53157], 56
) [2472] = 1600
Aug 10 21:10:45 router0 kernel: B_FREE_SPACE
(PATH_H_PBUFFER(tb->tb_path,0)) = 1608; MAX_CHILD_SIZE
(4072) - dc_size( [dc_number=0, dc_size=53157], 97 ) [2460]
= 1612
Aug 10 21:21:40 router0 kernel: B_FREE_SPACE
(PATH_H_PBUFFER(tb->tb_path,0)) = 1600; MAX_CHILD_SIZE
(4072) - dc_size( [dc_number=0, dc_size=53157], 99 ) [2468]
= 1604
Aug 10 21:38:57 router0 kernel: B_FREE_SPACE
(PATH_H_PBUFFER(tb->tb_path,0)) = 1600; MAX_CHILD_SIZE
(4072) - dc_size( [dc_number=0, dc_size=53157], 98 ) [2468]
= 1604
Aug 10 22:05:21 router0 kernel: B_FREE_SPACE

(PATH_H_PBUFFER(tb->tb_path,0)) = 8; MAX_CHILD_SIZE (4072) - dc_size( [dc_number=0, dc_size=53157], 97 ) [4060] = 12

seem to indicate that reiserfs is somehow miscalculating something by 4 units, where the result of the left calculation is always 4 less than the result of the right calculation. Reiserfs detects that something is wrong, but reiserfsck did not detect this?

I also checked the machine with memcheck and tried to reproduce the problem with DMA off. Memcheck did not show errors and switching DMA off did not show differences. Kernel compilation works so a hardware error of the machine is unlikely, although the problems appeared after a series of unscheduled poweroffs.

I always let reiserfs run under REISERFS_CHECK to be sure that everything is okay (I do not care for CPU time, the machine is fast), and did not find any problems so far. Now I'm nervous about not running the machine with REISERFS_CHECK anymore...

Please help,

Xuân.

include/linux/netfilter_ipv4/listhelp.h renamed from include/linux/netfilter_ipv4/listhelp.h.orig +8 -3
@@ -49,15 +49,20 @@
 	return LIST_FIND(head, __list_cmp_same, void *, entry) != NULL;
 }
 
+extern void show_stack(unsigned long * esp);
+
 /* Delete from list. */
 #ifdef CONFIG_NETFILTER_DEBUG
 #define LIST_DELETE(head, oldentry)					\
 do {									\
 	ASSERT_WRITE_LOCK(head);					\
-	if (!list_inlist(head, oldentry))				\
+	if (!list_inlist(head, oldentry))	{			\
+		show_stack(NULL);					\
 		printk("LIST_DELETE: %s:%u `%s'(%p) not in %s.\n",	\
-		       __FILE__, __LINE__, #oldentry, oldentry, #head);	\
-        else list_del((struct list_head *)oldentry);			\
+		__FILE__, __LINE__, #oldentry, oldentry, #head);	\
+	} else {							\
+		list_del((struct list_head *)oldentry);			\
+	}								\
 } while(0)
 #else
 #define LIST_DELETE(head, oldentry) list_del((struct list_head *)oldentry)
arch/i386/kernel/i386_ksyms.c renamed from arch/i386/kernel/i386_ksyms.c.orig +4 -0
@@ -161,3 +161,7 @@
 #ifdef CONFIG_X86_PAE
 EXPORT_SYMBOL(empty_zero_page);
 #endif
+
+extern void show_stack(unsigned long * esp);
+
+EXPORT_SYMBOL(show_stack);
fs/reiserfs/prints.c renamed from fs/reiserfs.orig/prints.c +9 -0
diff --exclude=*.o -Nur linux/fs/reiserfs.orig/prints.c linux/fs/reiserfs/prints.c
@@ -338,6 +338,15 @@
 	 sb ? kdevname(sb->s_dev) : "sb == 0", error_buf);
 }
 
+extern void show_stack(unsigned long * esp);
+
+void reiserfs_nervous (struct super_block * sb, const char * fmt, ...)
+{
+  show_reiserfs_locks() ;
+  do_reiserfs_warning(fmt);
+  printk ( KERN_EMERG "%s", error_buf);
+  show_stack(NULL);
+}
 
 void print_virtual_node (struct virtual_node * vn)
 {
fs/reiserfs/stree.c renamed from fs/reiserfs.orig/stree.c +5 -1
diff --exclude=*.o -Nur linux/fs/reiserfs.orig/stree.c linux/fs/reiserfs/stree.c
@@ -740,7 +740,11 @@
 #ifdef CONFIG_REISERFS_CHECK
 	if ( cur_tb ) {
 	    print_cur_tb ("5140");
-	    reiserfs_panic(p_s_sb, "PAP-5140: search_by_key: schedule occurred in do_balance!");
+	    if (0) {
+	    	reiserfs_panic(p_s_sb, "PAP-5140: search_by_key: schedule occurred in do_balance!");
+	    } else {
+	    	reiserfs_nervous(p_s_sb, "PAP-5140: search_by_key: schedule occurred in do_balance!");
+	    }
 	}
 #endif
 
#1 lore raw
Quoted 6 lines · Xuan Baldauf

I checked the filesystem multiple times with reiserfsck-3.x.0b (first) and reiserfsck-3.x.0k-pre8 (then). The first run showed a bitmap error which was fixed then with "--fix-fixable". All subsequent runs could not find any error. All logs above were captured aftere these reiserfsck runs.

Use version 3.6.3 of reiserfs-utils. *Do not* use any previous version (3.x.0b & 3.x.0.k are *really* obsolete), nor do not use any kernel below 2.4.18 (2.4.19 is preferred).

Umount the filesystems, check them using newest reiserfsck, then upgrade to newest kernel.

Cheers, Kuba Ober

#2 lore raw
Quoted 8 lines · Kuba Ober
Quoted 6 lines · Xuan Baldauf

I checked the filesystem multiple times with reiserfsck-3.x.0b (first) and reiserfsck-3.x.0k-pre8 (then). The first run showed a bitmap error which was fixed then with "--fix-fixable". All subsequent runs could not find any error. All logs above were captured aftere these reiserfsck runs.

Quoted 8 lines

Use version 3.6.3 of reiserfs-utils. *Do not* use any previous version (3.x.0b & 3.x.0.k are *really* obsolete), nor do not use any kernel below 2.4.18 (2.4.19 is preferred).

Umount the filesystems, check them using newest reiserfsck, then upgrade to newest kernel.

Cheers, Kuba Ober

Hello Kuba,

using reiserfsck 3.6.3 --fix-fixable fixed the problem. Thank you.

Xuân.

#3 lore raw
Quoted 20 lines · Xuan Baldauf
Quoted 16 lines · Kuba Ober
Quoted 6 lines · Xuan Baldauf

I checked the filesystem multiple times with reiserfsck-3.x.0b (first) and reiserfsck-3.x.0k-pre8 (then). The first run showed a bitmap error which was fixed then with "--fix-fixable". All subsequent runs could not find any error. All logs above were captured aftere these reiserfsck runs.

Use version 3.6.3 of reiserfs-utils. *Do not* use any previous version (3.x.0b & 3.x.0.k are *really* obsolete), nor do not use any kernel below 2.4.18 (2.4.19 is preferred).

Umount the filesystems, check them using newest reiserfsck, then upgrade to newest kernel.

Quoted 9 lines
Quoted 1 line

Cheers, Kuba Ober

Hello Kuba,

using reiserfsck 3.6.3 --fix-fixable fixed the problem. Thank you.

Xuân.

Thank you two nice people commenting this thread, so far. Xuan and Kuba! And finally pointing to reiserfsprogs-3.6.3-finals help.

BTW, I find it poor, the reiserfs-team didn't react with that hint directly.

I just compiled the newest reiserfsprogs upon your direct "advice", immediately, that Vitaly Fertmans words didn't say that exactly,

Thanks

Manuel