All of lore.kernel.org
 help / color / mirror / Atom feed
* Reiser4 stress test.
@ 2006-08-21 21:58 Andrew James Wade
  2006-08-21 22:41 ` assertion failed: can_hit_entd(ctx, s) Andrew James Wade
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-21 21:58 UTC (permalink / raw)
  To: reiserfs-list

Hello,

     I've been having problems with Reiser 4 panicking for a few
months, and I've recently had time to investigate the matter. I've
created a program that can crash my system in a few minutes. It's
based on kmail's disk activity and consists of small, separated writes
to a file that is also mmapped.

=== scatteredwrites ===
#!/usr/bin/python

import os
import mmap
import optparse

parser = optparse.OptionParser(description=
"Creates a file in $CWD and performs a pattern of reads and writes to it in an "
"attempt to trigger fs bugs. The file is broken up into regions: for each "
"region the entire region is read, then some portion of it is written to."
"\nDistilled from kmail workload.")

parser.add_option("--region-size", dest="regionsize", default=65536,
    type="int", help="Set region size to BYTES", metavar="BYTES")
parser.add_option("--region-count", dest="regioncount", default=2048,
    type="int", help="Set number of regions to COUNT", metavar="COUNT")
parser.add_option("--write-offset", dest="writeoffset", default=0,
    type="int", help="Offset write by BYTES in each region", metavar="BYTES")
parser.add_option("--write-size", dest="writesize", default=256,
    type="int", help="Size of write in each region.", metavar="BYTES")

options, args = parser.parse_args()


f = open("scatteredwrites.%d.tmp" % (os.getpid()), "w+b")

try:
    writestr = "A" * options.regionsize
    for i in xrange(options.regioncount):
        f.write(writestr)
    f.close()

    f = open("scatteredwrites.%d.tmp" % (os.getpid()), "r+b")

    writestr = "B" * options.writesize

    dummy = mmap.mmap(f.fileno(), options.regionsize * options.regioncount,
                      mmap.MAP_SHARED)

    while True:
        for i in xrange(options.regioncount):
            f.seek(i * options.regionsize, 0)
            f.read(options.regionsize)
            f.seek(- options.regionsize + options.writeoffset,1)
            f.write(writestr)

except KeyboardInterrupt:
    os.unlink("scatteredwrites.%d.tmp" % (os.getpid()))

======
Without fs load this stress test rarely causes problems. But with five
instances running in parallel with five instances of a large grep (or
patch, or tar), my computer crashes on a timescale of 10 minutes.


I've also added a few patches to my kernel to help me debug the
problems I've been having:

diff -rupN a/fs/reiser4/page_cache.c b/fs/reiser4/page_cache.c
--- a/fs/reiser4/page_cache.c	2006-08-19 19:45:57.000000000 -0400
+++ b/fs/reiser4/page_cache.c	2006-08-19 20:23:43.000000000 -0400
@@ -489,12 +489,9 @@ static int can_hit_entd(reiser4_context 
 		return 1;
 	if (ctx->super != s)
 		return 1;
-	if (get_super_private(s)->entd.tsk == current)
-		return 0;
-	if (!lock_stack_isclean(&ctx->stack))
-		return 0;
-	if (ctx->trans->atom != NULL)
-		return 0;
+	assert("ajw-1", get_super_private(s)->entd.tsk != current);
+	assert("ajw-2", lock_stack_isclean(&ctx->stack));
+	assert("ajw-3", ctx->trans->atom == NULL);
 	return 1;
 }
 
diff -rupN 2.6.18-rc4-mm1/fs/reiser4/debug.c linux/fs/reiser4/debug.c
--- 2.6.18-rc4-mm1/fs/reiser4/debug.c	2006-08-18 19:21:13.000000000 -0400
+++ linux/fs/reiser4/debug.c	2006-08-18 19:24:35.000000000 -0400
@@ -56,6 +56,9 @@ static char panic_buf[REISER4_PANIC_MSG_
  */
 static DEFINE_SPINLOCK(panic_guard);
 
+static void print_lock_counters(const char *prefix,
+                                const reiser4_lock_counters_info * info);
+
 /* Your best friend. Call it on each occasion.  This is called by
     fs/reiser4/debug.h:reiser4_panic(). */
 void reiser4_do_panic(const char *format /* format string */ , ... /* rest */ )
@@ -74,6 +77,8 @@ void reiser4_do_panic(const char *format
 		vsnprintf(panic_buf, sizeof(panic_buf), format, args);
 		va_end(args);
 		printk(KERN_EMERG "reiser4 panicked cowardly: %s", panic_buf);
+		dump_stack();
+		print_lock_counters("",reiser4_lock_counters());
 		spin_unlock(&panic_guard);
 
 		/*

I've also added this bugfix by Alexander Zarochentsev <zam@namesys.com>:

Index: linux-2.6-git/fs/reiser4/as_ops.c
===================================================================
--- linux-2.6-git.orig/fs/reiser4/as_ops.c
+++ linux-2.6-git/fs/reiser4/as_ops.c
@@ -350,6 +350,11 @@ int reiser4_releasepage(struct page *pag
 	if (PageDirty(page))
 		return 0;
 
+	/* extra page reference is used by reiser4 to protect
+	 * jnode<->page link from this ->releasepage(). */
+	if (page_count(page) > 3)
+		return 0;
+
 	/* releasable() needs jnode lock, because it looks at the jnode fields
 	 * and we need jload_lock here to avoid races with jload(). */
 	spin_lock_jnode(node);


Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* assertion failed: can_hit_entd(ctx, s)
  2006-08-21 21:58 Reiser4 stress test Andrew James Wade
@ 2006-08-21 22:41 ` Andrew James Wade
  2006-08-25 18:42   ` Alexander Zarochentsev
  2006-08-21 22:44 ` assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY) Andrew James Wade
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Andrew James Wade @ 2006-08-21 22:41 UTC (permalink / raw)
  To: reiserfs-list

