In any case, in ~8 years of using Linux, I don't think I've had a freeze that was the kernel and not just X.
In any case, in ~8 years of using Linux, I don't think I've had a freeze that was the kernel and not just X.
But agreed on 'just reboot': you should be using a resilient filesystem anyways, and MagicSysRq only works when it's enabked beforehand, and only for some kinds of lockups, and if the data is in the frozen application, syncing the disks isn't going to help.
Yup. Changed my GPU to nvidia, no more core lockups.
> I don't think I've had a freeze that was the kernel and not just X.
Device drivers sometimes have bugs, especially when the device is not working properly (I had system freezes when there was a misbehaving capacitor on the graphics card).
Wouldn't that make it an unsafe database server?
Edit:
Besides, hard drives have write caches, and they can report a successful write operation to the OS when the data is still in its cache physically.
Hard drivers are supposed to flush their caches before they report the end of a flush operation to the OS (some flush into flash, but they flush). If your does not, it's defective. Go ahead and make use of the warranty.
No properly configured and working ACID compliant RDBMS should lose any data when the server is reset or stopped. If it does, then it is either a problem with the hardware, OS, configuration or the RDBMS itself. The application must also be able to handle the DB disappearing, though. Sadly this is often not the case.
I remember some sort of magic invocation like that years ago for our medical "device" product we had to manage hundreds of remote node instances of. Something along those lines. I don't remember why the developer (Gabe) came up with sync three times being magic number. Maybe three times was just paranoia. =)
Somehow this advice got mutated so that you'd keep holding the keys until you heard two boot chimes (thus resetting the stuff twice). And then it started to grow. Three was common. Some people would advise more. I'm pretty sure that doing it more than once never helped anything, but there we are.
(The cmd-opt-P-R sequence still works on modern Macs and I actually used it to resurrect a machine that wouldn't start up just a month ago, but it's far less frequently needed now.)
Or the "Repair permissions" thing in OS X. You do it several times as well.
It's like whenever there's this one-step fix thing that a system utility does, the Common Man will interpret it as needing to repeat 3+ times in order for it to be effective.
"sync; sync; sync; halt"
Presumably so you had thinking time before automatically restarting a possibly sick system.
When your Sun is particularly hosed we used sync;sync;sync; halt to reset and (hopefully) not lose any data (sync forces OS write buffers to purge)
>Run it and be amazed how much your disks/raid/OS lie. ("lie" = an fsync doesn't work)
>It seems everything from PATA consumer disks to high-end server-class SCSI disks lie like crazy. Yes, that includes SATA there in the middle. I'll discuss fixing your storage components in a second.
For example, on a Linux laptop with the hard-drive encrypted with dm-crypt, I simply lost access to my drive due to repeated hard reboots. I don't know if I could have recovered my data from it or not, but after repeated attempts of googling for the error message and following advice I simply gave up and later reinstalled everything from scratch (it's a good thing I constantly make backups ;-)).
On Linux REISUB has been my friend.
anyway, someone already mentioned a few mnemonics, I learned one, a quick googling lead me here:
http://fosswire.com/post/2007/09/fix-a-frozen-system-with-th...