From owner-freebsd-current@FreeBSD.ORG Mon Jul 16 04:12:18 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 E441216A403; Mon, 16 Jul 2007 04:12:18 +0000 (UTC) (envelope-from snezhko@indorsoft.ru) Received: from indorsoft.ru (indor.net.tomline.ru [213.183.100.90]) by mx1.freebsd.org (Postfix) with ESMTP id 090D513C481; Mon, 16 Jul 2007 04:12:17 +0000 (UTC) (envelope-from snezhko@indorsoft.ru) Received: from SNEZHKO by indorsoft.ru (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000220503.msg; Mon, 16 Jul 2007 11:12:12 +0700 From: Victor Snezhko To: David Malone References: <20070709214216.GA72912@walton.maths.tcd.ie> <20070711132202.GA95487@walton.maths.tcd.ie> Date: Mon, 16 Jul 2007 11:12:07 +0700 In-Reply-To: <20070711132202.GA95487@walton.maths.tcd.ie> (David Malone's message of "Wed, 11 Jul 2007 14:22:02 +0100") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Processed: indor.net.tomline.ru, Mon, 16 Jul 2007 11:12:13 +0700 (not processed: spam filter disabled) X-Return-Path: snezhko@indorsoft.ru Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras Subject: Re: Debugging times 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: Mon, 16 Jul 2007 04:12:19 -0000 David Malone writes: >> Yes, I'll test them. >> >> The problem is - the same kernel works when booted off a hard drive, so >> unless the VMWare BIOS is very messed up (it's the first time I see such >> problems) it may not help. Please, scatter debug printf's around so I >> can see what's going on :) > > Try the patch at: > > http://www.maths.tcd.ie/~dwmalone/clock.patch > > It checks the return values of the various clock reading functions > in the kernel and prints an error message if it finds that it can't > set the clock OK. Some machines have a BIOS that doesn't count the > day-of-week correctly, and recently FreeBSD has started treating > this as an error on some platforms. Just a "mee too" - I've been suffering from precisely this problem - on a hardware box, not vmware. I have instrumented clock_ts_to_ct in my kernel to see what happens, and yes, ct.dow is 0 today, on monday, and day_of_week(days) expects 1. I couldn't find on what day of week dow should be 0 anywhere in the specs - on sunday or on monday - so probably there are just bioses that behave differently in this respect. Thanks for clarifying the issue. Also, this was a surprise to an unexperienced me, but I have also found that vfs_mount initializes RTC with the latest timestamp found on local file systems - this explains why kernel "worked" for Ivan on a hard drive. It didn't actually work, but used timestamp which was stored on filesystem during unmount. -- WBR, Victor V. Snezhko E-mail: snezhko@indorsoft.ru