This is the most common panic I've been getting. It looks like this:
(2.6.18-rc4-mm1)

reiser4 panicked cowardly: reiser4[scatteredwrites(4506)]: reiser4_writepage (fs/reiser4/page_cache.c:522)[]:
assertion failed: can_hit_entd(ctx, s)
Kernel panic - not syncing: reiser4[scatteredwrites(4506)]: reiser4_writepage (fs/reiser4/page_cache.c:522)[]:
assertion failed: can_hit_entd(ctx, s)

With the extra patches it looks like this:
(2.6.18-rc4-mm2)

reiser4 panicked cowardly: reiser4[grep(4918)]: can_hit_entd (fs/reiser4/page_cache.c:494)[ajw-3]:
assertion failed: ctx->trans->atom == NULL
 [<c0103870>] dump_trace+0x64/0x1ad
 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0ccf>] reiser4_do_panic+0x4e/0x7b
 [<c01e67b1>] reiser4_writepage+0xab/0x1a8
 [<c013b973>] shrink_inactive_list+0x37d/0x6f0
 [<c013bd94>] shrink_zone+0xae/0xcc
 [<c013c265>] try_to_free_pages+0x139/0x20d
 [<c0136f12>] __alloc_pages+0x189/0x27d
 [<c014c2ce>] cache_alloc_refill+0x2d2/0x5a0
 [<c014bfc7>] kmem_cache_alloc+0x70/0xa5
 [<c01eb68c>] reiser4_alloc_inode+0x51/0xfa
 [<c0163adc>] alloc_inode+0x14/0x122
 [<c0164ad5>] iget5_locked+0x3f/0x132
 [<c01f4091>] reiser4_iget+0x8b/0x361
 [<c01fadd8>] reiser4_lookup_common+0xef/0x151
 [<c015aef7>] do_lookup+0xa0/0x13d
 [<c015b72f>] __link_path_walk+0x79b/0xbd4
 [<c015bbb6>] link_path_walk+0x4e/0xc6
 [<c015c0e3>] do_path_lookup+0x203/0x21d
 [<c015c544>] __path_lookup_intent_open+0x44/0x76
 [<c015c5d2>] path_lookup_open+0x10/0x12
 [<c015c7c7>] open_namei+0x61/0x570
 [<c014e72d>] do_filp_open+0x1f/0x35
 [<c014e83e>] do_sys_open+0x3f/0xba
 [<c014e8e5>] sys_open+0x16/0x18
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x8d

Leftover inexact backtrace:

 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0ccf>] reiser4_do_panic+0x4e/0x7b
 [<c01e67b1>] reiser4_writepage+0xab/0x1a8
 [<c013b973>] shrink_inactive_list+0x37d/0x6f0
 [<c013bd94>] shrink_zone+0xae/0xcc
 [<c013c265>] try_to_free_pages+0x139/0x20d
 [<c0136f12>] __alloc_pages+0x189/0x27d
 [<c014c2ce>] cache_alloc_refill+0x2d2/0x5a0
 [<c014bfc7>] kmem_cache_alloc+0x70/0xa5
 [<c01eb68c>] reiser4_alloc_inode+0x51/0xfa
 [<c0163adc>] alloc_inode+0x14/0x122
 [<c0164ad5>] iget5_locked+0x3f/0x132
 [<c01f4091>] reiser4_iget+0x8b/0x361
 [<c01fadd8>] reiser4_lookup_common+0xef/0x151
 [<c015aef7>] do_lookup+0xa0/0x13d
 [<c015b72f>] __link_path_walk+0x79b/0xbd4
 [<c015bbb6>] link_path_walk+0x4e/0xc6
 [<c015c0e3>] do_path_lookup+0x203/0x21d
 [<c015c544>] __path_lookup_intent_open+0x44/0x76
 [<c015c5d2>] path_lookup_open+0x10/0x12
 [<c015c7c7>] open_namei+0x61/0x570
 [<c014e72d>] do_filp_open+0x1f/0x35
 [<c014e83e>] do_sys_open+0x3f/0xba
 [<c014e8e5>] sys_open+0x16/0x18
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
 =======================
: jnode: 0, tree: 0 (r:0,w:0), dk: 0 (r:0,w:0)
jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 0,
spin: 0, long: 0 inode_sem: (r:0,w:0)
d: 0, x: 0, t: 0
Kernel panic - not syncing: reiser4[grep(4918)]: can_hit_entd (fs/reiser4/page_cache.c:494)[ajw-3]:
assertion failed: ctx->trans->atom == NULL

================


reiser4 panicked cowardly: reiser4[scatteredwrites(4245)]: can_hit_entd (fs/reiser4/page_cache.c:494)[ajw-3]:
assertion failed: ctx->trans->atom == NULL
 [<c0103870>] dump_trace+0x64/0x1ad
 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0ccf>] reiser4_do_panic+0x4e/0x7b
 [<c01e67b1>] reiser4_writepage+0xab/0x1a8
 [<c013b973>] shrink_inactive_list+0x37d/0x6f0
 [<c013bd94>] shrink_zone+0xae/0xcc
 [<c013c265>] try_to_free_pages+0x139/0x20d
 [<c0136f12>] __alloc_pages+0x189/0x27d
 [<c01388a7>] __do_page_cache_readahead+0xcc/0x1d2
 [<c0138f07>] blockable_page_cache_readahead+0x51/0xd9
 [<c0139010>] make_ahead_window+0x81/0xa4
 [<c013918a>] page_cache_readahead+0x157/0x176
 [<c023aa82>] reiser4_read_extent+0x374/0x6ab
 [<c020511f>] read_unix_file+0x5c7/0x762
 [<c014f1e2>] vfs_read+0x88/0x134
 [<c014fa4e>] sys_read+0x3b/0x60
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x8d

