Further, while most programs will only be affected in or very close to 2038, programs that work with future dates will begin to run into problems much sooner. For example, a program that works with dates 20 years in the future will have to be fixed no later than in 2018.
Because most 32-bit Unix-like systems store and manipulate time in this format, it is usually called Unix time, and so the year 2038 problem is often referred to as the Unix Millennium Bug. However, any other non-Unix operating systems and software that store and manipulate time this way will be just as vulnerable.
Early problems
In May 2006, reports surfaced of an early manifestation of the Y2038 problem in the AOLserver software. The software was designed with a kludge to handle a database request that should "never" time out. Rather than specifically handling this special case, the initial design simply specified an arbitrary time-out date in the future. The default configuration for the server specified that the request should time out after one billion seconds. One billion seconds (approximately thirty-two years) after 9:27.28 pm on 12 May 2006 is beyond the 2038 cutoff date. Thus, after this time, the time-out calculation overflowed and returned a date that was actually in the past, causing the software to crash. When the problem was discovered, AOL server managers had to edit the configuration file and set the time out to a lower value.[3][4][edit] Vulnerable systems
Embedded systems are most likely to be affected by the 2038 bug. Transportation systems from flight to automobiles increasingly use embedded systems. New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers that also have considerable safety requirements. Another major use of embedded systems is in communications devices, including cellphones and internet appliances (routers, wireless access points, etc) which rely on storing an accurate time and date and are increasingly based on subsets of Unix (Android, Apple iOS, "light" versions of Linux etc).As of 2010[update], most of these systems use 8-bit or 16-bit processors, even as desktop systems are transitioning to 64-bit systems. Despite the modern 18–24-month generational update in computer systems technology, embedded systems are designed to last the life of the machine they are built into. It is easily conceivable that some may still be in use by 2038. It is impractical (or in some cases impossible) to upgrade the software on these systems, so most will simply have to be replaced at significant cost.[citation needed]
The use of 32-bit
time_t has also been encoded into some file formats, which means it can live on for a long time beyond the life of the machines for which such file formats were originally designed.[edit] Data structures with time problems
Many data structures in use today have 32 bit time representations embedded into their structure. A full list of these data structures is impossible to derive but there are well-known data structures that have the Unix time problem.- file systems (like many inode file systems still in use)
- data bases (that have 32 bit time fields)
- COBOL databases from the 1970s, 1980s and 1990s that have not been replaced by 2038 compliant systems
- embedded factory, refinery control and monitoring subsystems
- assorted medical devices
- assorted military devices
[edit] Solutions
There is no straightforward and general fix for this problem for existing CPU and operating system combinations, existing file systems, or existing binary data formats.Changing the definition of
time_t data type to a 64-bit type would break some, but not all, binary compatibility for software, data storage, and may affect any code that deals with the binary representation of time.Changing
time_t to an unsigned 32-bit integer, effectively allowing timestamps to be accurate until the year 2106, would affect programs that deal with time differences or dates before 1970, and thus would also break binary compatibility in many cases.Most operating systems for 64-bit architectures already use 64-bit integers in their
time_t, and these operating systems are becoming more common, particularly in desktop and server environments. Using a (signed) 64-bit value introduces a new wraparound date that is over twenty times greater than the present age of the universe: approximately 292 billion years from now, on Sunday, 4 December 292,277,026,596.Alternative proposals have been made (some of which are in use) including storing either milliseconds or microseconds since an epoch (typically either 1 January 1970 or 1 January 2000) in a signed-64 bit integer, providing a minimum of 300,000 years range.[5][6] Other proposals for new time representations provide different precisions, ranges, and sizes (almost always wider than 32 bits), as well as solving other related problems, such as the handling of leap seconds.
0 comments:
Post a Comment