Re: hware clock left bad after a system failure

From: Gene Heskett (gene.heskett_at_verizon.net)
Date: 11/17/05

  • Next message: Andi Kleen: "Re: [2.6 patch] i386: always use 4k stacks"
    Date:	Thu, 17 Nov 2005 09:37:45 -0500
    To: linux-kernel@vger.kernel.org
    
    

    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.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Andi Kleen: "Re: [2.6 patch] i386: always use 4k stacks"

    Relevant Pages

    • Re: IST for system, local time for people
      ... On Tue, 22 Aug 2006, Tim wrote: ... Sometimes it might be the same, if your local time is GMT (Grenwich Mean Time). ... your clock and my clock, if they both use IST, will have the same time regardless of where we are. ...
      (Fedora)
    • Re: NTP Configuration for DST?
      ... OpenVMS systems usually have the system clock set to local ... The time NTPD comes up with is converted to local time (using ... We do this using zone and DST information already present in our ...
      (comp.protocols.time.ntp)
    • Re: Floppy Disk Interfacing
      ... so you would reset the counter on each transition and sample at ... clock frequency and rotational speed. ... This is why you have to format the disk before you can write to it, ... being unable to sync the clock during formatting). ...
      (sci.electronics.design)
    • Re: Diversi-Dial and AppleWin
      ... break out of the BASIC program, type NEW, then BLOAD DIAL. ... Using 1.19.00 load the disk, type 3 to get the syntax error and break ... clock will start running extremely fast. ...
      (comp.emulators.apple2)
    • Re: [opensuse] irksome timezone question - dual boot laptop
      ... make sure SuSE is set to use local time *not* GMT. ... Cmos store local time. ... not the clock: ... Now you boot windows - but windows still thinks in European time, ...
      (SuSE)