Leftover inexact backtrace:

 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0ccf>] reiser4_do_panic+0x4e/0x7b
 [<c01e67b1>] reiser4_writepage+0xab/0x1a8
 [<c013b973>] shrink_inactive_list+0x37d/0x6f0
 [<c013bd94>] shrink_zone+0xae/0xcc
 [<c013c265>] try_to_free_pages+0x139/0x20d
 [<c0136f12>] __alloc_pages+0x189/0x27d
 [<c01388a7>] __do_page_cache_readahead+0xcc/0x1d2
 [<c0138f07>] blockable_page_cache_readahead+0x51/0xd9
 [<c0139010>] make_ahead_window+0x81/0xa4
 [<c013918a>] page_cache_readahead+0x157/0x176
 [<c023aa82>] reiser4_read_extent+0x374/0x6ab
 [<c020511f>] read_unix_file+0x5c7/0x762
 [<c014f1e2>] vfs_read+0x88/0x134
 [<c014fa4e>] sys_read+0x3b/0x60
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
 =======================
: jnode: 0, tree: 0 (r:0,w:0), dk: 0 (r:0,w:0)
jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 0,
spin: 0, long: 0 inode_sem: (r:1,w:0)
d: 1, x: 1, t: 0
Kernel panic - not syncing: reiser4[scatteredwrites(4245)]: can_hit_entd (fs/reiser4/page_cache.c:494)[ajw-3]:
assertion failed: ctx->trans->atom == NULL

Andrew Wade


^ permalink raw reply	[flat|nested] 19+ messages in thread

* assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
  2006-08-21 21:58 Reiser4 stress test Andrew James Wade
  2006-08-21 22:41 ` assertion failed: can_hit_entd(ctx, s) Andrew James Wade
@ 2006-08-21 22:44 ` Andrew James Wade
  2006-08-29 21:38   ` Andrew James Wade
  2006-08-21 23:22 ` assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right)) Andrew James Wade
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Andrew James Wade @ 2006-08-21 22:44 UTC (permalink / raw)
  To: reiserfs-list


This one hasn't recurred, so I don't have a stack trace. I haven't
looked into it.
(2.6.18-rc4-mm1)

reiser4 panicked cowardly: reiser4[patch(9302)]: reiser4_set_page_dirty_internal
 (fs/reiser4/page_cache.c:475)[]:
assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
Kernel panic - not syncing: reiser4[patch(9302)]: reiser4_set_page_dirty_interna
l (fs/reiser4/page_cache.c:475)[]:
assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)

Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right))
  2006-08-21 21:58 Reiser4 stress test Andrew James Wade
  2006-08-21 22:41 ` assertion failed: can_hit_entd(ctx, s) Andrew James Wade
  2006-08-21 22:44 ` assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY) Andrew James Wade
