Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 18 Oct 2002 11:11:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 18 Oct 2002 11:11:05 -0400 Received: from ns0.cobite.com ([208.222.80.10]:57357 "EHLO ns0.cobite.com") by vger.kernel.org with ESMTP id ; Fri, 18 Oct 2002 11:11:03 -0400 Date: Fri, 18 Oct 2002 11:17:03 -0400 (EDT) From: David Mansfield X-X-Sender: david@admin To: linux-kernel@vger.kernel.org, Neil Brown Subject: 2.5.43: raid5 hangs. processes in D state, raid5d at 100% cpu. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5297 Lines: 172 Hi Neil, list, I've been trying to get raid5 running for a while under the development kernels, and have been failing since the early 2.5.30's. My current failure scenario is back to what it was in 2.5.40 (the ll_rw_blk.c BUG has hidden itself away again). This particular failure was created on a raid5 made out of 3 loop devices on regular files on an ext3 filesystem on a single SCSI disk (script used to create this is below), but the exact same failure occurs on a raid5 of 4 disk partitions on 4 scsi disks. The current failure looks like: 1) all processes accessing the md stuck in D state 2) raid5d stuck in a cpu-gobbling loop, R state. Kernel is 2.5.43 plus a patch (below) I needed to fs/block_dev.c to get the raid device to open. System is SMP 2xPII 450, 1GB ram (highmem_4g), adaptec aic7xxx. Here are the pertinent pieces of sysrq-t (blktest is a throughput tester I wrote a while back): raid5d R DC90C938 0 3896 1 3893 (L-TLB) Call Trace: [] tasklet_hi_action+0x80/0xd0 [] release_task+0x78/0x1c0 [] handle_stripe+0x2cf/0xf10 [] do_softirq+0x5b/0xc0 [] release_stripe+0x8d/0x130 [] raid5d+0x139/0x600 [] md_thread+0x199/0x210 [] default_wake_function+0x0/0x40 [] md_thread+0x0/0x210 [] kernel_thread_helper+0x5/0xc blktest D EE1C9B68 0 4231 3744 4180 (L-TLB) Call Trace: [] get_active_stripe+0x144/0x360 [] default_wake_function+0x0/0x40 [] raid5_unplug_device+0x1a0/0x400 [] bio_alloc+0x13a/0x1d0 [] generic_make_request+0x189/0x1a0 [] submit_bio+0x9f/0xb0 [] __block_write_full_page+0x2c4/0x460 [] blkdev_writepage+0x0/0x20 [] blkdev_get_block+0x0/0x60 [] block_write_full_page+0xe8/0x100 [] blkdev_get_block+0x0/0x60 [] apic_timer_interrupt+0x1a/0x20 [] blkdev_writepage+0x0/0x20 [] blkdev_writepage+0xf/0x20 [] blkdev_get_block+0x0/0x60 [] mpage_writepages+0x2c9/0xb01 [] kill_fasync+0x31/0x4e [] n_tty_receive_buf+0xe76/0xed0 [] n_tty_receive_buf+0xe98/0xed0 [] blkdev_writepage+0x0/0x20 [] tcp_v4_do_rcv+0x93/0x180 [] __pagevec_free+0x1a/0x20 [] release_pages+0x168/0x180 [] handle_IRQ_event+0x3a/0x60 [] find_get_pages+0x36/0x80 [] pagevec_lookup+0x1d/0x24 [] truncate_inode_pages+0x2fa/0x350 [] generic_writepages+0x11/0x15 [] do_writepages+0x16/0x30 [] filemap_fdatawrite+0x4f/0x60 [] sync_blockdev+0x1b/0x40 [] blkdev_put+0x76/0x1a0 [] __fput+0x2b/0xf0 [] filp_close+0xb0/0xc0 [] put_files_struct+0x4b/0xd0 [] do_exit+0x14c/0x370 [] do_munmap+0x121/0x130 [] sys_munmap+0x44/0x70 [] syscall_call+0x7/0xb Here is the script I used to create the raid: #!/bin/sh DIR=/tmp SIZE=64k rm -f $DIR/md.pt1 $DIR/md.pt2 $DIR/md.pt3 dd if=/dev/zero of=$DIR/md.pt1 bs=1k count=$SIZE dd if=/dev/zero of=$DIR/md.pt2 bs=1k count=$SIZE dd if=/dev/zero of=$DIR/md.pt3 bs=1k count=$SIZE losetup /dev/loop0 $DIR/md.pt1 losetup /dev/loop1 $DIR/md.pt2 losetup /dev/loop2 $DIR/md.pt3 cat >$DIR/raidtab.tst <bd_dev, &part); - if (!disk) - goto out1; + if (!bdev->bd_contains) { bdev->bd_contains = bdev; - if (part) { + if (disk && part) { struct block_device *whole; whole = bdget(MKDEV(disk->major, disk->first_minor)); ret = -ENOMEM; @@ -631,7 +631,7 @@ } if (bdev->bd_contains == bdev) { if (!bdev->bd_openers) - bdev->bd_disk = disk; + bdev->bd_disk = disk; if (!bdev->bd_queue) { struct blk_dev_struct *p = blk_dev + major(dev); bdev->bd_queue = &p->request_queue; @@ -645,8 +645,12 @@ } if (!bdev->bd_openers) { struct backing_dev_info *bdi; + sector_t sect = 0; + bdev->bd_offset = 0; - bd_set_size(bdev, (loff_t)get_capacity(disk) << 9); + if (disk) + sect = get_capacity(disk); + bd_set_size(bdev, (loff_t)sect << 9); bdi = blk_get_backing_dev_info(bdev); if (bdi == NULL) bdi = &default_backing_dev_info; -- /==============================\ | David Mansfield | | lkml@dm.cobite.com | \==============================/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/