Skip to contentSkip to conversation

ext3 umount hangs

DISCUSSION Steven Pratt 2 participants 7 messages Jun 19, 2003 – Jun 20, 2003

lore
Share & tools
lore
#0 lore raw

Has anyone else seen hangs trying to umount ext3 volumes? I am seeing this repeatedly after running tiobench on an ext3 volume. This was only showing up in the mm tree, but as of 2.5.72-bk2 I am now seeing it in the mainline.

Steve

#1 lore raw
Quoted 2 lines · Steven Pratt

Has anyone else seen hangs trying to umount ext3 volumes?

Nope.

Quoted 4 lines

I am seeing
this repeatedly after running tiobench on an ext3 volume. This was only showing up in the mm tree, but as of 2.5.72-bk2 I am now seeing it in the mainline.

It would have been nice to have heard about it before this...

Could you please debug it a bit? sysrq-T, etc?

Does the system hang, or does the umount hang?

#2 lore raw
Quoted 7 lines · Andrew Morton
Quoted 3 lines · Steven Pratt

Has anyone else seen hangs trying to umount ext3 volumes?

Quoted 9 lines

Nope.

Quoted 3 lines

I am seeing this repeatedly after running tiobench on an ext3 volume. This was only showing up in the mm tree, but as of 2.5.72-bk2 I am now seeing it in the mainline.

It would have been nice to have heard about it before this...

Sorry, lots of thing on my plate.

Quoted 2 lines

Could you please debug it a bit? sysrq-T, etc?

Yes, I will try to get this as soon as possible.

Quoted 2 lines

Does the system hang, or does the umount hang?

Just the umount hangs, but it is severe enough to not be able to shutdown the system. Have to power off.

Steve

Quoted 2 lines
#3 lore raw
In reply to Andrew Morton
Quoted 8 lines · Andrew Morton
Quoted 3 lines · Steven Pratt

Has anyone else seen hangs trying to umount ext3 volumes?

Could you please debug it a bit? sysrq-T, etc?

Here is the trace of the hung process:

umount D 00000001 290213268 18747 18746 (NOTLB)

Call Trace:
[<c01a1ae8>] journal_kill_thread+0xa8/0xe0
[<c011c780>] default_wake_function+0x0/0x30
[<c016d8c5>] destroy_inode+0x35/0x60
[<c01a2b80>] journal_destroy+0x10/0x1c0
[<c019a97e>] ext3_xattr_put_super+0x1e/0x30
[<c0196209>] ext3_put_super+0x29/0x1a0
[<c015b64b>] generic_shutdown_super+0x16b/0x180
[<c015c03d>] kill_block_super+0x1d/0x50
[<c015b3fd>] deactivate_super+0x5d/0x90
[<c0170fef>] sys_umount+0x3f/0xa0
[<c0171067>] sys_oldumount+0x17/0x20
[<c010afaf>] syscall_call+0x7/0xb

Here is a link to the console log with full sysrq trace:

http://www-124.ibm.com/developerworks/opensource/linuxperf/logs/ext3umount

Steve

#4 lore raw
Quoted 6 lines · Steven Pratt

Here is the trace of the hung process:

umount D 00000001 290213268 18747 18746 (NOTLB)

 Call Trace:
  [<c01a1ae8>] journal_kill_thread+0xa8/0xe0

whoops. I bet you're seeing this when using some script which does the unmount.

Might this help?

fs/jbd/journal.c renamed from fs/jbd/journal.c~kjournald-shutdown-fix +6 -2
diff -puN fs/jbd/journal.c~kjournald-shutdown-fix fs/jbd/journal.c
@@ -161,7 +161,7 @@ loop:
 		del_timer_sync(journal->j_commit_timer);
 		journal_commit_transaction(journal);
 		spin_lock(&journal->j_state_lock);
-		goto loop;
+		goto end_loop;
 	}
 
 	wake_up(&journal->j_wait_done_commit);
@@ -210,7 +210,7 @@ loop:
 		journal->j_commit_request = transaction->t_tid;
 		jbd_debug(1, "woke because of timeout\n");
 	}
-
+end_loop:
 	if (!(journal->j_flags & JFS_UNMOUNT))
 		goto loop;
 
@@ -230,12 +230,16 @@ static void journal_start_thread(journal
 
 static void journal_kill_thread(journal_t *journal)
 {
+	spin_lock(&journal->j_state_lock);
 	journal->j_flags |= JFS_UNMOUNT;
 
 	while (journal->j_task) {
 		wake_up(&journal->j_wait_commit);
+		spin_unlock(&journal->j_state_lock);
 		wait_event(journal->j_wait_done_commit, journal->j_task == 0);
+		spin_lock(&journal->j_state_lock);
 	}
+	spin_unlock(&journal->j_state_lock);
 }
 
 /*

_

#5 lore raw
Quoted 5 lines · Andrew Morton
Quoted 2 lines · Steven Pratt

Here is the trace of the hung process:

Quoted 10 lines
Quoted 5 lines

umount D 00000001 290213268 18747 18746 (NOTLB)

Call Trace:
 [<c01a1ae8>] journal_kill_thread+0xa8/0xe0

whoops. I bet you're seeing this when using some script which does the unmount.

Yes, I was. :-)

Quoted 3 lines

Might this help?

Will try this tonight. Should have an answer tomorrow.

Thanks for the quick response.
Steve

#6 lore raw
In reply to Andrew Morton
Quoted 11 lines · Andrew Morton
Quoted 7 lines · Steven Pratt

Here is the trace of the hung process:

umount D 00000001 290213268 18747 18746 (NOTLB)

Call Trace:
 [<c01a1ae8>] journal_kill_thread+0xa8/0xe0
Quoted 6 lines

whoops. I bet you're seeing this when using some script which does the unmount.

Might this help?

Yes, this fixed the problem. Thanks.

Steve