@ 2006-08-21 23:22 ` Andrew James Wade
  2006-08-21 23:35 ` [nikita-1936] assertion failed: reiser4_no_counters_are_held() Andrew James Wade
  2006-08-22  5:23 ` Reiser4 stress test Hans Reiser
  4 siblings, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-21 23:22 UTC (permalink / raw)
  To: reiserfs-list


I looked at this one for a bit; I couldn't make any headway. I don't
fully understand what the debugging code for the delimiting keys is
doing.

(2.6.18-rc4-mm1)

reiser4 panicked cowardly: reiser4[ent:hdb1!(2167)]: sibling_list_remove (fs/reiser4/tree_walk.c:814)[zam-32245]:
assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right))
Kernel panic - not syncing: reiser4[ent:hdb1!(2167)]: sibling_list_remove (fs/reiser4/tree_walk.c:814)[zam-32245]:
assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right))

================

(2.6.18-rc4-mm1)

reiser4 panicked cowardly: reiser4[ent:hdb1!(2175)]: sibling_list_remove (fs/reiser4/tree_walk.c:814)[zam-32245]:
assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right))
 [<c0103754>] dump_trace+0x64/0x181
 [<c0103883>] show_trace_log_lvl+0x12/0x25
 [<c0103b79>] show_trace+0xd/0x10
 [<c0103b93>] dump_stack+0x17/0x19
 [<c01a0663>] reiser4_do_panic+0x4e/0x7b
 [<c01ee6bd>] sibling_list_remove+0x85/0x52e
 [<c01ba97d>] forget_znode+0x22b/0x33b
 [<c01b76e0>] longterm_unlock_znode+0x268/0x723
 [<c01da260>] handle_pos_on_formatted+0x35c/0x45f
 [<c01da3fc>] handle_pos_on_leaf+0x4d/0x61
 [<c01d6a84>] squalloc+0x16/0x52
 [<c01d89f7>] jnode_flush+0x80e/0x99d
 [<c01d8fee>] flush_current_atom+0x468/0x722
 [<c01cf073>] flush_some_atom+0x9c3/0xb13
 [<c01f4216>] reiser4_writeout+0x1a6/0x30c
 [<c01f554b>] entd+0x1e2/0x3d5
 [<c0124545>] kthread+0xaf/0xde
 [<c03eb415>] kernel_thread_helper+0x5/0xb
DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
Leftover inexact backtrace:
 [<c0103883>] show_trace_log_lvl+0x12/0x25
 [<c0103b79>] show_trace+0xd/0x10
 [<c0103b93>] dump_stack+0x17/0x19
 [<c01a0663>] reiser4_do_panic+0x4e/0x7b
 [<c01ee6bd>] sibling_list_remove+0x85/0x52e
 [<c01ba97d>] forget_znode+0x22b/0x33b
 [<c01b76e0>] longterm_unlock_znode+0x268/0x723
 [<c01da260>] handle_pos_on_formatted+0x35c/0x45f
 [<c01da3fc>] handle_pos_on_leaf+0x4d/0x61
 [<c01d6a84>] squalloc+0x16/0x52
 [<c01d89f7>] jnode_flush+0x80e/0x99d
 [<c01d8fee>] flush_current_atom+0x468/0x722
 [<c01cf073>] flush_some_atom+0x9c3/0xb13
 [<c01f4216>] reiser4_writeout+0x1a6/0x30c
 [<c01f554b>] entd+0x1e2/0x3d5
 [<c0124545>] kthread+0xaf/0xde
 [<c03eb415>] kernel_thread_helper+0x5/0xb
 =======================
: jnode: 0, tree: 1 (r:0,w:1), dk: 1 (r:0,w:1)
jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 1,
spin: 3, long: 1 inode_sem: (r:0,w:0)
d: 1, x: 4, t: -1
Kernel panic - not syncing: reiser4[ent:hdb1!(2175)]: sibling_list_remove (fs/reiser4/tree_walk.c:814)[zam-32245]:
assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right))

Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [nikita-1936] assertion failed: reiser4_no_counters_are_held()
  2006-08-21 21:58 Reiser4 stress test Andrew James Wade
                   ` (2 preceding siblings ...)
  2006-08-21 23:22 ` assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right)) Andrew James Wade
@ 2006-08-21 23:35 ` Andrew James Wade
  2006-08-25 13:18   ` Alexander Zarochentsev
  2006-09-02  0:35   ` [patch] Fix use after free in jrelse_tail Andrew James Wade
  2006-08-22  5:23 ` Reiser4 stress test Hans Reiser
  4 siblings, 2 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-21 23:35 UTC (permalink / raw)
  To: reiserfs-list


This one has only occurred once. I looked fairly carefully at the code for
partially converted files under the assumption that the rest was
unlikely to be buggy, but nothing stood out at me.

reiser4 panicked cowardly: reiser4[fixdep(19237)]: reiser4_done_context (fs/reiser4/context.c:181)[nikita-1936]:
assertion failed: reiser4_no_counters_are_held()
 [<c0103754>] dump_trace+0x64/0x181
 [<c0103883>] show_trace_log_lvl+0x12/0x25
 [<c0103b79>] show_trace+0xd/0x10
 [<c0103b93>] dump_stack+0x17/0x19
 [<c01a0663>] reiser4_do_panic+0x4e/0x7b
 [<c01bdbc0>] reiser4_exit_context+0xa1/0x575
 [<c0202bc9>] release_unix_file+0x1b7/0x1c2
 [<c014f90b>] __fput+0xbe/0x16c
 [<c014f9e7>] fput+0x2e/0x33
 [<c014d3ec>] filp_close+0x51/0x5b
 [<c014ddd2>] sys_close+0x70/0x93
 [<c01028a5>] sysenter_past_esp+0x56/0x8d
DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x8d
Leftover inexact backtrace:
 [<c0103883>] show_trace_log_lvl+0x12/0x25
 [<c0103b79>] show_trace+0xd/0x10
 [<c0103b93>] dump_stack+0x17/0x19
 [<c01a0663>] reiser4_do_panic+0x4e/0x7b
 [<c01bdbc0>] reiser4_exit_context+0xa1/0x575
 [<c0202bc9>] release_unix_file+0x1b7/0x1c2
 [<c014f90b>] __fput+0xbe/0x16c
 [<c014f9e7>] fput+0x2e/0x33
 [<c014d3ec>] filp_close+0x51/0x5b
 [<c014ddd2>] sys_close+0x70/0x93
 [<c01028a5>] sysenter_past_esp+0x56/0x8d
 =======================
: jnode: 0, tree: 0 (r:0,w:0), dk: 0 (r:0,w:0)
jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 0,
spin: 0, long: 0 inode_sem: (r:0,w:0)
d: 1, x: -2, t: -2
Kernel panic - not syncing: reiser4[fixdep(19237)]: reiser4_done_context (fs/reiser4/context.c:181)[nikita-1936]:
assertion failed: reiser4_no_counters_are_held()

I should be looking for an un-zrelse'd znode for this bug, correct?

Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Reiser4 stress test.
  2006-08-21 21:58 Reiser4 stress test Andrew James Wade
                   ` (3 preceding siblings ...)
  2006-08-21 23:35 ` [nikita-1936] assertion failed: reiser4_no_counters_are_held() Andrew James Wade
@ 2006-08-22  5:23 ` Hans Reiser
  2006-08-22 21:57   ` Andrew James Wade
  2006-08-22 22:07   ` Andrew James Wade
  4 siblings, 2 replies; 19+ messages in thread
From: Hans Reiser @ 2006-08-22  5:23 UTC (permalink / raw)
  To: ajwade; +Cc: reiserfs-list

Thanks Andrew, please be patient and persistent with us at this time, as
one programmer is on vacation, and the other is only able to work a few
hours a day due to an illness.

Hans

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Reiser4 stress test.
  2006-08-22  5:23 ` Reiser4 stress test Hans Reiser
@ 2006-08-22 21:57   ` Andrew James Wade
  2006-08-22 22:07   ` Andrew James Wade
  1 sibling, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-22 21:57 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Hans Reiser

On Tuesday 22 August 2006 01:23, Hans Reiser wrote:
> Thanks Andrew, please be patient and persistent with us at this time, as
> one programmer is on vacation, and the other is only able to work a few
> hours a day due to an illness.

No problem. I'll post what I find to the list; the posts will still be
there when you have time to devote to chasing bugs. They're not urgent
problems for me; I just happen to have the time and interest to devote
myself to solving them right now, and it appears I'll be able to muddle
through the code okay.

Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Reiser4 stress test.
  2006-08-22  5:23 ` Reiser4 stress test Hans Reiser
  2006-08-22 21:57   ` Andrew James Wade
@ 2006-08-22 22:07   ` Andrew James Wade
  1 sibling, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-22 22:07 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Hans Reiser

On Tuesday 22 August 2006 01:23, Hans Reiser wrote:
> Thanks Andrew, please be patient and persistent with us at this time, as
> one programmer is on vacation, and the other is only able to work a few
> hours a day due to an illness.

