Linux Y2K problems !

From: Cees Tool (vzce@curio.fr)
Date: Tue Jan 04 2000 - 20:33:23 EET

  • Next message: Michael H. Warfield: "Re: Linux Y2K problems !"

    Hello all,

    Suddenly on january 3 we found the date and time in our XFBB bbs at 01 jan
    1998 !
    This caused lots of 'old' messages in the message database and other
    housekeeping problems in our linux ham bbs/server system.

    After many hours of investigation I found the solution and now like to
    inform you, because maybe I am not the only one with this configuration
    :o)

    - Motherboard : ABIT PD5N Pentium-166(IBM)
    - Linux Redhat 4.2 with 2.0.35 kernel
    - XFBBd / CLX and other ham-servers

    I was very surprised to see that the system was not Y2K compatible, because
    the motherboard IS Y2K proof. I found out that the date-changed from
    03-jan-2000 to 01-jan-1998 after a reboot of the computer. As the computer
    is located at a remote site and only controlled by remote-sysop, I went to
    the site for trouble shooting.

    - Again Y2K-tested the motherboard, no problems found.
    - Booted DOS, no problems found (also tested several dates in 2000, all
    normally)
    - Booted linux, all seems to be normally, date command shows normal
    date/time and the clock command shows that the cmos clock also has correct
    time.
    - Then I closed linux and rebooted computer => Linux still showing the
    correct date and time just before shutting down (system and cmos/bios time,
    checked by extra date/clock commands in the shutdown script)
    - PC rebooted and I checked the bios-screen. Now the bios-clock was again at
    01-01-98 00:00 hrs !!!
    - After booting linux, also this wrong date displayed (as expected)

    After many tests I found out that the problems were caused by the linux
    "clock" command, specially the -a option which was enabled in the sysinit
    script. When the -a option was removed, the bios-clock did not jump back to
    010198 anymore after a reboot. The -a option of the clock command will
    adjust the system-clock by an amount of seconds which is set in the file
    /etc/adjtime, in this way you can make the bios-clock more accurate. This
    worked fine for the 16 months or so. Even with the time 01-jan-2000 at 02:00
    HRS it still worked fine, but when the time was set later (tested 23:00 hrs
    on 01-01-2000), then after a reboot the cmos clock jumped back to 1998.

    So it seems that when the time is written back by the ''clock" command to
    the BIOS clock, the system and cmos clocks are accepting this time, even
    when the bios-clock is read-out later the time is still correct, but after a
    hardware-reset of the RTC-chip (bios-clock) the time is "invalid" and the
    bios-clock will reset to 01-01-1998 00:00 hrs.

    In our linux-version, we were using the original ''clock'' command. In newer
    versions, this is replaced by the ''hwclock'' command (the clock command
    will then execute the hwclock program). I don't know if this is a known
    "bug" of the old clock-command, or only with some RTC/Chipsets ??? Anyway,
    when performing the same tests on my own linux systems (running newer kernel
    and suse distribution and different motherboard) the problem did not show
    up. So probably it is the "old" clock command or the combination of this
    command with the ABIT PD5N motherboard.

    For now we have solved the problem by removing the automatic adjustment of
    the cmos clock and stop writing the time back to the cmos clock by the clock
    command. Is there anybody who observed the same problems ? (it only
    shows-up after a reboot ... !)

    73
    Cees Tool - PA3AES



    This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 20:52:49 EET