Date: Wed, 23 Feb 2000 22:35:29 +0000 From: Ian Dowse <iedowse@maths.tcd.ie> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: nops@maths.tcd.ie, freebsd-current@freebsd.org, diablo-list@list.bart.nl Subject: Re: ffs_blkfree: freeing free block (was Re: Panic (pmap)) Message-ID: <200002232235.aa22335@salmon.maths.tcd.ie> In-Reply-To: Your message of "Wed, 23 Feb 2000 12:53:11 PST." <200002232053.MAA31746@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200002232053.MAA31746@apollo.backplane.com>, Matthew Dillon writes: > There must still be a bug in there somewhere, unrelated to softupdates. > > Try turning off the vfs.ffs.doreallocblks via sysctl and see if that > stops the crashes, that will help narrow down where to search for the > problem. I think I've found it. Here's an easy way to repeat the problem to start with: mount_mfs -T fd1440 none /mnt cd /mnt dd if=/dev/zero bs=4k of=test seek=1036 count=1 dd if=/dev/zero bs=4k of=test1 count=1 dd if=/dev/zero bs=4k of=test2 rm test1 dd if=/dev/zero bs=4k of=test seek=8000 count=1 echo > test It looks as if the problem is in ffs_balloc(), and occurs as follows: - ffs_balloc() is asked to allocate a doubly indirect block. - The first-level indirection block already exists - The second-level indirection block does not exist, but is successfully allocated. - This block is linked into the first-level indirection block by the line: bap[indirs[i - 1].in_off] = nb; - Allocation of the data block fails. - All allocated blocks are then released, but there is still a link in the first-level indirection block to what is now a free block. The fix should be relatively straightforward - either the code should avoid linking new indirection blocks until all allocations succeed, or it should back out the changes on failure. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200002232235.aa22335>