From owner-freebsd-current@FreeBSD.ORG Sat Apr 14 15:03:03 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7295106566C; Sat, 14 Apr 2012 15:03:03 +0000 (UTC) (envelope-from jeremie@le-hen.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id 82CBB8FC15; Sat, 14 Apr 2012 15:03:00 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id CACADD48142; Sat, 14 Apr 2012 17:02:54 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id 9F3AC999; Sat, 14 Apr 2012 17:02:53 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id 76D2B658D; Sat, 14 Apr 2012 15:02:53 +0000 (UTC) Date: Sat, 14 Apr 2012 17:02:53 +0200 From: Jeremie Le Hen To: Robert Huff Message-ID: <20120414150253.GB71196@felucia.tataz.chchile.org> Mail-Followup-To: Robert Huff , Alexander Best , freebsd-current@freebsd.org References: <20120414090728.GA8798@felucia.tataz.chchile.org> <20361.29886.740093.455933@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20361.29886.740093.455933@jerusalem.litteratus.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Alexander Best , freebsd-current@freebsd.org, Jeremie Le Hen Subject: Re: howto debug a complete hard reset X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 14 Apr 2012 15:03:03 -0000 On Sat, Apr 14, 2012 at 08:59:42AM -0400, Robert Huff wrote: > > > This is probably a sysctl handler that is causing the reboot. You can > > run this one-liner to spot the culprit (use sh): > > > > for i in $(sysctl -Na); do sysctl $i >> ~/sysctl.out; sync; done > > > > Each sysctl will be called in turn and the output is appended to > > a file, but the file will forcibly written to the disk before the > > next occurence. > > Um ... it is my understanding sync(8) does not guarantee > pending i/o will be written before it returns, but merely requests > this happen irrespective of when it would normally occur. > An I mistaken? Honestly I don't know, but I have do admit that the small paragraph in the BUGS section of the sync(2) manpage is a little bit shivering: BUGS The sync() system call may return before the buffers are completely flushed. Can any enlightened person answer this? -- Jeremie Le Hen Men are born free and equal. Later on, they're on their own. Jean Yanne