No problem. I'll post what I find to the list; the posts will still be
there when you have the time to devote to solving bugs. The delay will
do me no harm whatsoever and I may even get to the bottom of one or
two bugs in the meantime. (I happen to have time to spare at the
moment).

Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [nikita-1936] assertion failed: reiser4_no_counters_are_held()
  2006-08-21 23:35 ` [nikita-1936] assertion failed: reiser4_no_counters_are_held() Andrew James Wade
@ 2006-08-25 13:18   ` Alexander Zarochentsev
  2006-09-02  0:35   ` [patch] Fix use after free in jrelse_tail Andrew James Wade
  1 sibling, 0 replies; 19+ messages in thread
From: Alexander Zarochentsev @ 2006-08-25 13:18 UTC (permalink / raw)
  To: Andrew James Wade; +Cc: reiserfs-list

On 22 August 2006 03:35, Andrew James Wade wrote:
> This one has only occurred once. I looked fairly carefully at the
> code for partially converted files under the assumption that the rest
> was unlikely to be buggy, but nothing stood out at me.
>
> reiser4 panicked cowardly: reiser4[fixdep(19237)]:
> reiser4_done_context (fs/reiser4/context.c:181)[nikita-1936]:
> assertion failed: reiser4_no_counters_are_held()
>  [<c0103754>] dump_trace+0x64/0x181
>  [<c0103883>] show_trace_log_lvl+0x12/0x25
>  [<c0103b79>] show_trace+0xd/0x10
>  [<c0103b93>] dump_stack+0x17/0x19
>  [<c01a0663>] reiser4_do_panic+0x4e/0x7b
>  [<c01bdbc0>] reiser4_exit_context+0xa1/0x575
>  [<c0202bc9>] release_unix_file+0x1b7/0x1c2
>  [<c014f90b>] __fput+0xbe/0x16c
>  [<c014f9e7>] fput+0x2e/0x33
>  [<c014d3ec>] filp_close+0x51/0x5b
>  [<c014ddd2>] sys_close+0x70/0x93
>  [<c01028a5>] sysenter_past_esp+0x56/0x8d
> DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x8d
> Leftover inexact backtrace:
>  [<c0103883>] show_trace_log_lvl+0x12/0x25
>  [<c0103b79>] show_trace+0xd/0x10
>  [<c0103b93>] dump_stack+0x17/0x19
>  [<c01a0663>] reiser4_do_panic+0x4e/0x7b
>  [<c01bdbc0>] reiser4_exit_context+0xa1/0x575
>  [<c0202bc9>] release_unix_file+0x1b7/0x1c2
>  [<c014f90b>] __fput+0xbe/0x16c
>  [<c014f9e7>] fput+0x2e/0x33
>  [<c014d3ec>] filp_close+0x51/0x5b
>  [<c014ddd2>] sys_close+0x70/0x93
>  [<c01028a5>] sysenter_past_esp+0x56/0x8d
>  =======================
>
> : jnode: 0, tree: 0 (r:0,w:0), dk: 0 (r:0,w:0)
>
> jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
> inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 0,
> spin: 0, long: 0 inode_sem: (r:0,w:0)
> d: 1, x: -2, t: -2
> Kernel panic - not syncing: reiser4[fixdep(19237)]:
> reiser4_done_context (fs/reiser4/context.c:181)[nikita-1936]:
> assertion failed: reiser4_no_counters_are_held()
>
> I should be looking for an un-zrelse'd znode for this bug, correct?

yes.

-- 
Alex.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-21 22:41 ` assertion failed: can_hit_entd(ctx, s) Andrew James Wade
@ 2006-08-25 18:42   ` Alexander Zarochentsev
  2006-08-26  0:57     ` Andrew James Wade
  2006-08-29 21:10     ` [patch] " Andrew James Wade
  0 siblings, 2 replies; 19+ messages in thread
From: Alexander Zarochentsev @ 2006-08-25 18:42 UTC (permalink / raw)
  To: ajwade, Andrew James Wade; +Cc: reiserfs-list

Hello

On 22 August 2006 02:41, Andrew James Wade wrote:

btw, is <ajwade@cpe001346162bf9-cm0011ae8cd564.cpe.net.cable.rogers.com> 
your mail address (it is from Reply-To:) ?

> This is the most common panic I've been getting. It looks like this:
> (2.6.18-rc4-mm1)
>
> reiser4 panicked cowardly: reiser4[scatteredwrites(4506)]:
> reiser4_writepage (fs/reiser4/page_cache.c:522)[]: assertion failed:
> can_hit_entd(ctx, s)
> Kernel panic - not syncing: reiser4[scatteredwrites(4506)]:
> reiser4_writepage (fs/reiser4/page_cache.c:522)[]: assertion failed:
> can_hit_entd(ctx, s)
>
> With the extra patches it looks like this:
> (2.6.18-rc4-mm2)
>
> reiser4 panicked cowardly: reiser4[grep(4918)]: can_hit_entd
> (fs/reiser4/page_cache.c:494)[ajw-3]: assertion failed:
> ctx->trans->atom == NULL

can you please try the following patch:

---
 fs/reiser4/super_ops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-git/fs/reiser4/super_ops.c
===================================================================
--- linux-2.6-git.orig/fs/reiser4/super_ops.c
+++ linux-2.6-git/fs/reiser4/super_ops.c
@@ -92,7 +92,7 @@ static struct inode *reiser4_alloc_inode
 	reiser4_inode_object *obj;
 
 	assert("nikita-1696", super != NULL);
-	obj = kmem_cache_alloc(inode_cache, SLAB_KERNEL);
+	obj = kmem_cache_alloc(inode_cache, reiser4_ctx_gfp_mask_get());
 	if (obj != NULL) {
 		reiser4_inode *info;
 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-25 18:42   ` Alexander Zarochentsev
@ 2006-08-26  0:57     ` Andrew James Wade
  2006-08-29 21:10     ` [patch] " Andrew James Wade
  1 sibling, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-26  0:57 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alexander Zarochentsev, Andrew James Wade

