UNIX BUG in Year 2038!!

Ranhiru

Member
Feb 2, 2007
6,438
42
0
Inside FIREFOX
Year_2038_problem.gif


Y2K38


Explanation
UNIX keeps track of time in a 4-byte integer that represents the number of seconds after January 1, 1970 12:00:00.
For example, a time of 60 represents the date January 1, 1970 12:01:00.

A 4-byte integer has a maximum value of 2,146,483,547. This time (known as maximum time) corresponds exactly to January 19, 2038 3:14:07.

This explains why UNIX programs in large, were pretty much unaffected by the Y2K bug - since it kept track of time in units of seconds. However, its own version of Y2K will occur a second past the maximum time.

Consequence
At exactly January 19, 2038 3:14:08 (one second past the maximum UNIX time), one of two things can happen to programs that keep track of time with this format. It will either crash and stop functioning altogether, or it will rollback time to the beginning of UNIX time: the first minute of 1970.

What this means for computer programs and systems that haven't been fixed depends on the program itself. The consequences can be similar those predicted with the Y2K bug.

Many pieces of software that involve future dates (i.e. Calendars, Investment calculators etc.) are already experiencing problems with the 2038 bug, being unable to involve any dates past 2038.

Also, some calculations that involve averaging dates have begun to fail as well. For example, if an algorithm adds two dates together and then divides by 2 to find the middle date, it would fail.



Preparation
Many popular software updates recently are already addressing this issue. If your favourite software isn't, do not worry, the bug will occur in over 30 years. During that time, it is very likely that most systems will have gone to a 64-bit operating system (where this problem is averted for over 290 billion years - much past the lifespan of the sun).

For those systems or programs still on a 32-bit platform, the bug will indeed cause problems, but fixing the problem will not be difficult due to the nature of it. It will not require recoding how dates are stored in a program as was the case with Y2K, dates will merely be required to be stored in a primitive type with larger precision.

As for programs that involve averaging dates, the simplest solution would be some basic alegebraic manipulation: to divide the dates by two before adding them together.

Machines Affected
Currently (March 1998) there are a huge number of machines affected. Most of these will be scrapped before 2038. However, it is possible that some machines going into service now may still be operating in 2038. These may include process control computers, space probe computers, embedded systems in traffic light controllers, navigation systems etc. etc. Many of these systems may not be upgradeable. For instance, Ferranti Argus computers survived in service longer than anyone expected; long enough to present serious maintenance problems.

Note: Unix time is safe for the indefinite future for referring to future events, provided that enough bits are allocated. Programs or databases with a fixed field width should probably allocate at least 48 bits to storing time values.

Hardware, such as clock circuits, which has adopted the Unix time convention, may also be affected if 32-bit registers are used.

In my opinion, the Y2K38 threat is more likely to result in aircraft falling from the sky, glitches in life-support systems, and nuclear power plant meltdown than the Y2K threat, which is more likely to disrupt inventory control, credit card payments, pension plans etc. The reason for this is that the Y2K38 problem involves the basic system timekeeping from which most other time and date information is derived, while the Y2K problem (mostly) involves application programs.

Emulation and Megafunctions

While 32-bit CPUs may be obsolete in desktop computers and servers by 2038, they may still exist in microcontrollers and embedded circuits. For instance, the Z80 processor is still available in 1999 as an Embedded Function within Altera programmable devices. Such embedded functions present a serious maintenance problem for Y2K38 and similar rollover issues, since the package part number and other markings typically give no indication of the internal function.

Software Issues

Databases using 32-bit Unix time may survive through 2038. Care will have to be taken to avoid rollover issues.
 

Ranhiru

Member
Feb 2, 2007
6,438
42
0
Inside FIREFOX
shirands said:
Ammata siri mara scene eka ne ban.

Loku awlak wenne naa wage machan...

Many popular software updates recently are already addressing this issue. If your favourite software isn't, do not worry, the bug will occur in over 30 years. During that time, it is very likely that most systems will have gone to a 64-bit operating system (where this problem is averted for over 290 billion years - much past the lifespan of the sun).