mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@verizon.net>
To: linux-kernel@vger.kernel.org
Subject: Re: hware clock left bad after a system failure
Date: Thu, 17 Nov 2005 09:37:45 -0500	[thread overview]
Message-ID: <200511170937.45384.gene.heskett@verizon.net> (raw)
In-Reply-To: <437C8D67.2030806@eyal.emu.id.au>

On Thursday 17 November 2005 09:02, Eyal Lebedinsky wrote:
>linux-os (Dick Johnson) wrote:
>> On Wed, 16 Nov 2005, Eyal Lebedinsky wrote:
>
>[report of hwclock breakage trimmed]
>
>> If your machine was being heavily swapped when the disk problems
>> occurred, this __might__ explain the corruption. However, I would
>> first check RAM, do not overclock, etc. It might be that bad
>> RAM, in fact, is the reason for all your problems and you don't
>> really have disk or driver problems at all.
>
>I will now keep watching for q while quietly. Earlier today I had
>another such hard lockup, identical errors claiming a disk failure.
>
>This time I went into the BIOS on bootup and the clock was set
>correctly. Good. Booted and it did the usual fscks but then dropped
>into a shell when errors were found on /. I did the necessary fscks.
>
>On a hunch I did 'date' and the clock was 11h ahead (we actually
>are +11 now). So the problem is during the boot, not during the
>crash. I consider that the boot thinks that I am running a UTC
>hwclock and adjusts for this, when in fact I run a local time
>hwclock. There must be something in the scripts that goes funny
>if / does an fsck and then drops into the recovery shell.
>
>I will start looking in this direction.
>
>This is Debian Sarge in x86.
>
>Thanks

Thanks for looking into this.  It has been exactly the PITA the
original poster described for me, for years on all distro's.

It seems the scenario is that if everything is on local time, its not a
problem, but if the system is set to run its hardware clock on grenwich
time, a crash leaves the hw clock afu because its on local time at the
reboot init.

I did something to my init script to quasi-fix this years ago, fix now
lost in the sands of time as this FC2 install is truely long in the
tooth now.  But it works, so I don't fix it. :)

I *think* the problem is that the assumption of grenwich time is only
at boot, and shutdown times.  At boot, I believe the hw clock is reset
to local time after getting the time reference from it, and at shutdown
its reset to grenwich. So a crash recovery finds it on local time but
assumes its grenwich & the result is a predictable mess.

If thats the case, then IMNSHO, the hw clock should ALWAYS be on
grenwich time.  This needless twiddling is rather counter-productive.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.36% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.



  reply	other threads:[~2005-11-17 14:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 14:04 Eyal Lebedinsky
2005-11-16 15:52 ` linux-os (Dick Johnson)
2005-11-16 21:52   ` Eyal Lebedinsky
2005-11-17 13:37     ` linux-os (Dick Johnson)
2005-11-17 14:02       ` Eyal Lebedinsky
2005-11-17 14:37         ` Gene Heskett [this message]
2005-11-17 15:36         ` Petri Kaukasoina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511170937.45384.gene.heskett@verizon.net \
    --to=gene.heskett@verizon.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®