From owner-freebsd-current@FreeBSD.ORG Sat Jan 31 17:19:24 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48BEE16A4CE for ; Sat, 31 Jan 2004 17:19:24 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01E8943D54 for ; Sat, 31 Jan 2004 17:19:14 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id i111J67E096098; Sat, 31 Jan 2004 17:19:10 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200402010119.i111J67E096098@gw.catspoiler.org> Date: Sat, 31 Jan 2004 17:19:06 -0800 (PST) From: Don Lewis To: hlen@ig.com.br In-Reply-To: <401C4D62.90407@ig.com.br> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-current@FreeBSD.org Subject: Re: Syncer "giving up" on buffers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 01:19:24 -0000 On 31 Jan, Herculano de Lima Einloft Neto wrote: > Bruce Evans wrote on Sep 1 2003: >>> I have a problem with kernels, built the last couple of days, where >>> during shutdown syncer is "giving up" on buffers. During the next boot >>> all filesystems are checked because of improper dismount. Here follow >>> the exact messages I get: >>> >>> Waiting (max 60 seconds) for system process `vnlru' to stop...stopped >>> Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped >>> Waiting (max 60 seconds) for system process `syncer' to stop...stopped >>> >>> syncing disks, buffers remaining... 8 8 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 >>> giving up on 6 buffers >>> Uptime: 41m20s >>> pfs_vncache_unload(): 1 entries remaining >>> Shutting down ACPI >>> Rebooting... > > >> Apparently the bug fixed in ext2fs/fs.h revs 1.3, 1.4 and 1.6 (etc.) >> was restored in rev.1.14. I think this is because B_LOCKED buffers >> were ignored in the sync() in boot() and flushed later when >> vfs_unmountall() calls ext2fs_unmount(), but they are now seen in the >> sync() so vfs_unmountall() is not called. > > A couple days ago I upgraded from 5.1RELEASE to 5.2CURRENT, only to > find myself dealing with this situation. I didn't like the looks of it, > so decided to go back to 5.2.1RC today.. and realize it is also there. > Is this bug being tolerated so far? I fixed one cause of this problem shortly before 5.2-RELEASE (running fsck on the root file system in single-user mode and rebooting before the file system is re-mounted read-write). I believe there are at least two other causes of this problem. One cause that a lot of people run across is rebooting while an ext2 file system is mounted. Bruce has done the analysis of this problem, but nobody has stepped up with a patch to fix it. The workaround is to unmount any ext2 file systems before rebooting. I've also seen this happen if I run the following sequence of commands: make installworld mergemaster shutdown -r now and don't wait long enough between mergemaster and shutdown. My suspicion is that the syncer is being shut before all the soft update dependencies have been resolved, and the unresolved dependencies are preventing some buffers from being written. I think mergmaster is triggering the problem because it deletes a large directory tree just before it exits. Waiting a little while to shutdown works around the problem by giving the syncer time to clean things up.