From owner-svn-src-head@FreeBSD.ORG Wed Aug 28 15:12:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F725BDF; Wed, 28 Aug 2013 15:12:16 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD622FAE; Wed, 28 Aug 2013 15:12:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SFCGRC088268; Wed, 28 Aug 2013 15:12:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SFCGMx088267; Wed, 28 Aug 2013 15:12:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201308281512.r7SFCGMx088267@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Aug 2013 15:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254992 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 15:12:16 -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. Discovered by: Trying to debug an IPSEC panic MFC after: 1 week Modified: head/etc/rc.d/savecore Modified: head/etc/rc.d/savecore ============================================================================== --- head/etc/rc.d/savecore Wed Aug 28 14:49:36 2013 (r254991) +++ head/etc/rc.d/savecore Wed Aug 28 15:12:15 2013 (r254992) @@ -70,6 +70,7 @@ savecore_start() if checkyesno crashinfo_enable; then ${crashinfo_program} -d ${dumpdir} fi + sync else check_startmsgs && echo 'No core dumps found.' fi