| « Prev | Page 1 | Page 2 | Next » |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 10:07
•
by
J.R. Blood
(unregistered)
|
|
If it was January 19, 2038, you wouldn't be claiming "First!". I doubt any of us could. ;)
|
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 10:24
•
by
Kluge Doctor
(unregistered)
|
|
print "I suggest finding a new vendor!"
sleep 1000000000 cls #Erase comment after 30+ years |
|
Billionth!
(Er, mind you, that's a 'Murkin billionth. .elsewhere, read that as thousand-millionth....) |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 10:47
•
by
Jordi
(unregistered)
|
WTF!? How about just removing the last two lines of the script? How useful is it to have your application shut down/crash at some random moment in the distant future? |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 10:48
•
by
tuna
(unregistered)
|
|
It would appear this one is fixed, at least in modern ubuntu. Sleep 10000<snip screenful of zeroes> seems to sleep just fine.
|
|
It's always best to let sleeping oracles lie.
|
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 10:53
•
by
Jeff
(unregistered)
|
Golden Rule No. 1: Never do today what you can put off until sometime in the future. Do you want to be out of a job? A flawless system that never crashes doesn't bring in any revenue. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 11:25
•
by
Villa
(unregistered)
|
Or hardware: http://gizmodo.com/5121311/30gb-zunes-failing-everywhere-all-at-once. Happy new year, Microsoft! |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 11:50
•
by
Ozz
(unregistered)
|
Which is why Linux has yet to take over the world... |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 11:54
•
by
Wolfgang Draxinger
(unregistered)
|
|
Looks like a poor man's approach on implementing a SIGTERM shutdown hook for a service => The shutdown script will send SIGTERM on all processes remaining after executing the shutdown scripts. Some processes even refuse to accept that, but "sleep x" will do. Once sleep exited oracle gets terminated.
The real WTF is, why they didn't just put "oracle stop" into a shutdown script. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 12:08
•
by
Nodody
(unregistered)
|
The standard assumption of the maintenance programmer is that if something looks completely nonsensical, it is probably that way for a reason, and shouldn't be tampered with for fear it could cause a problem. In many cases this is true. Chances are good that there is a better, cleaner solution to the problem, but figuring out first what the problem was that the ugly kluge was meant to solve, and then figuring out the more elegant solution to that problem is a lot of work. Removing a zero is not a lot of work. Ergo, rather than hurting your brain trying to figure out why this mystical incantation was originally uttered, or putting your butt on the line by assuming that the original developer was a total moron and added these two lines for no reason whatsoever, you remove a zero, and go back to sleep. Such is the life of the third class programmer. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 12:27
•
by
Withheld
(unregistered)
|
|
I find this re-post very amusing this morning as news of this spreads:
http://arstechnica.com/news.ars/post/20081231-30gb-zunes-prepare-for-new-year-by-locking-up.html I used to a Tier 2 agent for Zune Support - glad I don't work there anymore, as the phones are going to be ringing off the hook! |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 14:56
•
by
Albino Tornado
(unregistered)
|
|
Not to excuse the lack of comment, but could that sleep have been put in there because of some historical issues Oracle's had with the uptime command?
|
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 16:00
•
by
RogerC
|
Remind me to never hire you to write a random number generator for me. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 17:10
•
by
Schmuli
(unregistered)
|
|
Could someone explain "2^31-10^9" means? I never was very good at maths. Also, why is time stored as an epoch, and what will the solution to the problem be (in 2038)?
CAPTCHA: paratus - that act of repeating what was just said. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 18:12
•
by
CoyneT
(unregistered)
|
|
Hmmmm...
Do you suppose they'll fix this permanently once enough 0's have been shaved off? That is ...
... I mean, this could give you a whole new definition for, "Problem came back." |
|
http://xkcd.com/376/
|
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 19:35
•
by
rosko
|
I assume that's x86-64 Ubuntu, yes? The problem is with 32-bit time_t, resolved by making time_t a 64-bit integer. |
Get him! |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 21:32
•
by
Liquid_Fire
(unregistered)
|
Based on quick rough calculations (2^64 google search), even 64-bit ints wouldn't fit more than 20-digit numbers. "Screenful of zeroes" sounds like more than 20 (especially when you consider a standard terminal is 80 characters wide). So it seems likely that the problem has actually been fixed (whether by capping it at the maximum possible value or some other means) |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 22:54
•
by
Daniel Beardsmore
|
See it as (2^31)-(10^9), which is "(2 to the power 31) minus (10 to the power 9)". Basically, 2 billion (approx.) minus 1 billion. Time on a computer is normally stored as a number of seconds since a particular date. That date is known as the "epoch" of that date system. Most systems have been using 32-bit dates, which only gives you around 136 years (2^31 seconds, or around 4 billion seconds). In 2038, time will run out for UNIX and Linux systems still using 32-bit dates. Other OSes will vary depending on the Epoch, which can be in 1900, 1901, 1970 or any other year of choice. The solution is to store the dates using more bits, e.g. 64 bits. |
Re: Classic WTF: The Harbinger of the Epoch
2008-12-31 23:32
•
by
John
(unregistered)
|
|
Over a decade ago I was using Aegis 9.7 in test equipment based on Apollo workstations, when I became aware of the 'date bug' in that OS.
Some far sighted OS designer had based the date routines on a 31-bit counter which was expected to overflow on 2 November 1997. I forget the exact time. The consequence of the overflow was that if the workstation was shut down, it wouldn't boot again. Since the system real time clock could only be set when the OS wasn't running, I was able to change the date, verify the problem, and reset the date to something which would allow a reboot. For many years we operated in a time-warp, with the clocks set to 16 years in the past. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 02:53
•
by
Chas. Owens
(unregistered)
|
|
2^31 is two raised to the 31st or 2,147,483,648. The reason it is important is that a signed 32 bit integer can only hold up to that number minus one before overflowing (to -1). 10^9 is ten raised to the nineth (1,000,000,000). If you take the current time in seconds since 1970 (the epoch time) 1,230,795,313 and add 1,000,000,000 to it you get 2,230,795,313 which is larger than what can be stored in a signed 32 bit integer, so it overflows (due to two's complement) to -2,064,171,983. A sleep for a negative value returns immediately.
As for why we use the epoch, well, how else are you going to store it? A string? Yeah, that worked real well for the COBOL guys didn't it? Seconds since a fixed point in time is a good solution as it is easy to store and do math with. The solution is to move to using a 64 bit integer, which should last us until the heat death of the universe (or an eleven digit year, which ever comes first). Hopefully, if we have found a way to reverse entropy by then, we will switch to a 128 bit integer before it becomes an issue. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 07:17
•
by
m0ffx
|
Actually half that, since Unix uses a signed value, so the first bit is the sign bit. With an epoch of 1970 that gives a date range from 1902 to 2038
Pain in the arse with the leap second though. Y2038 problem will be bigger than Y2K for several reasons. It's more fundamental, being at the heart of the operating system rather than just numbers in a database. It's probably more widespread - any 32 bit Unix system suffers this issue. And it's harder for the layperson to understand, so there likely won't be as much awareness of it. Oh, and in some timezones it'll hit in the middle of the working day (assuming systems using UTC as their system clock, as they should). True, there's 30 years for problematic systems to disappear. But the developers of Y2K bugged software didn't think it would still be in use in 2000. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 07:27
•
by
Schmuli
(unregistered)
|
|
Thanks for explaining that.
Does this mean therefore that any date calculations are really mathematical operations on the value of the epoch? Going back before the epoch is not a problem, because I just store a negative value? I noticed in Reflector that the DataTime object stores its data as a 'ulong', which is an unsigned 64bit integer. Can .NET applications still be affected by the epoch overflow issue? Is it dependent on the underlying OS? More to the point, is Windows still using 32bit integers for the date, or has it upgraded already? Also, what about the BIOS clock, isn't the OS taking its value from there, meaning this isn't an OS issue, but rather a BIOS one? |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 09:41
•
by
Kasper
(unregistered)
|
|
Why was the sleep and stop there to begin with? Perhaps it was initially put in during development but with a shorter sleep to test something. Close to release somebody might have realized it needed to be changed, but it was deemed too dangerous to make any design changes that close to release, so rather than removing the lines it was decided that increasing the sleep time was safest - a real fix could always be done later.
Time passes everybody forgets about a problem that needs to be fixed and suddenly it blows up. When the problem becomes clear it was decided that during an emergency it is not a good idea to make any design changes, so it was decided that decreasing the sleep time was safest. A real fix would of course be necessary at a later point once the emergency was over. If my guesses above are correct, I hope the people currently responsible for this software read this article, because they have probably forgotten that they have a pending problem that needs to be fixed. BTW. The problem did sound somewhat similar to: http://en.wikipedia.org/wiki/Year_2038_Problem#Known_problems |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 10:00
•
by
pjt33
|
Maybe you're using a different base to me, but I make 2038 - 1902 = 136. Daniel was perfectly correct: he merely omitted system-specific information (which is fair enough given that he was talking about 32-bit systems in general). |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 10:07
•
by
Dave
(unregistered)
|
|
The problem was probably something checking if the script terminated and causing more problems.
|
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 10:29
•
by
moz
(unregistered)
|
I'm sure they'll fix it permanently once they have a dedicated 2038 bug budget. If they do get down to 1000000s before that happens, there will be someone there who remembers the last time, and the fact that neither Caspar nor his predecessor put a warning anywhere will not matter. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 15:24
•
by
J.R. Blood
(unregistered)
|
|
Another WTF is that some of you can actually think about all of these numbers on the day of Hangover. ;)
CAPTCHA: damnum - Too approprate for words (or numbers as the case may be). |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 18:43
•
by
Tim
(unregistered)
|
|
What no one's posted when this failure would have occurred yet? Shame on you, and you call yourselves geeks. Tut-tut. ;-)
It's Saturday the 13th of May 2006 at 01:27:28 UTC by the way. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 18:53
•
by
WWWWolf
|
Yes, it's basically simple math - if you want to go forward one day, just add 86400 to the value, and so on. Going to the time before the epoch depends entirely on whether the value is stored as an unsigned or a signed value. Unix uses signed values, so you can use negative numbers to go to pre-1970 dates.
Pretty much all applications can, as long as the values are stored in a fixed-size variables, which is (as you can see) the case pretty much all the time. It just takes a really freaking long time if it's stored in a 64-bit integer. As said, signed 32-bit Unix date will wrap around in January 19, 2038. 64-bit Unix date will wrap around in December 4, 292277026596. They may have invented something better by then, but I'm not sure if I should be optimistic or pessimistic about that.
As a Linux guy I regrettably don't know the specifics on Windows. I'm just kind of assuming that 32-bit OSes use 32-bit variables and the 64-bit OSes have migrated already. Someone please correct me. Anyway: Computers are hell of a multilayered abstract beasts! There are multiple layers of date storage. The computer has a hardware clock, the operating system has its own clock (operating systems are largely portable these days and they don't want to rely on any specific kind of a hardware clock - times change!), the low-level OS API uses one kind of abstraction, the various other programming languages on top of that use their own APIs, and all of the various bits along this glorious gigantic way use their own way of storing and processing the number. None of these have necessarily any bearing on whether or not the other parts of the chain have any specific limitations. Your standard library can be perfectly capable of handling dates in 64-bit format... while your operating system, likewise a modern thing, is busy working around the deficiencies of your antiquated BIOS. The OS grins, tells the application the correct time value, while cursing at the machine behind the application's back. Hypothetical, but it can happen. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-01 19:44
•
by
Kasper
(unregistered)
|
I posted a link to a Wikipedia article with the date. |
Time travel! |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-02 06:54
•
by
Andy
(unregistered)
|
|
What everyone seems to miss is that many industries (specifically the financial industry) often needs to refer to dates 30 years in the future. For example, mortgages... As such, this is already an issue for many financial institutions and other companies that regularly need to refer to and store future dates.
|
|
Yeah, let's get the Zune New Years bug up on dailywtf. I mean, I know bugs are gonna happen sometimes, but when we have an event where *all* of a certain category of mp3/general media player fail at the same time for real, well I think that's worthy of coverage here.
-- Furry cows moo and decompress. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-02 08:41
•
by
Wyrd
(unregistered)
|
We might be ok though if enough systems have switched over to 64-bit computing by then. Also, there's actually a lot *more* awareness of this problem among the people that would have to fix it than I believe there was for the Y2K bug. Of course, I suspect The Media will still hype it up during the last few years, and especially months, before the Big Event. Embedded Linux/Unix systems are probably at the biggest risk for meltdown since they're hard to get at and they tend to get forgotten about. For example: do you know which version of which OS *your* home router uses? -- Furry cows moo and decompress. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-02 10:05
•
by
Boring
(unregistered)
|
|
Is it dependent on the underlying OS? More to the point, is Windows still using 32bit integers for the date, or has it upgraded already? Also, what about the BIOS clock, isn't the OS taking its value from there, meaning this isn't an OS issue, but rather a BIOS one?
32-bit Windows has always used 64-bit time, but it has a resolution of 100ns instead of 1 second, so it is more precise, but goes through them much more quickly. The valid date range is 1601 through 30827. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-03 00:06
•
by
inic
(unregistered)
|
|
since the time of start is somewhat random the time of the crash is also random if you dont have started the application yet
|
Re: Classic WTF: The Harbinger of the Epoch
2009-01-03 09:51
•
by
Havstein
|
Actually, this could be the truest thing I've read all week. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-04 12:08
•
by
Iain
(unregistered)
|
|
Well, he's got 35 years and 11 months to find another fix:
Sat Nov 18 17:27:28 GMT 2034 |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-04 12:10
•
by
Iain
(unregistered)
|
doh! that should of course be 25 years!! |
That's redundant, the Epoch is a time which marks the beginning of something, not a period of time. Unless of course you are referring to the beginning of the second, as opposed to the middle or the end of the second in question. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-05 17:56
•
by
Rempha
(unregistered)
|
If possible, networked computers get their time from the internet, using NTP. BIOS time is used at boot time, and as a backup, if the network time is not available. Accurate network time is required for some security protocols. Since the BIOS time may not be accurate, or even correct, servers may not communicate if network time is not available. This is not a problem for workstations, because workstations normally assume that network time may not be available, and don't implement services that fail in its abscence. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-05 18:53
•
by
CoyneT
(unregistered)
|
I think I'll leave that for the Y3hG programmers to worry about. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-06 08:20
•
by
peter green
(unregistered)
|
The problem is it's a painfull bug to fix because you can't change the size of standard C types without breaking the ABI. So the only way to fix it is to either break the ABI (meaning all apps need to be recompiled at once) or introduce new APIs and modify the apps to use them.
64 bit apps on a 64 bit unix like OS will most likely be fine because the ABIs for 64 bit apps tend to use 64 bit time_t. 32 bit apps on a 64 bit OS will have the same problems as they did on a 32 bit OS.
And they are likely to remain 32 bit for a long time. I don't see most embedded systems needing more than 4 gigs of ram. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-07 16:28
•
by
rfsmit
|
It's "merkin", not "'Murkin". "'Murkin" is a representational spelling of "American" into English English, while "merkin" is... I suggest you look it up. With pictures. |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-07 16:34
•
by
rfsmit
|
That's the general idea, yes. Do myself out of a job by being super-efficient. Doing a great job gets you cooler jobs later on.
Yes it does. For the owner of that system. A question for you: You're not located in Redmond, WA, are you? |
Re: Classic WTF: The Harbinger of the Epoch
2009-01-09 13:49
•
by
cb
(unregistered)
|
I'm willing to bet that the leap year rules will have changed by then! So i won't hold my breath on it being exactly on the 4th of December... ;-) |
| « Prev | Page 1 | Page 2 | Next » |