Skip to contentSkip to conversation

possible reiser4 bug

DISCUSSION Alec Burney 3 participants 6 messages Feb 24, 2006 – Feb 28, 2006

lore
Share & tools
lore
#0 lore raw

i have been experiencing hard locks (preceded by intense 5< load averages, disk i/o timeouts, and processes gone astray) that seem to be related to a possible bug in reiser4.
here is the information that i think is important:

a sample dmesg from right before a hardlock:

------------[ cut here ]------------
kernel BUG at fs/reiser4/plugin/file/tail_conversion.c:29!
invalid opcode: 0000 [#1]
SMP
last sysfs file: /class/vc/vcsa7/dev
Modules linked in: snd_rtctimer
CPU:    0
EIP:    0060:[<c019c3bb>]    Not tainted VLI
EFLAGS: 00210282   (2.6.16-rc3-mm1 #1)

EIP is at get_exclusive_access+0x1b/0x44
eax: eec1b1ac ebx: ecda70d8 ecx: ecda7140 edx: 00000000
esi: addee000 edi: eec1b160 ebp: 00000000 esp: dfd89f38
ds: 007b es: 007b ss: 0068
Process soffice.bin (pid: 11208, threadinfo=dfd89000 task=e1193a70)

Stack: <0>00000001 c019b956 c013f613 eecbfb74 e8daa560 00000001
00005600 00000000
       ecda70d8 ecda7140 addee000 ea8ea7c0 00005600 d06d2740 00005600 ea8ea7c0
       c03b0e10 00000000 c014bbf3 dfd89fa4 addee000 ea8ea7c0 fffffff7 bfb4a870
Call Trace:
 <c019b956> write_unix_file+0x2a4/0x44b   <c013f613> vma_link+0xa2/0xbc
 <c014bbf3> vfs_write+0xab/0x14c   <c014bd32> sys_write+0x3c/0x62
 <c01025bf> sysenter_past_esp+0x54/0x75
Code: 8d 43 10 e8 5c 54 1a 00 e9 f8 fc ff ff 90 90 90 53 89 c3 b8 00

f0 ff ff 21 e0 8b 00 8b 80 c8 04 00 00 8b 40 48 83 78 0c 00 74 08 <0f> 0b 1d 00 e0 58 36 c0 e8 28 61 1a 00 ba 01 00 ff ff 89 d8 f0

my uname -a:
Linux helix 2.6.16-rc3-mm1 #1 SMP Sun Feb 19 21:46:21 HST 2006 i686 AMD Athlon(tm) MP 2600+ AuthenticAMD GNU/Linux

my fsck.reiser4 -V
fsck.reiser4 1.0.5
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

my fsck.reiser4 -p from a drive known to be causing trouble Default profiles:

format:     "format40" (id:0x0 type:0x8)
journal:    "journal40" (id:0x0 type:0xf)
oid:        "oid40" (id:0x0 type:0x9)
alloc:      "alloc40" (id:0x0 type:0xe)
key:        "key_large" (id:0x1 type:0x10)
node:       "node40" (id:0x0 type:0x2)
statdata:   "stat40" (id:0x0 type:0x1)
nodeptr:    "nodeptr40" (id:0x3 type:0x1)
direntry:   "cde40" (id:0x2 type:0x1)
tail:       "plain40" (id:0x6 type:0x1)
extent:     "extent40" (id:0x5 type:0x1)
acl:        "absent (id:0x4 type:0x1)"
permission: "absent (id:0x0 type:0x6)"
regular:    "reg40" (id:0x0 type:0x0)
directory:  "dir40" (id:0x1 type:0x0)
symlink:    "sym40" (id:0x2 type:0x0)
special:    "spl40" (id:0x3 type:0x0)
hash:       "r5_hash" (id:0x1 type:0x3)
fibration:  "ext_1_fibre" (id:0x2 type:0x4)
formatting: "smart" (id:0x2 type:0x5)

the partition in question is 232903996 kilobytes large (that's 223 gigabytes), and does not fail badblocks or fsck.reiser4 testing. my system holds up to memtest86, and does not crash if the drive is not mounted and used.

my question: can this be fixed, has it been fixed, or can i convert this drive online to reiserfs.
sorry for such a long message, but this is very important to me. thank you!

#1 lore raw

hello,

Quoted 32 lines · Alec Burney

i have been experiencing hard locks (preceded by intense 5< load averages, disk i/o timeouts, and processes gone astray) that seem to be related to a possible bug in reiser4.
here is the information that i think is important:

a sample dmesg from right before a hardlock:

------------[ cut here ]------------
kernel BUG at fs/reiser4/plugin/file/tail_conversion.c:29!
invalid opcode: 0000 [#1]
SMP
last sysfs file: /class/vc/vcsa7/dev 
Modules linked in: snd_rtctimer
CPU:    0
EIP:    0060:[<c019c3bb>]    Not tainted VLI
EFLAGS: 00210282   (2.6.16-rc3-mm1 #1)

EIP is at get_exclusive_access+0x1b/0x44
eax: eec1b1ac ebx: ecda70d8 ecx: ecda7140 edx: 00000000
esi: addee000 edi: eec1b160 ebp: 00000000 esp: dfd89f38
ds: 007b es: 007b ss: 0068
Process soffice.bin (pid: 11208, threadinfo=dfd89000 task=e1193a70)

Stack: <0>00000001 c019b956 c013f613 eecbfb74 e8daa560 00000001
00005600 00000000
       ecda70d8 ecda7140 addee000 ea8ea7c0 00005600 d06d2740 00005600
ea8ea7c0 c03b0e10 00000000 c014bbf3 dfd89fa4 addee000 ea8ea7c0
fffffff7 bfb4a870 Call Trace:
 <c019b956> write_unix_file+0x2a4/0x44b   <c013f613>
vma_link+0xa2/0xbc <c014bbf3> vfs_write+0xab/0x14c   <c014bd32>
sys_write+0x3c/0x62 <c01025bf> sysenter_past_esp+0x54/0x75
Code: 8d 43 10 e8 5c 54 1a 00 e9 f8 fc ff ff 90 90 90 53 89 c3 b8 00

f0 ff ff 21 e0 8b 00 8b 80 c8 04 00 00 8b 40 48 83 78 0c 00 74 08 <0f> 0b 1d 00 e0 58 36 c0 e8 28 61 1a 00 ba 01 00 ff ff 89 d8 f0

[...]

Quoted 4 lines

my question: can this be fixed, has it been fixed, or can i convert this drive online to reiserfs.
sorry for such a long message, but this is very important to me. thank you!

would you please try the attached patch.

Signature · 1 line
Alex.
 fs/reiser4/plugin/file/file.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
fs/reiser4/plugin/file/file.c +5 -4
Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/file/file.c
===================================================================
@@ -2454,6 +2454,7 @@ ssize_t write_unix_file(struct file *fil
 
 	if (inode_get_flag(inode, REISER4_PART_CONV)) {
 		/* we can not currently write to a file which is partially converted */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = finish_conversion(inode);
 		drop_exclusive_access(uf_info);
@@ -2481,6 +2482,7 @@ ssize_t write_unix_file(struct file *fil
 
 		   3) convert file to extents to not enter here on each write
 		   to mmaped file */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = check_pages_unix_file(file, inode);
 		drop_exclusive_access(uf_info);
@@ -2535,14 +2537,13 @@ ssize_t write_unix_file(struct file *fil
 	while (left > 0) {
 		int excl = 0;
 
-		/* getting exclusive or not exclusive access requires no
-		   transaction open */
-		txn_restart_current();
-
 		/* faultin user page */
 		fault_in_pages_readable(buf,
 					left > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : left);
 
+		/* getting exclusive or not exclusive access requires no
+		   transaction open */
+		txn_restart(ctx);
 		if (inode->i_size == 0) {
 			get_exclusive_access(uf_info);
 			excl = 1;
#2 lore raw

thanks for the patch, Alex, but yesterday i converted all of my harddisks to reiserFS in an act of frustration. Sorry that i can't help you test your patch.

Quoted 54 lines · Alexander Zarochentsev

hello,

On Friday 24 February 2006 08:35, Alec Burney wrote:

[...]

would you please try the attached patch.

------------------------------------------------------------------------

 fs/reiser4/plugin/file/file.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/file/file.c
===================================================================

fs/reiser4/plugin/file/file.c +5 -4
@@ -2454,6 +2454,7 @@ ssize_t write_unix_file(struct file *fil
 
 	if (inode_get_flag(inode, REISER4_PART_CONV)) {
 		/* we can not currently write to a file which is partially converted */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = finish_conversion(inode);
 		drop_exclusive_access(uf_info);
@@ -2481,6 +2482,7 @@ ssize_t write_unix_file(struct file *fil
 
 		   3) convert file to extents to not enter here on each write
 		   to mmaped file */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = check_pages_unix_file(file, inode);
 		drop_exclusive_access(uf_info);
@@ -2535,14 +2537,13 @@ ssize_t write_unix_file(struct file *fil
 	while (left > 0) {
 		int excl = 0;
 
-		/* getting exclusive or not exclusive access requires no
-		   transaction open */
-		txn_restart_current();
-
 		/* faultin user page */
 		fault_in_pages_readable(buf,
 					left > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : left);
 
+		/* getting exclusive or not exclusive access requires no
+		   transaction open */
+		txn_restart(ctx);
 		if (inode->i_size == 0) {
 			get_exclusive_access(uf_info);
 			excl = 1;
Signature · 1 line
cell: 808.332.5131
#3 lore raw
In reply to Alexander Zarochentsev
Quoted 1 line · Alexander Zarochentsev

would you please try the attached patch.

I'm having a similar problem on 2.6.16-rc4 + reiser4 from -mm1. I will be testing the attached patch.

Regards,

Francesco

Signature · 4 lines
Dr. Francesco Biscani
Dipartimento di Astronomia
Università di Padova
[email protected]
#4 lore raw
Quoted 5 lines · Francesco Biscani
Quoted 1 line · Alexander Zarochentsev

would you please try the attached patch.

I'm having a similar problem on 2.6.16-rc4 + reiser4 from -mm1. I will be testing the attached patch.

please use better version of the patch (attached).

Quoted 3 lines

Regards,

Francesco

Signature · 1 line
Alex.
 fs/reiser4/plugin/file/file.c            |    9 +++++----
 fs/reiser4/plugin/item/extent_file_ops.c |    2 +-
 fs/reiser4/vfs_ops.c                     |    5 ++++-
 3 files changed, 10 insertions(+), 6 deletions(-)
fs/reiser4/plugin/file/file.c +5 -4
Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/file/file.c
===================================================================
@@ -2454,6 +2454,7 @@ ssize_t write_unix_file(struct file *fil
 
 	if (inode_get_flag(inode, REISER4_PART_CONV)) {
 		/* we can not currently write to a file which is partially converted */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = finish_conversion(inode);
 		drop_exclusive_access(uf_info);
@@ -2481,6 +2482,7 @@ ssize_t write_unix_file(struct file *fil
 
 		   3) convert file to extents to not enter here on each write
 		   to mmaped file */
+		txn_restart(ctx);
 		get_exclusive_access(uf_info);
 		result = check_pages_unix_file(file, inode);
 		drop_exclusive_access(uf_info);
@@ -2535,14 +2537,13 @@ ssize_t write_unix_file(struct file *fil
 	while (left > 0) {
 		int excl = 0;
 
-		/* getting exclusive or not exclusive access requires no
-		   transaction open */
-		txn_restart_current();
-
 		/* faultin user page */
 		fault_in_pages_readable(buf,
 					left > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : left);
 
+		/* getting exclusive or not exclusive access requires no
+		   transaction open */
+		txn_restart(ctx);
 		if (inode->i_size == 0) {
 			get_exclusive_access(uf_info);
 			excl = 1;
fs/reiser4/vfs_ops.c +4 -1
Index: linux-2.6.16-rc3-mm1/fs/reiser4/vfs_ops.c
===================================================================
@@ -209,8 +209,11 @@ void writeout(struct super_block *sb, st
 
 void reiser4_throttle_write(struct inode *inode)
 {
-	txn_restart_current();
+	reiser4_context *ctx = get_current_context();
+
+	txn_restart(ctx);
 	balance_dirty_pages_ratelimited(inode->i_mapping);
+	txn_restart(ctx);
 }
 
 const char *REISER4_SUPER_MAGIC_STRING = "ReIsEr4";
fs/reiser4/plugin/item/extent_file_ops.c +1 -1
Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/item/extent_file_ops.c
===================================================================
@@ -803,7 +803,7 @@ extent_balance_dirty_pages(struct inode 
 		fault_in_pages_readable(f->data,
 					f->length > PAGE_CACHE_SIZE ?
 					PAGE_CACHE_SIZE : f->length);
-
+		txn_restart_current();
 		if (excl)
 			get_exclusive_access(uf_info);
 		else
#5 lore raw
Quoted 1 line · Alexander Zarochentsev

please use better version of the patch (attached).

Hello,

after some days of testing the problem seems gone. The kernel survived many
CPU and I/O intensive tasks (some compilations of gcc and firefox) without an hiccup, whereas without the patch it hanged quite soon.

Thanks and regards,

Francesco

Signature · 4 lines
Dr. Francesco Biscani
Dipartimento di Astronomia
Università di Padova
[email protected]