From owner-freebsd-current@FreeBSD.ORG Sun Jun 27 18:17:32 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 7993116A4D0 for ; Sun, 27 Jun 2004 18:17:32 +0000 (GMT) Received: from smtp002.bizmail.yahoo.com (smtp002.bizmail.yahoo.com [216.136.172.126]) by mx1.FreeBSD.org (Postfix) with SMTP id 5043F43D46 for ; Sun, 27 Jun 2004 18:17:32 +0000 (GMT) (envelope-from noackjr@alumni.rice.edu) Received: from unknown (HELO optimator.noacks.org) (noackjr@supercrime.org@70.240.249.252 with login) by smtp002.bizmail.yahoo.com with SMTP; 27 Jun 2004 18:17:32 -0000 Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 2496C61A2; Sun, 27 Jun 2004 13:17:31 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09350-02; Sun, 27 Jun 2004 13:17:29 -0500 (CDT) Received: from compgeek.noacks.org (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id B76F36140; Sun, 27 Jun 2004 13:17:29 -0500 (CDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by compgeek.noacks.org (8.12.11/8.12.11) with ESMTP id i5RIHMoX003432; Sun, 27 Jun 2004 13:17:27 -0500 (CDT) (envelope-from noackjr@alumni.rice.edu) Message-ID: <40DF0F32.3060001@alumni.rice.edu> Date: Sun, 27 Jun 2004 13:17:22 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 0.7 (X11/20040624) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Lewis References: <200406270439.i5R4cxQw064263@gw.catspoiler.org> In-Reply-To: <200406270439.i5R4cxQw064263@gw.catspoiler.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at noacks.org cc: freebsd-current@FreeBSD.org cc: avleeuwen@piwebs.com Subject: Re: Giving up on x buffers - losing files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2004 18:17:32 -0000 On 06/26/04 23:38, Don Lewis wrote: > On 26 Jun, Arjan van Leeuwen wrote: >> Sometimes, particularly after doing a lot of file writes (i.e. >> compiling a lot of ports, building world and mergemastering, etc), >> I get the 'Giving up on x buffers' message on shutdown, and my >> filesystems come up dirty when I restart. >> >> >> >> So, why does this happen? And how do I prevent it from happening? >> This definitely does _not_ sound like something I want my servers >> to do when 5.x goes -STABLE. > > I've mentioned this a couple of times on this list in the last six > months or so. The last time was in the last couple of weeks. I can > reliably trigger this problem with mergemaster. > > I'm pretty sure that the problem relates to soft updates and how the > file system syncer is shut down, which leaves unresolved dependencies > that keep a number of dirty blocks from being flushed to disk at the > end of the system shutdown. > > I have some ideas on how to fix the problem, but I haven't had the > time to work on it and nobody else has stepped up with a fix. > > I am able to reliably work around the problem by running the sync > command and waiting a short while after running mergemaster and > before shutting down or rebooting the machine. If you're running X be sure to end your session instead of restarting directly. I usually end the session, switch to a console, manually sync as Don described, wait 30 seconds, manually sync again (just to be sure), and then shutdown. Actually, I wrote a script to do it (sync; sleep 30; sync; shutdown -r now). I only had the problem a couple times, but never since starting to manually sync. On a more humorous note, trying to save time by restarting both your NFS server and client workstation at the same time is a really bad idea, especially when your home directory is NFS mounted... ;-) Jon