Skip to contentSkip to conversation

task blocked in sync_buffer from ext3_free_branches

DISCUSSION Roland Dreier 1 participant 2 messages Jan 30, 2008 Block layer

lore
Share & tools
lore
#0 lore raw

I'm getting the following while building a kernel (with make -j24 on an 8 CPU system: 4 socket dual-core opteron) with current Linus git (5b10ca19 is my head). Once this happens the build is hung, although I can ssh in and get a new shell OK.

Any ideas or suggestions on what would be useful debugging information?

[  201.820629] INFO: task mv:7225 blocked for more than 120 seco.
[  201.824624] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  201.828622] mv            D 0000000000000000     0  7225   7055
[  201.840623]  ffff8101c11bdb48 0000000000000086 0000000000000000 ffff810074432360
[  201.857186]  ffff810242822c00 ffff8101c11bdaf8 ffff810074432360 ffffffff80597200
[  201.876624]  ffffffff80597200 ffffffff80593c80 ffffffff80597200 ffff8101c1059120
[  201.892626] Call Trace:
[  201.896647]  [<ffffffff8029acc3>] sync_buffer+0x0/0x40
[  201.900628]  [<ffffffff804239c9>] io_schedule+0x28/0x33
[  201.904628]  [<ffffffff8029acfe>] sync_buffer+0x3b/0x40
[  201.908628]  [<ffffffff80423c1d>] __wait_on_bit+0x40/0x6e
[  201.912629]  [<ffffffff8029acc3>] sync_buffer+0x0/0x40
[  201.916628]  [<ffffffff80423cb7>] out_of_line_wait_on_bit+0x6c/0x78
[  201.920631]  [<ffffffff8023f9b1>] wake_bit_function+0x0/0x23
[  201.924630]  [<ffffffff8029bfa1>] __bread+0x61/0x76
[  201.928632]  [<ffffffff802c10af>] ext3_free_branches+0x90/0x1b8
[  201.932631]  [<ffffffff802c18f4>] ext3_truncate+0x71d/0x871
[  201.936632]  [<ffffffff802ece75>] start_this_handle+0x294/0x304
[  201.940631]  [<ffffffff802ec7dc>] journal_stop+0x192/0x19e
[  201.944632]  [<ffffffff802ecf80>] journal_start+0x9b/0xd2
[  201.948632]  [<ffffffff802c202f>] ext3_delete_inode+0x7a/0xcf
[  201.952631]  [<ffffffff802c1fb5>] ext3_delete_inode+0x0/0xcf
[  201.956632]  [<ffffffff8028df30>] generic_delete_inode+0xa7/0x11d
[  201.960631]  [<ffffffff8028b36d>] d_kill+0x34/0x55
[  201.964632]  [<ffffffff8028b71a>] dput+0x101/0x10b
[  201.968633]  [<ffffffff8028598b>] sys_renameat+0x18d/0x1fc
[  201.972634]  [<ffffffff80426986>] do_page_fault+0x3d8/0x724
[  201.976635]  [<ffffffff8027f461>] sys_newlstat+0x28/0x31
[  201.980636]  [<ffffffff8020bede>] system_call+0x7e/0x83
#1 lore raw

Actually this appears to be the bug that Jens fixed with this patch, and with that patch my system seems fine as well:

block/as-iosched.c +7 -3
index b201d16..9603684 100644
@@ -1275,9 +1275,13 @@ static void as_merged_requests(struct request_queue *q, struct request *req,
 			 * Don't copy here but swap, because when anext is
 			 * removed below, it must contain the unused context
 			 */
-			double_spin_lock(&rioc->lock, &nioc->lock, rioc < nioc);
-			swap_io_context(&rioc, &nioc);
-			double_spin_unlock(&rioc->lock, &nioc->lock, rioc < nioc);
+			if (rioc != nioc) {
+				double_spin_lock(&rioc->lock, &nioc->lock,
+								rioc < nioc);
+				swap_io_context(&rioc, &nioc);
+				double_spin_unlock(&rioc->lock, &nioc->lock,
+								rioc < nioc);
+			}
 		}
 	}