> btw, is <ajwade@cpe001346162bf9-cm0011ae8cd564.cpe.net.cable.rogers.com> 
> your mail address (it is from Reply-To:) ?
Reply-to fixed; thanks. The above address is an "ephemeral" address
I've subscribed to the mailing list and could go away at any time.

> can you please try the following patch:

Will do.

Andrew Wade


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch] Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-25 18:42   ` Alexander Zarochentsev
  2006-08-26  0:57     ` Andrew James Wade
@ 2006-08-29 21:10     ` Andrew James Wade
  2006-08-30  6:45       ` Alexander Zarochentsev
  1 sibling, 1 reply; 19+ messages in thread
From: Andrew James Wade @ 2006-08-29 21:10 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alexander Zarochentsev, Andrew James Wade

Hello Alexander,

In addition to your patch, I've also applied the patch below. With
these two patches the fs is much more stable for me.

However, something is holding a d_ref across the calls to
reiser4_writepage. It's not clear to me that this is allowed so my
patch may not be a full fix.

Andrew Wade

signed-off-by: <andrew.j.wade@gmail.com>

diff -rupN a/fs/reiser4/plugin/item/extent_file_ops.c b/fs/reiser4/plugin/item/extent_file_ops.c
--- a/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-28 11:30:33.000000000 -0400
+++ b/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-29 13:06:20.000000000 -0400
@@ -1320,20 +1320,22 @@ static int extent_readpage_filler(void *
 				      TWIG_LEVEL, CBK_UNIQUE, NULL);
 		if (result != CBK_COORD_FOUND) {
 			reiser4_unset_hint(hint);
-			return result;
+			goto out;
 		}
 		ext_coord->valid = 0;
 	}
 
 	if (zload(ext_coord->coord.node)) {
 		reiser4_unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
 	}
 	if (!item_is_extent(&ext_coord->coord)) {
 		/* tail conversion is running in parallel */
 		zrelse(ext_coord->coord.node);
 		reiser4_unset_hint(hint);
-		return RETERR(-EIO);
+		result = RETERR(-EIO);
+		goto out;
 	}
 
 	if (ext_coord->valid == 0)
@@ -1358,6 +1360,10 @@ static int extent_readpage_filler(void *
 	} else
 		reiser4_unset_hint(hint);
 	zrelse(ext_coord->coord.node);
+
+out:
+	/* Calls to this function may be intermingled with VM writeback. */
+	reiser4_txn_restart_current();
 	return result;
 }
 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
  2006-08-21 22:44 ` assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY) Andrew James Wade
@ 2006-08-29 21:38   ` Andrew James Wade
  2006-08-30 10:26     ` Alexander Zarochentsev
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew James Wade @ 2006-08-29 21:38 UTC (permalink / raw)
  To: reiserfs-list

I now have a stack trace for this assertion:


reiser4 panicked cowardly: reiser4[tar(5412)]: reiser4_set_page_dirty_internal (fs/reiser4/page_cache.c:475)[]:
assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
 [<c0103870>] dump_trace+0x64/0x1ad
 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0caf>] reiser4_do_panic+0x4e/0x84
 [<c01e66e9>] reiser4_set_page_dirty_internal+0xe5/0xee
 [<c01cb2a4>] znode_make_dirty+0x271/0x452
 [<c022108f>] cut_node40+0x191/0x1a6
 [<c0221410>] shift_node40+0x36c/0x91d
 [<c01b11ba>] carry_shift_data+0xaa/0x139
 [<c01b2e1b>] carry_insert_flow+0x1de/0x837
 [<c01b008f>] reiser4_carry+0x185/0x49a
 [<c01b8d77>] reiser4_insert_flow+0x16b/0x17e
 [<c022deec>] reiser4_write_tail+0x5cd/0x685
 [<c020445f>] batch_write_unix_file+0x26e/0x467
 [<c0133347>] generic_file_buffered_write+0xd2/0x1fb
 [<c0135035>] __generic_file_aio_write_nolock+0x3a8/0x3e5
 [<c01350ca>] generic_file_aio_write+0x58/0xab
 [<c014eda6>] do_sync_write+0xb4/0xf2
 [<c014f38e>] vfs_write+0x8a/0x136
 [<c014faca>] sys_write+0x3b/0x60
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
DWARF2 unwinder stuck at sysenter_past_esp+0x56/0x8d

Leftover inexact backtrace:

 [<c01039cb>] show_trace_log_lvl+0x12/0x25
 [<c0103cc1>] show_trace+0xd/0x10
 [<c0103cdb>] dump_stack+0x17/0x19
 [<c01a0caf>] reiser4_do_panic+0x4e/0x84
 [<c01e66e9>] reiser4_set_page_dirty_internal+0xe5/0xee
 [<c01cb2a4>] znode_make_dirty+0x271/0x452
 [<c022108f>] cut_node40+0x191/0x1a6
 [<c0221410>] shift_node40+0x36c/0x91d
 [<c01b11ba>] carry_shift_data+0xaa/0x139
 [<c01b2e1b>] carry_insert_flow+0x1de/0x837
 [<c01b008f>] reiser4_carry+0x185/0x49a
 [<c01b8d77>] reiser4_insert_flow+0x16b/0x17e
 [<c022deec>] reiser4_write_tail+0x5cd/0x685
 [<c020445f>] batch_write_unix_file+0x26e/0x467
 [<c0133347>] generic_file_buffered_write+0xd2/0x1fb
 [<c0135035>] __generic_file_aio_write_nolock+0x3a8/0x3e5
 [<c01350ca>] generic_file_aio_write+0x58/0xab
 [<c014eda6>] do_sync_write+0xb4/0xf2
 [<c014f38e>] vfs_write+0x8a/0x136
 [<c014faca>] sys_write+0x3b/0x60
 [<c01028cd>] sysenter_past_esp+0x56/0x8d
 =======================
: jnode: 0, tree: 0 (r:0,w:0), dk: 0 (r:0,w:0)
jload: 0, txnh: 0, atom: 0, stack: 0, txnmgr: 0, ktxnmgrd: 0, fq: 0
inode: 0, cbk_cache: 0 (r:0,w0), eflush: 0, zlock: 0,
spin: 0, long: 3 inode_sem: (r:0,w:1)
d: 3, x: 6, t: 0
Kernel panic - not syncing: reiser4[tar(5412)]: reiser4_set_page_dirty_internal (fs/reiser4/page_cache.c:475)[]:
assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)

Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch] Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-29 21:10     ` [patch] " Andrew James Wade
@ 2006-08-30  6:45       ` Alexander Zarochentsev
  2006-08-30 15:43         ` Hans Reiser
  0 siblings, 1 reply; 19+ messages in thread
