Linux won't stay up for longer than 16 months?

Apparently until recently, the Linux kernal value that measures “uptime” was a 32 bit number.  Uptime is measured in centiseconds (.01) and thus after 497 days, 2 hours, 27 minutes and 53 seconds, the counter wraps around to zero.  Doing a Google search on “Linux uptime 497“ produced a number of folks who encountered the issue and discussions about it.

Now, I doubt that this is a big deal in the grand scheme of things.  I honestly don't know if Windows has similar limitations.  Obviously Linux can stay up longer than 497 days, it just won't be reported as doing so.

What struck me as odd about this particular problem was the response of the user community.  Many of the replies to folks bringing up the issue go along the lines of “if you go 497 days without rebooting, you're a security risk because you haven't applied kernel patches.”  Example here and here.

I'm certain that if Windows had such an issue, it would be proudly proclaimed by the Linux user community as evidence of shoddy programming on the part of Microsoft.  They would be right.  Of course, the Windows user community couldn't care less about shoddy programming in the Linux universe so, other than right here, you're unlikely to hear about such problems.  I suspect that Ziff-Davis (motto:  “Pravda for the Linux State“) won't be running any commentary about the “uptime rollover bug.“

I stumbled apon all this when researching which OS was being used by major web sites for it's servers.  Netcraft offers a page showing the average longest uptimes of the web sites it tracks.  The Top 50 sites is dominated with BSD/OS, which accounts for all but 7 of the entries including the top 5 sites.  #1 is 1,786 days by Netcraft's count.

#6 is 1,618 days and is running FreeBSD.  No one in the BSD community thinks such a high number is out of place or indicates a insecure system.  In fact, the version of Apache running on the #5 site is 1.3.26, which was released in June 2002.  So obviously the site is getting secuirty updates, it just doesn't need reboots to make them happen...

...and that, my friends, is exactly the way it should be.

6 Comments

  • Windows does have such a limitation. Actually to your point, the "Anti-Microsoft-Sisterhood" did make a big boohoo about it in Win98 times. Any operating system, unless god wrote it himself needs patches and updates.



    Eventually, computers will end up becoming more like Human Beings. While you take them down, they "Die", and you need to resurrect them after fixing them with a patch .. in the grand scheme of things, I feel 10-20 years down the road, you would have a computer simply "sleep" instead of "die", and that is when all things such as .. defrag, scandisk, and a intelligent program that automatically generates and applies patches runs itself.



    In a society, i.e. webfarm everyone serves a purpose, and as such other computers will work, while others rest .. and the cycle continues .. because everyone needs to rest for a while. Obviously, such complex machines will be tougher to reboot, just as you cannot reboot a human being, but science just might make that happen. Nonetheless we will still have a desire for computers that don't sleep as much, and we will drug them up on coffee, just as we do now.



    Now only if we got them to reproduce like us, hardware costs would be nothing !!!!

  • Actually Microsoft's limitation is worse - Win32 API measures its uptime in milliseconds so it wraps every 49.7 days (see GetTickCount). You can use performance counters to get a better uptime value but that's obviously only available on NT kernel.

  • David, it's pretty much possible to replace kernel on the fly, if it's written properly. Look at BeOS, one of the better examples of microkernels. If you make everything a module you can pretty much replace everything on the fly. But neither Linux nor Windows come close. Windows is worse due to file system design, *nix file systems can replace files in use, existing "handles" point to the old version of the file, any new request for the replaced file open the new version. The old file is deleted from the file system when all references to it are released.



    But most of Windows restarts are caused by idiot developers, you can do a lot without restarting but somehow developers (most of them are drag and drop developers) think that they need to distribute half of system libraries with their product and to get those installed you need to restart. With NT kernel it's possible to replace the whole network subsystem without restarting, it comes down to stopping it, replacing and starting it again, but most "developers" find that too difficult, so they choose to restart than to write a proper installer/updater. Yet again, that's what you get when you make programming accessible to people who don't know what they're doing.

  • check out http://www.port80software.com/surveys/top1000webservers/ for major web site OS

  • Anon, I hope you don't believe that survey any more you can believe NetCraft. Our company has dozens of web sites running IIS, Apache, Tomcat, even Netscape web servers. Yet in the port 80 survey we're counted as a single server running IIS, because that's what our marketing site runs (which is designed by the newbies since it doesn't make any money so performance and quality is not that important).

  • A human being reboots by going to sleep.

Comments have been disabled for this content.