Server Retired After 18 Years Running on FreeBSD 2.2.1 and a Pentium 200MHZ
theregister.co.uk
theregister.co.uk
One of the developers remarked that while he was proud the system he worked on could deliver such uptimes, having an uptime of, say, three years, on a server, also meant that a) its hardware was kind of dated and b) it had not received kernel updates (and probably no other updates, either) for as long. (Which might be okay, if your system is well tucked away behind a good firewall, but is kind of insane if it is directly reachable from the Internet.)
Still, that is really impressive.
On BSD systems, kernel and userland are developed in lock step, so it's usually a good idea to reboot to be sure they are in sync.
So with that in mind, you can update your userland on FreeBSD without updating your kernel in much the same way as you can do with Linux. Though it is recommended that you update the entire stack on either platform.
Applications will usually work, but the base system will likely break in some places.
(On Windows, a lot more updates require a reboot, though, because one cannot replace/delete a file that is opened.)
Which is a good thing and I bet a model in all other OSes, besides UNIX.
UNIX flock model is just flawed.
How many times I crashed something just because I rmed a file that was being used.
Applications do crash when they make assumptions about those files.
For example, when they are composed by multiple parts and give the filename for further processing via IPC, or have another instance generating a new file with the same name, instead of appending, because the old one is now gone.
Another easy way to corrupt files is just to access them, without making use of flock, given its cooperative nature.
I surely prefer the OSes that lock files properly, even if it means more work.
Of course, the proper way to do this in POSIX is to pass the filehandle.
POSIX is actually a pretty cool standard; the sad thing is that one doesn't often see good examples of its capabilities being used to their full extent.
For this, I primarily blame C: it's so verbose and has such limited facilities for abstraction that it's often difficult to see the forest for the trees. Combine that with a generation of folks whose knowledge of C dates back to a college course or four, in which efficient POSIX usage may not have been a concern, and one finds good, easy-to-read examples of POSIX harder to find than they really should be.
I had my share of headaches when porting across UNIX systems.
Also POSIX is now stagnated around support for CLI and daemon applications. There is hardly any updates for new hardware or server architectures.
Actually, having used C compilers that only knew K&R, I would say POSIX is the part that should have been part of ANSI C, but they didn't want a large runtime tied to the language.
* Files are blobs of storage on disk referenced by inode number. * Each file can have zero or more directory entries referencing the file. (Additional directory entries are created using hard links.) * Each file can have zero or more open file descriptors. * Each blob has a reference count, and disk space is able to be reclaimed when the reference count goes to zero.
Interestingly enough, this means that 'rm' doesn't technically remove a file - what it does is unlink a directory entry. The 'removal' of the file is just what happens when there are no more directory entries to the file and nothing has it open.
https://github.com/dspinellis/unix-history-repo/blob/Researc...
In addition to letting you delete files without worrying about closing all the accessing processes, this also lets you do some useful things to help manage file lifecycle. ie: I've used it before in a system where files had to be in an 'online' directory and another directory where they were queued up to be replicated to off-site storage. The system had a directory entry for each use of the file, which avoided the need to keep a bunch of copies around, and deferred the problem of reclaiming disk storage to the file system.
This model is not unique to Windows, rather most non POSIX OSes.
I happen to know a bit of UNIX (Xenix, DG/UX, HP-UX, Aix, Tru64, GNU/Linux, *BSD).
Yes, it is all flowers and puppies when a process deals directly with a file. Then the only thing to be sorry is the lost data.
Now replace the contents file being worked on or delete it, in the context of a multi-process application, that passes the name around via IPC.
Another nice one are data races by not making use of flock() and just open a file for writing, UNIX locking is cooperative.
You could also point out that the hardlink/ref-count concept is not unique to POSIX and is present on Windows.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
> Now replace the contents file being worked on or delete it, in the context of a multi-process application, that passes the name around via IPC. ...
Sure... if you depend on passing filenames around, removing them is liable to cause problems. The system I mentioned before worked as well as it did for us, precisely because the filenames didn't matter that much. (We had enough design flexibility to design the system that way.)
That said, we did run into minor issues with the Windows approach to file deletion. For performance reasons, we mapped many of our larger files into memory. Unfortunately, because we were running on the JVM, we didn't have a safe way to unmap the memory mapped files when we were done with them. (You have to wait for the buffer to be GC'ed, which is, of course, a non-deterministic process.)
http://bugs.java.com/view_bug.do?bug_id=4724038
On Linux, this was fine because we didn't have to have the file unmapped to delete it. However, on our Windows workstations, this kept us from being able to reliably delete memory mapped files. This was mainly just a problem during development, so it wasn't worth finding a solution, but it was a bit frustrating.
But years as a Unix user might have made me biased. I am certain people can come up with lots of stories about how a file being opened prevented them from accidentally deleting it or something similar. I am not saying it is a complete misfeature, just a very two-edged sword.
That policy also means that replacing some critical Windows DLLs means a very special reboot, one that has to complete, otherwise the entire system is hosed.
Also we should remember the first worm was targeted at UNIX systems.
We should also remember that the 2nd worm was targeted at VMS systems (https://en.wikipedia.org/wiki/Father_Christmas_%28computer_w...) and appeared only a month or so after the RTM worm. Imitation is the sincerest form of flattery, no?
But arguments about your system aside, you could mitigate user error by installing lsof[1]. eg
$ lsof /bin/bash
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
startkde 1496 lau txt REG 0,18 791304 6626 /usr/bin/bash
bash 1769 lau txt REG 0,18 791304 6626 /usr/bin/bash
[1] https://www.freebsd.org/cgi/man.cgi?query=lsof&sektion=8&man...You might even be able to script it so you'll only delete a file if it's not in use. eg
saferm() {
lsof $1 || rm -v $1
}
If you do come to rely on that then you'll probably want to do some testing against edge cases; just to be safe.Which is of course, a really bad idea for the general case.
Although it is actually kind of a requirement in some industrial environments, where certifications are involved - once the thing is certified, any change, hardware or software, requires a re-certification, which apparently is expensive and tedious. Which is how many industrial plants, too, end up running on ancient computers, at least by todays's standards.
Where we have seen a lot of innovation is in the engines -- fuel economy and noise regulations have pushed GE, RR and P&W to up their game substantially.
https://www.youtube.com/watch?v=Or5YEhiT_d4&feature=context-...
[1] http://metadata.ftp-master.debian.org/changelogs/main/l/linu... [2] http://metadata.ftp-master.debian.org/changelogs/main/l/linu...
However, I've often been in situations where I reboot anyhow, because rebooting means I'm 100% confident the old code is gone, whereas if I try to get clever and avoid the restart, I'm significantly less confident. Depending on how hard it is to validate the security bug, that can be a problem.
Plus, for much of the past 20 years for many computers, if you're going to restart all services, adding in the last step for rebooting doesn't add all that significantly to the downtime. Server-class hardware often have things that make that not true (stupid RAID cards), but for everything else you were often only adding, say, 25% for the actual reboot.
Also, boot time bugs are a huge issue. They can creep during the entire time your system is up, and only show up during a reboot. Thus, if your server only has unplanned restarts, you'll only discover those bugs when you have yet another pressing issue to deal with, and also, likely at 3 in the morning on a Sunday.
So, make things better for you, and restart those servers once in a while, when things are quiet.
This means I only update the netbook on rare occasions, because when I go to bed, I want to... sleep, you know, not update my netbook. So currently, that thing has about 180 days of uptime (although it spent most of that time sleeping, of course). I have been meaning to install updates and reboot it for months, but during the day, I forget about it, and only think of it as I go to bed... A vicious cycle... ;-)
With a kernel update, one doesn't have to reboot, technically, it is merely required for the update to take effect.
If the system is sufficiently critical, it may be hard to update or migrate it. And if it's still safely working there's no real incentive to do so.
In the very short term, perhaps. But I'd argue that critical systems are the ones most in need of the ability to be frequently updated and migrated. What's going to happen when a serious security problem demands an immediate change, and you're not prepared for it? Or the system catches fire, or floods?
SPOF critical systems are why so many organisations end up in legacy software hell.
It's rare to see a kernel-bug that can't be worked around in some way other than patching.
I've seen many windows systems with uptimes of several years that have never required any maintenance.
(I'm not advocating for HVAC/SCADA systems to be running, say, Windows XP Embedded with no updates and default passwords, world-facing, just observing that the preconditions changed.)
What ends up happening is that they'll bolt on some network connectivity for convenience or to take on some new process and not set it up appropriately, or not understand what it means to expose something to the LAN or directly to the internet.
I helped a friend at a municipal utility with something like this when they wanted to provide telemetry to a city-wide operations center. They had a dedicated LAN/WAN for the SCADA stuff, and the only interface was in this case a web browser running over XWindows that had a dashboard and access to some reports. I think they later replaced it with a Windows RDS box with a similar configuration.
Because of the isolation, and professional IT who understood how to isolate the environment, it was advisable to to not be tinkering with updates, as the consequence of failure is risk to health & safety.
Which, incidentally, have been the target of a lot of recent high-profile attacks.[0][1][2][3]
[0] https://en.wikipedia.org/wiki/Duqu#Purpose
[1] https://en.wikipedia.org/wiki/Stuxnet#PLC_infection
[2] http://www.computerworld.com/article/2475789/cybercrime-hack...
[3] http://krebsonsecurity.com/2014/02/target-hackers-broke-in-v...
We do regular security audits from a security firm who goes the extra mile to try and social engineer and gain physical access to all of our sites.
Plus we're talking about things like processing fish in a town of 2,000 people. If I was operating a nuclear reactor, I would surely adapt better security measures.. although against government sponsored attacks using undocumented vulnerabilities, windows update isn't really going to do much.
The Target thing you posted has to do with internet access, which is something that goes against what I was saying. I'm talking about closed, physically secure networks, possibly not even using tcp/ip or ethernet.
Stuxnet-like attacks can go after non-networked equipment, but they're based on exploiting the computer with the programming suite, not the industrial system itself.
My gut feeling is that it is kind of like driving a car without wearing the seat belt. So far, if I had never worn a seat belt, nothing bad would have happened, because I did not have any accidents. But when it happens, one goes through the wind shield, so to speak. Also, some stability/performance issues do not manifest until a machine has been running continuously for months or years.
(What is more disturbing, though, that the very-high-uptime systems (~4 to 8 years) I have seen also appeared to never get backed up, and there didn't seem to be any plans for replacement, or at least spare parts. Which is kind of bad if the machine happens to be responsible for getting production data from your SCADA to your ERP system which in turn orders supplies based on that data.)
[1] https://www.smartmontools.org/browser/trunk/smartmontools/sm...
While it's true that most critical bugs I've run into with the kernel can be workaround in some way, it's at the detriment to some use-case that some users, somewhere rely upon.
A vulnerability I discovered a bit of a year ago allowed local privilege escalation for any user with access to write to an XFS filesystem. The only workarounds were to modify their SELinux policies or switch to another filesystem. I'm not aware of any users that rewrote their SELinux policies for this. It had been fixed in the kernel and fairly quietly fixed in a RedHat security advisory, but I don't think any other distribution did anything at all.
I'd estimate that critical kernel bugs happen at least other month. Worse, discussion of these bugs happens in the public and takes dozens of months to fix. Again, assuming you even know of these vulnerabilities, while there are often workarounds, they're not always practical.
Did you know that via user namespaces, all non-root users on a machine can elevate to a root user? That root user is supposed to be limited, but it's allowed the mount syscall. Numerous vulnerabilities have been discovered as a result of this. The kernel team usually considers them low-impact and they get a low CVSS score, but when using certain applications this can lead to local privilege escalation. The workarounds are to disable user namespaces or disable mount for user namespaces, both of which will break some set of users.
Did you know that any user capable of creating a socket can load kernel modules? For a long time this allowed loading ANY kernel module! The only workarounds were to compile it out of the kernel or monkeypatch the kernel. Only last year was this was finally fixed upstream so only those modules patching a pattern were loading. Yet, it was also discovered that if you used busybox's modprobe, the filter would still allow non-root users to load arbitrary kernel modules from anywhere on the filesystem!
Point being, this is par for the course. Clearly one needs to understand their threat model, but if the model is at all worried about local privilege escalation, update weekly until you find another OS.
So, mount any existing xfs file systems read-only, and move rw systems to ext3? I'm not saying it would make sense - but sounds like a prime example of something for which there was a work around...
(I'll concede that for those that need(ed) xfs, there'd probably not be many alternatives at the time. Possibly JFS?)
Not my favorite company.
Even though the thing is old, I'm guessing the uptime is not that impressive?
Not really up-to-date I'd say...
"The post, made by a chap named Ross..."
"The drive's a Seagate, for those of you..."b) I keep forgetting about 'El Reg', but whenever I return there, I enjoy my visit. It has a strong, unique tone which I find a breath of fresh air amongst all the dull, neutral news reporting out there.
They're basically the tabloid press of the tech news industry. But their writing style is fun, I'll grant them that.
It's better explained by simply describing the site as a tabloid. Tabloids aside, British news reporting isn't typically that informal.
> I keep forgetting about 'El Reg', but whenever I return there, I enjoy my visit. It has a strong, unique tone which I find a breath of fresh air amongst all the dull, neutral news reporting out there.
Personally I find the site appalling. It's up there with the The Daily Mail for rewriting other people's articles. Granted this is basically how 99% of reporting happens these days, but these kinds of tabloids often miss the entire crux of the original piece they're plagiarizing due to their editorialisation. For example, their articles on OpenSSL parallels the Daily Mail's absurd anti-immigration propaganda. And often, again like the Daily Mail, El Reg will completely miss-report a story just for the sake of having a clickbait headline.
Frankly, I'd rather have dull neutral news reporting over biased misinformation.
You either love or hate The Register, personally I've enjoyed reading it since 1997 and get a good chuckle each morning from some of their amusing bylines.
+1 Their headlines are borderline genius on occasion
I guess if you are not from the UK it might not be so bleeding obvious, but for us it is. Would I be correct in guessing that you are not?
Never mind the ongoing BOFH column.
https://thehosh.files.wordpress.com/2008/02/kickedterrorist....
And here's one from The Sun
http://www.lazerhorse.org/wp-content/uploads/2014/05/The-Sun...
I don't tend to read many tabloids, but the Red Tops (predictably named because of their design) I've read on occasions do follow the same tongue-in-cheek writing style.
I think it's fair to say they can't all be parodies as you then have to question when a parody is so commonplace that it's no longer a parody; that it instead just becomes that normal thing.
The definition of parody is:
"a work created to imitate, make fun of, or comment on an original work, its subject, author, style, or some other target, by means of satiric or ironic imitation." [0]
Websites that would fall into the "parody" category would be The Onion, The Daily Mash, Landover Baptist Church, The Poke etc. Another word to describe these types of sites would be satire.
The Register is not really a "parody" website because it's reporting on actual things that have happened (direct from source or through recycling), but the reporting and writing style is in the same vein or riffs off of the "tabloid journalism" style.
Tabloid journalism can be characterised as sensationalist, ridiculing and hyperbolic, with headlines designed to appeal to your more base instincts.
What The Register does, or attempts to do is inject humour into its reporting by using the tabloid style, it tries not to take itself too seriously. There is as you rightly point out a lot of "tongue in cheek" phrasing in many articles. For example, as I've mentioned elsewhere, I enjoy their headlines and bylines, e.g.:
"Criminal records checks 'unlawful' and 'arbitrary' rules High Court - Disclosing minor silliness no longer required, say judges" [1]
"Rust 1.6 released, complete with a stabilised libcore - A world without buffer overflows is what our children shall inherit" [2]
"Boeing just about gives up on the 747 - Even the cargo market's dried up for the Jumbo Jet. Next stop, elephant's graveyard?" [3]
Anyway, I wouldn't get too bogged down, in over analysing El Reg, you either get their sense of humour or you don't.
There are also an offshoot by ex-Register founder Mike Magee which reports in a similar style:
[0]: https://en.wikipedia.org/wiki/Parody
[1]: http://www.theregister.co.uk/2016/01/22/criminal_record_chec...
[2]: http://www.theregister.co.uk/2016/01/22/rust_16/
[3]: http://www.theregister.co.uk/2016/01/22/boeing_747_productio...
The fact it follows the same design and editorial patterns as a tabloid doesn't mean it's a parody of a tabloid. A simpler conclusion would be that it looks and reads like a tabloid because it is a tabloid.
It's very common for products in any same category to be designed similarly. For example the packaging on washing detergents, breakfast cereals, and English ales often follow similar patterns because people expect their washing detergents to look like washing detergents, their cereals to look like breakfast cereals, and their beer to look like beer. Granted you do get some products that deliberately choose a non-conventional design in the hope to stand out. But generally items look similar because people expect that of them. And equally, The Register is designed like a "Red Top"[1] because people expect tabloids to look like that.
It's probably also worth noting that most "good" tabloids have a comical tone to them. In fact not taking themselves seriously is pretty much the prime directive for any Red Top. Though some take things to a more ridiculous level than others[2][3]
[1] https://en.wikipedia.org/wiki/Tabloid_journalism#Red_top
[2] http://cdn.images.express.co.uk/img/dynamic/80/590x/secondar...
[3] http://www.anorak.co.uk/wp-content/gallery/sunday-sport/bomb...
I think the crux of the argument should be "Are the stories real or made up for comical value?" Since El Reg is actually reporting real stories, I couldn't put it in the same camp as News Thump, The Onion, and the lesser known Suffolk Gazette (http://www.suffolkgazette.com/), which most definitely are parody sites.
> I guess if you are not from the UK it might not be so bleeding obvious, but for us it is. Would I be correct in guessing that you are not?
You'd be incorrect with that assumption. I wouldn't say I had a great degree of national pride, but I would say I'm very British. I drink tea, eat angus steak, drink real ales and single malt scotches, and constantly moan about queues. However I never carry an umbrella around with me. :)
A lot of news networks operate this way. Since they all often publish the same stories from the same sources, they end up competing with each other to publish the most dramatised interpretation of the facts in an effort to win rating. The Register just stands out as being one of the worst offenders (or most successful - depending on your view point).
There's plenty of other good contributors such as Duncan Campbell [0] and Alastair Daabs [1] that more than make up for the Orlowski deficit.
Also he's a climate science denier which is just so odd in the IT world since for me I always associate IT as close to science in that you must deal with reality even if you don't like it.
There are also certain things which grate rather badly with me when reading US "style" too.
For example, "Recall our previous conversation...." Use of recall in this way feels so impolite and demanding. Normal use for me would be, "You may recall our previous conversation...."
Anyway, this is not a bashing session, I just genuinely didn't find anything odd about El Reg's writing style.
Just saying to recall the previous conversation is an indicator that previous context is required.
She was a teacher, too. :(
Or some kind of bypass switch.
Or a really fancy UPS, such as might be used in a hospital or laboratory.
People here forging ahead with innovative hardware, why not just record brief details of dates and setups in the back of a diary or something. In 30 years time, you'll be able to start threads like this!
Pentium Pro 180Mhz running OpenBSD 64MB RAM with a perl BBS averaging around 10k hits / day.
Wasn't worth the electricity to run that thing. It still worked when I put it out on the corner.
http://www.digitalprognosis.com/pics/bye-bye-uptime.png
I was sad that we had to shut it down, but we had to shut it down due to migrating our primary colo to another city and were going to retire all of the hardware. I'd been manually backporting bind fixes, building my own version, and had to do some config tweaks when Dan Kaminski released his DNS vulns to the world.
It is always a sad day to retire an old server like that, but 18 years... What a winner!
Edit:
But 1158 days for an old dell 1750 running RHEL4 isn't too bad considering it serviced all kinds of external dns requests for the firm. Its secondary didn't have the uptime due to constant power issues in the backup datacenter and incompetent people managing the UPS.
The last blackout I personally saw was in 2006, the famous one which killed half of Europe's grid.
With average yearly downtime of 17min, it's not hard to find places that had no downtime for decades.
Situation is a bit different in America
> Twenty eight seconds later, an electrical blackout had cascaded across Europe extending from Poland in the north-east, to the Benelux countries and France in the west, through to Portugal, Spain and Morocco in the south-west, and across to Greece and the Balkans in the south-east.
https://en.wikipedia.org/wiki/2006_European_blackout
There were even some TV documentaries about it, and in some areas it continued for days.
Considering that the datacenter it was in is now the Dropbox office, I'm guessing it had to be shut down and moved at some point, but 2+ years seemed like a really long time even then!
FreeBSD is just really good at lasting forever.
In my experience, the past decade has been a time of trying to be more rigorous than ever about regular patching, routine reboots, and respinning VMs to ensure that your provisioning systems work as intended, so you never again end up with these monolithic irreplaceable systems.
These days, the only time I find servers with big uptimes is when they've been neglected -- they're some old bastard child of some former employee or the ancient rickety crap some department is too afraid to touch... And even then, it doesn't raise an eyebrow until it's 1000+ days.
In 2002 I had installed on the machines under my guard some program that reported uptime to some website. One of my machines, an SGI Indy workstation, had a high uptime, about 2 years. Then a new intern came, and we installed him next to the Indy. Unfortunately, his feet under the desk pulled some cables and unplugged the Indy and broke my hopes of records :)
When it was in the basement of my home/office, I would sometimes hear it's disks wine as I was working out (lifting weights and such). It was even in my basement through parties in my early bootstrap years.
I originally bought it to run WinNT 4.0 for a new company a friend of mine and I bootstrapped. I would guess a couple years later is when I put Slackware on it. It's running a 2.0 linux kernel. It's not exposed to the public Internet.
It use to be a local Samba, DHCP, and DNS server for the company. I eventually upgraded to new hardware and left this server around for redundant backups. I develop software so copies of my git repositories find their way onto this box each night. It is in no way relied upon other than to call upon it out of convenience if another server is down or being upgraded, etc...
At one point the box was in the basement of my home when a small amount of water got to the basement floor and because the box sat just high enough on rubber feet, no damage. Occasionally I go back there and pull the cob webs off it.
There is no SSL on it. We still telnet into it or access the SMB shares for nostalgia. It's sort of a joke in the office these days to see how long it will last or if it will simply out last us.
The UPSes pretty much keep things running for a couple hours - most of my mission critical hosting servers are are in data centers these days and for the office, our servers sit on the UPSes where at most we lose power maybe an hour every couple years in the office park. Much more often in a residential area.
When that large blackout of 2003 occurred we were down for couple days. https://en.wikipedia.org/wiki/Northeast_blackout_of_2003
A lab was decommisioning an instrument controller that had been running non-stop since they had first spun it up, fresh out of tge paking box, a decade previous.
And they had never backed up any of the data. Sure, the solution was the pretty straight forward use of a stack of floppies. It was still pretty nerve-wracking having a bunch of high-powered research scientists watching over my shoulder, "making sure" I got all their research data off the machine they were too smart to ever back up themselves. Good Times.
I set it up, threw it under a table in the corner with nothing but a power and ethernet cable, and moved on.
I was surprised when 5 years later he called to ask why it had stopped working. I told him where it was, he rebooted it, and it came back.
(My memory was a little fuzzy but I probably set it up in 2001-2002 and it ran until at least 2007-2008)
The game of one-upping doesn't raise the quality of the discussion.
- Chuck NorrisThere's no need to involve Chuck.
Reminds me of the old gag: "I've had that broom for 14 years. It's only had 2 new heads and 3 new handles."
At least the server in the original story stayed original.
It was torn down in 1916 and then a replica was built in the same place in 1919.
I know it's anecdotal, but the machine seemed to retain some core unwillingness to restart even though every piece of it had been replaced separately. I believe it was the same "broom" even though every component was different from the original.