From: Alexander Zarochentsev @ 2006-08-30  6:45 UTC (permalink / raw)
  To: andrew.j.wade; +Cc: reiserfs-list

Hello,

On 30 August 2006 01:10, Andrew James Wade wrote:
> Hello Alexander,
>
> In addition to your patch, I've also applied the patch below. With
> these two patches the fs is much more stable for me.

That code was removed from reiser4 recently, the patch will be in the 
next -mm kernel.

I knew there was a bug somewhere :) 

>
> However, something is holding a d_ref across the calls to
> reiser4_writepage. It's not clear to me that this is allowed so my
> patch may not be a full fix.
>
> Andrew Wade
>
> signed-off-by: <andrew.j.wade@gmail.com>
>
> diff -rupN a/fs/reiser4/plugin/item/extent_file_ops.c
> b/fs/reiser4/plugin/item/extent_file_ops.c ---
> a/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-28
> 11:30:33.000000000 -0400 +++
> b/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-29
> 13:06:20.000000000 -0400 @@ -1320,20 +1320,22 @@ static int
> extent_readpage_filler(void * TWIG_LEVEL, CBK_UNIQUE, NULL);
>  		if (result != CBK_COORD_FOUND) {
>  			reiser4_unset_hint(hint);
> -			return result;
> +			goto out;
>  		}
>  		ext_coord->valid = 0;
>  	}
>
>  	if (zload(ext_coord->coord.node)) {
>  		reiser4_unset_hint(hint);
> -		return RETERR(-EIO);
> +		result = RETERR(-EIO);
> +		goto out;
>  	}
>  	if (!item_is_extent(&ext_coord->coord)) {
>  		/* tail conversion is running in parallel */
>  		zrelse(ext_coord->coord.node);
>  		reiser4_unset_hint(hint);
> -		return RETERR(-EIO);
> +		result = RETERR(-EIO);
> +		goto out;
>  	}
>
>  	if (ext_coord->valid == 0)
> @@ -1358,6 +1360,10 @@ static int extent_readpage_filler(void *
>  	} else
>  		reiser4_unset_hint(hint);
>  	zrelse(ext_coord->coord.node);
> +
> +out:
> +	/* Calls to this function may be intermingled with VM writeback. */
> +	reiser4_txn_restart_current();
>  	return result;
>  }
>
>
> !DSPAM:44f4ad37293861987214747!

Thanks,
Alex.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
  2006-08-29 21:38   ` Andrew James Wade
@ 2006-08-30 10:26     ` Alexander Zarochentsev
  2006-08-30 21:29       ` Andrew James Wade
  0 siblings, 1 reply; 19+ messages in thread
From: Alexander Zarochentsev @ 2006-08-30 10:26 UTC (permalink / raw)
  To: reiserfs-list, andrew.j.wade

On 30 August 2006 01:38, Andrew James Wade wrote:
> I now have a stack trace for this assertion:

there  is a race between znode_make_dirty and flushing dirty node to 
disk.  I guess (but not sure by 100%) it has no bad effect so the 
assertion is wrong.

> reiser4 panicked cowardly: reiser4[tar(5412)]:

[ ... ]

-- 
Alex.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch] Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-30  6:45       ` Alexander Zarochentsev
@ 2006-08-30 15:43         ` Hans Reiser
  2006-08-30 16:26           ` Alexander Zarochentsev
  0 siblings, 1 reply; 19+ messages in thread
From: Hans Reiser @ 2006-08-30 15:43 UTC (permalink / raw)
  To: Alexander Zarochentsev; +Cc: andrew.j.wade, reiserfs-list

Is it already sent in?  If not, can it go out today?

Hans

Alexander Zarochentsev wrote:
> Hello,
>
> On 30 August 2006 01:10, Andrew James Wade wrote:
>   
>> Hello Alexander,
>>
>> In addition to your patch, I've also applied the patch below. With
>> these two patches the fs is much more stable for me.
>>     
>
> That code was removed from reiser4 recently, the patch will be in the 
> next -mm kernel.
>
> I knew there was a bug somewhere :) 
>
>   
>> However, something is holding a d_ref across the calls to
>> reiser4_writepage. It's not clear to me that this is allowed so my
>> patch may not be a full fix.
>>
>> Andrew Wade
>>
>> signed-off-by: <andrew.j.wade@gmail.com>
>>
>> diff -rupN a/fs/reiser4/plugin/item/extent_file_ops.c
>> b/fs/reiser4/plugin/item/extent_file_ops.c ---
>> a/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-28
>> 11:30:33.000000000 -0400 +++
>> b/fs/reiser4/plugin/item/extent_file_ops.c	2006-08-29
>> 13:06:20.000000000 -0400 @@ -1320,20 +1320,22 @@ static int
>> extent_readpage_filler(void * TWIG_LEVEL, CBK_UNIQUE, NULL);
>>  		if (result != CBK_COORD_FOUND) {
>>  			reiser4_unset_hint(hint);
>> -			return result;
>> +			goto out;
>>  		}
>>  		ext_coord->valid = 0;
>>  	}
>>
>>  	if (zload(ext_coord->coord.node)) {
>>  		reiser4_unset_hint(hint);
>> -		return RETERR(-EIO);
>> +		result = RETERR(-EIO);
>> +		goto out;
>>  	}
>>  	if (!item_is_extent(&ext_coord->coord)) {
>>  		/* tail conversion is running in parallel */
>>  		zrelse(ext_coord->coord.node);
>>  		reiser4_unset_hint(hint);
>> -		return RETERR(-EIO);
>> +		result = RETERR(-EIO);
>> +		goto out;
>>  	}
>>
>>  	if (ext_coord->valid == 0)
>> @@ -1358,6 +1360,10 @@ static int extent_readpage_filler(void *
>>  	} else
>>  		reiser4_unset_hint(hint);
>>  	zrelse(ext_coord->coord.node);
>> +
>> +out:
>> +	/* Calls to this function may be intermingled with VM writeback. */
>> +	reiser4_txn_restart_current();
>>  	return result;
>>  }
>>
>>
>> !DSPAM:44f4ad37293861987214747!
>>     
>
> Thanks,
> Alex.
>
>
>
>   


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch] Re: assertion failed: can_hit_entd(ctx, s)
  2006-08-30 15:43         ` Hans Reiser
@ 2006-08-30 16:26           ` Alexander Zarochentsev
  0 siblings, 0 replies; 19+ messages in thread
