From owner-svn-src-all@FreeBSD.ORG  Wed Aug 28 15:52:21 2013
Return-Path: <owner-svn-src-all@FreeBSD.ORG>
Delivered-To: svn-src-all@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 AA16AA01;
 Wed, 28 Aug 2013 15:52:21 +0000 (UTC)
 (envelope-from kostikbel@gmail.com)
Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id 30FA222FC;
 Wed, 28 Aug 2013 15:52:20 +0000 (UTC)
Received: from tom.home (kostik@localhost [127.0.0.1])
 by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r7SFqG6f028226;
 Wed, 28 Aug 2013 18:52:16 +0300 (EEST)
 (envelope-from kostikbel@gmail.com)
DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r7SFqG6f028226
Received: (from kostik@localhost)
 by tom.home (8.14.7/8.14.7/Submit) id r7SFqGUp028225;
 Wed, 28 Aug 2013 18:52:16 +0300 (EEST)
 (envelope-from kostikbel@gmail.com)
X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com
 using -f
Date: Wed, 28 Aug 2013 18:52:16 +0300
From: Konstantin Belousov <kostikbel@gmail.com>
To: Gavin Atkinson <gavin@FreeBSD.org>
Subject: Re: svn commit: r254992 - head/etc/rc.d
Message-ID: <20130828155216.GC4972@kib.kiev.ua>
References: <201308281512.r7SFCGMx088267@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature"; boundary="/NYYpGNRSM/gwMtc"
Content-Disposition: inline
In-Reply-To: <201308281512.r7SFCGMx088267@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no
 version=3.3.2
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Aug 2013 15:52:21 -0000


--/NYYpGNRSM/gwMtc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 28, 2013 at 03:12:16PM +0000, Gavin Atkinson wrote:
> Author: gavin
> Date: Wed Aug 28 15:12:15 2013
> New Revision: 254992
> URL: http://svnweb.freebsd.org/changeset/base/254992
>=20
> Log:
>   After writing a kernel core dump into /var/crash, call sync(8).
>  =20
>   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.
>  =20
>   Discovered by:	Trying to debug an IPSEC panic
>   MFC after:	1 week
>=20
> Modified:
>   head/etc/rc.d/savecore
>=20
> Modified: head/etc/rc.d/savecore
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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
The crashinfo(8) runs are usually quite long, and the program does not
add a new information comparing to the data already present in the
crash dump itself.  For your goal, it is more useful to sync before
crashinfo(8) invocation.

--/NYYpGNRSM/gwMtc
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQIcBAEBAgAGBQJSHhyvAAoJEJDCuSvBvK1BwFYP/3CYBizsxhWyWmWKg4xIa9zZ
CQsB+MTe90ouCfs2B9oAuf7aUo8SwIvEapgCtpSQF2FXf/b3VqZdxZqkppqQAK+7
5PzcyqiaaT/s5oUTaB4Gp6KqaYIo3lzWvr7myFSYHQQjZlfPPH9vFg7VPIjGszr3
mLYEC39D9r5yEicRiQBerKVfmtlmErec4XHhSyEl9wagwD4AfQ/f4vLaxSVnKU/c
jV78fhktsxcaPtzATljdeWgMjoEbu9vLJiyZSWyHZBLiYES2iM5ErulQyUi2u98c
TWjkb9hRNNSgMZuxVAOb1Z9te8z9dKWoU4QWkdkDiHMzlEGeSys19D/TJNhbeXIH
yAUNMS9fzFnRayFkSccJLoHvTi0CG5Dopapcc8tP7O5S00VdANLXf3sUe87PTx5H
IRpo8kqp1WgD8LeXVFAvhM5RB6H0V9vJh9Kwo0zpxSFKMgRdmqZRtvx/ddDLHSEe
eaG+nxGoL3CJtSJGAIg0fqiLv6dz8rVkhNAbidxb5D3R5p6uUU1Jkqhk3CjKGSf/
4K+r6dBhorDniKLv6xuw9YAW3dWJWwnNg5dgkZXBYkx+CIkXPjzll3dSSNUU9JcV
rviTbDjOnf6buetYOKeEXtn0sjKicXhIfytyhMeswZnqBj5Ky18NAaiZHcTlbFpD
J2NjKutFnVZZpdSu6MRE
=dRWs
-----END PGP SIGNATURE-----

--/NYYpGNRSM/gwMtc--