From owner-svn-src-head@FreeBSD.ORG Wed Aug 28 16:36:57 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F31F5832; Wed, 28 Aug 2013 16:36:56 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9E8826CA; Wed, 28 Aug 2013 16:36:56 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r7SGangX012991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Aug 2013 09:36:49 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r7SGanlh012990; Wed, 28 Aug 2013 09:36:49 -0700 (PDT) (envelope-from jmg) Date: Wed, 28 Aug 2013 09:36:49 -0700 From: John-Mark Gurney To: Gavin Atkinson Subject: Re: svn commit: r254992 - head/etc/rc.d Message-ID: <20130828163649.GU29777@funkthat.com> References: <201308281512.r7SFCGMx088267@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308281512.r7SFCGMx088267@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 28 Aug 2013 09:36:50 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 16:36:57 -0000 Gavin Atkinson wrote this message on Wed, Aug 28, 2013 at 15:12 +0000: > Author: gavin > Date: Wed Aug 28 15:12:15 2013 > New Revision: 254992 > URL: http://svnweb.freebsd.org/changeset/base/254992 > > Log: > After writing a kernel core dump into /var/crash, call sync(8). > > If we panic again shortly after boot (say, within 30 seconds), any core > dump we wrote out may be lost on reboot. In this situation, we really > want to keep that core file, as it may be the only way to have the issue > resolved. Call sync(8) after writing out the core file and running > crashinfo(8), in the hope that these will not be lost if we panic > again. sync(8) is only called in the case where there is a core dump > to be written out, so won't be called during normal boots. Why don't you call fsync on the relevant file(s) (or all the files in the crash dir)? sync just starts the process while fsync will block till all the blocks are on disk... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."