From: Alexander Zarochentsev @ 2006-08-30 16:26 UTC (permalink / raw)
  To: Hans Reiser; +Cc: andrew.j.wade, reiserfs-list

On 30 August 2006 19:43, Hans Reiser wrote:
> Is it already sent in?  If not, can it go out today?

already sent.

>
> Hans
>
> Alexander Zarochentsev wrote:
> > Hello,
> >
> > On 30 August 2006 01:10, Andrew James Wade wrote:
> >> Hello Alexander,
> >>
> >> In addition to your patch, I've also applied the patch below. With
> >> these two patches the fs is much more stable for me.
> >
> > That code was removed from reiser4 recently, the patch will be in
> > the next -mm kernel.
> >
> > I knew there was a bug somewhere :)
> >

[...]

-- 
Alex.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY)
  2006-08-30 10:26     ` Alexander Zarochentsev
@ 2006-08-30 21:29       ` Andrew James Wade
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-08-30 21:29 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alexander Zarochentsev, andrew.j.wade

On Wednesday 30 August 2006 06:26, Alexander Zarochentsev wrote:
> On 30 August 2006 01:38, Andrew James Wade wrote:
> > I now have a stack trace for this assertion:
> 
> there  is a race between znode_make_dirty and flushing dirty node to 
> disk.  I guess (but not sure by 100%) it has no bad effect so the 
> assertion is wrong.
> 
Okay, I'll change that to a WARN_ON in my tree and see what falls out.

Thanks,
Andrew Wade

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch] Fix use after free in jrelse_tail
  2006-08-21 23:35 ` [nikita-1936] assertion failed: reiser4_no_counters_are_held() Andrew James Wade
  2006-08-25 13:18   ` Alexander Zarochentsev
@ 2006-09-02  0:35   ` Andrew James Wade
  1 sibling, 0 replies; 19+ messages in thread
From: Andrew James Wade @ 2006-09-02  0:35 UTC (permalink / raw)
  To: Alexander Zarochentsev; +Cc: reiserfs-list

Hello Alexander,

"[nikita-1936] assertion failed: reiser4_no_counters_are_held()"
turned out to be a bug in the debugging code. I've applied the patch
below and haven't had a recurrence.

Cheers,
Andrew Wade

signed-off-by <andrew.j.wade@gmail.com>

diff -rupN a/fs/reiser4/jnode.c b/fs/reiser4/jnode.c
--- a/fs/reiser4/jnode.c	2006-09-01 16:44:51.000000000 -0400
+++ b/fs/reiser4/jnode.c	2006-09-01 16:58:06.000000000 -0400
@@ -999,10 +999,10 @@ void jrelse_tail(jnode * node /* jnode t
 {
 	assert("nikita-489", atomic_read(&node->d_count) > 0);
 	atomic_dec(&node->d_count);
-	/* release reference acquired in jload_gfp() or jinit_new() */
-	jput(node);
 	if (jnode_is_unformatted(node) || jnode_is_znode(node))
 		LOCK_CNT_DEC(d_refs);
+	/* release reference acquired in jload_gfp() or jinit_new() */
+	jput(node);
 }
 
 /* drop reference to node data. When last reference is dropped, data are

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-09-02  0:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-21 21:58 Reiser4 stress test Andrew James Wade
2006-08-21 22:41 ` assertion failed: can_hit_entd(ctx, s) Andrew James Wade
2006-08-25 18:42   ` Alexander Zarochentsev
2006-08-26  0:57     ` Andrew James Wade
2006-08-29 21:10     ` [patch] " Andrew James Wade
2006-08-30  6:45       ` Alexander Zarochentsev
2006-08-30 15:43         ` Hans Reiser
2006-08-30 16:26           ` Alexander Zarochentsev
2006-08-21 22:44 ` assertion failed: JF_ISSET(jprivate(page), JNODE_DIRTY) Andrew James Wade
2006-08-29 21:38   ` Andrew James Wade
2006-08-30 10:26     ` Alexander Zarochentsev
2006-08-30 21:29       ` Andrew James Wade
2006-08-21 23:22 ` assertion failed: keyeq(znode_get_rd_key(node), znode_get_ld_key(node->right)) Andrew James Wade
2006-08-21 23:35 ` [nikita-1936] assertion failed: reiser4_no_counters_are_held() Andrew James Wade
2006-08-25 13:18   ` Alexander Zarochentsev
2006-09-02  0:35   ` [patch] Fix use after free in jrelse_tail Andrew James Wade
2006-08-22  5:23 ` Reiser4 stress test Hans Reiser
2006-08-22 21:57   ` Andrew James Wade
2006-08-22 22:07   ` Andrew James Wade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.