From: Eyal Lebedinsky <eyal@eyal.emu.id.au>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: list linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: hware clock left bad after a system failure
Date: Thu, 17 Nov 2005 08:52:14 +1100 [thread overview]
Message-ID: <437BAA0E.2020602@eyal.emu.id.au> (raw)
In-Reply-To: <Pine.LNX.4.61.0511161037130.12055@chaos.analogic.com>
linux-os (Dick Johnson) wrote:
> On Wed, 16 Nov 2005, Eyal Lebedinsky wrote:
>
>
>>I recently had two cases where my machine locked up and needed
>>a hard reset. The last time magic SysRq did not respond at all.
>>
>>In these cases I found that the hware clock was set incorrectly
>>and the machine comes up with a bad date. It seems that the clock
>>is ahead by as much as my TZ (+10 in my case). I may be able
>>to understand if it was set 10h behind (kernel set it to UTC)
>>but this is the other way. The machine comes up with UTC+20.
>>
>>Now this is just trouble. The machine comes up and spends 15m
>>fscking. I then reset the clock and reboot and it does the whole
>>fsck again because it thinks the fs was not checked for eons. It
>>does not understand time in the future.
>>
>>So the points are
>>
>>- why is the clock mangled in this way?
>
>
> I am assuming that you have an ix86 kind of machine.
>
> It's probably mangled because you had a hardware-crash.
>
> If you have a driver that accesses the RTC, it needs to leave
> the index register at offset 0 so that a hardware crash can
> only upset the seconds. Otherwise, even the RTC checksum
> can get screwed up, forcing manual reconfiguration of the
> BIOS.
>
> During a hardware-crash, the chip enables may go TRUE. This
> means that an RTC write can occur with junk that's on the
> data-bus.
>
> Now, you need to find out why you had a hardware-crash which
> is quite unlike a software-crash. A hardware crash occurs when
> you turn OFF the power or the power-good line from the
> power-supply goes FALSE. You do not get a hardware-crash from
> hitting the reset button. You may have induced the RTC failure
> if you hit the power switch instead of the reset button.
I hit the reset. In one case I managed to reboot using magic SysRq.
The crashes are related to disk problems. In one case the hda/b
controller went down (last message said DMA disabled on both)
and in another case the system was doing a proper shutdown
when it failed to complete and a reset was necessary. I suspect
a problem with the SATA card which I know has some driver issues
(promise SATA II 150 TX4).
The point of the post was the fact that the clock was not randomly
set but clearly at +20h after the reboot. This was the case in the
last two crashes. This is too coincidental and I suspect that some
logic does play with the RTC and if a proper shutdown does not
complete it may not be restored correctly.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
attach .zip as .dat
next prev parent reply other threads:[~2005-11-16 21:52 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 [this message]
2005-11-17 13:37 ` linux-os (Dick Johnson)
2005-11-17 14:02 ` Eyal Lebedinsky
2005-11-17 14:37 ` Gene Heskett
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=437BAA0E.2020602@eyal.emu.id.au \
--to=eyal@eyal.emu.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
/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®