Sucks 2 Be Me
Sucks 2 be me...
Just one of those days... and considering I'm banging this out at 5am, it's actually been more than a day. But I'm almost caught up with all the shite, which means a few hours of catching up on non-critical emails, a few hours of sleep and we're back in business.
I guess it wasn't as bad as it could have been, it was all my time wasted, not anyone elses, but damn has it been annoying as hell. Why did it suck? Both my iBook and tiBook just went wacko yesterday morning, with no real apparent cause...
The Powerbook was really my fault, and while I could rant and rave about OSX just having real issues under heavy load or non-ideal conditions it wouldn't really be fair as I've had similar issues with Linux (ie, log files growing over 2gigs would be one).
Basically I was trying to automate a stupid project, and bringing in a whole bunch of files from a remote server using curl (yeah I know, I couldn't have ssh or ftp access), and specifically using a feature of curl which allows you to pull in sequences of url's and files, rather than listing them all by name.
Since there were a bunch of url's and the files had sequential names... and I'd done it before (with good results), I banged it out right quick. Except that in my haste instead of a [01-1000] i ended up using 2 more zeros than needed... and in multiple URL's this translated into 600,000+ files that curl thought it was supposed to get and output to disk.
Now obviously once curl got past the 1000th file, there simply wasn't a file to get... but that doesn't stop curl, no siree bob. Perhaps if I'd typed it differently it would have just errored out, but I was just using the -O operand tacked to the end along with the function that tells curl to rename the files so I'll know where they came from based on the url.
Since it wasnt able to pull in any data, or rather it got an error message from the server, it simply output the files with the tiny amount of garbage (but named correctly, yay curl!) as it was supposed to. The problem is that OSX uses HFS+ as its native file system, and the smallest block you can have with HFS+ is 4k, so even a 100byte file will take up 4k... and with the amount of files it was trying to pull in that translated into ~5.4gigabytes.
Normally this wouldn't be a big deal, my tiBook has a 30 Gigabyte HD, of which I normally only use 50% of. But since I've been away I had a bunch of my MP3's moved onto it, but it still left me with 5 gigs... generally plenty for swapping and whatever I might need to do while I'm gone. The unique situation that came about was that I had photoshop open and working at the time with some large, layered files and it uses its own VM system and was using a large chunk of the left over space for itself... which led to the HD getting full right quick.
I knew I had a problem when I walked by to check on it and saw an OSX error message saying "You are out of memory, close programs or remove files or (insert scary warning)". Considering I hadn't seen something like that since OS9 on the mac, I got a little wigged and quickly checked the space on the HD... it said there was 250 megs, so I figured the error message was just trying to be pre-emptive and no real damage had been done. Closed everything I was working on, identified what had happened and removed the offending files. Everything seemed hunky dory, so I worked for a bit more, then restarted and was going to run fsck.
That's when the shit sort of hit the fan... I knew there was a problem with OSX where, if the OS ran low on disk space, certain system preferences might get reset, such as the download folder for your web browser, etc. But I'd never encountered it, and never heard of it being this bad.
Rebooted, ran fsck, repaired permissions while I was at it... everything was fine. Logged into aqua, and everything was reset to a virgin install of OSX.
Everything.
I wish I was exaggerating, but I'm not. Dock was completely reset. Network preferences were completely reset. All my apps lost their preferences (including registration). I can handle having to re-add my icons to the dock, but how the hell Photoshop, Dreamweaver, even something like Yahoo Messenger or iChat went virgin on me is something I just don't quite understand. Incredibly frustrating to say the least, especially since I don't just carry around my install discs or all of my email server settings.
I was able to get ahold of somoene who could get into mine for me after a few hours and give them to me via the phone, so all was not lost and it was pretty painless, if annoying...
...and then the iBook went apeshit.
Started simply enough, I had it hooked up to a firewire burner and was trying to backup some data. Got some errors about part way through, so I figured it was the media, and tried a few more times... giving the hotel some free coasters. Still wasn't working, so I tried to burn an audio CD through iTunes. Same deal- stalled halfway through. At this point I decided to repair permissions, and it found a bunch of stuff... then rebooted and tried to run fsck. Ran for a second and reported an extent error.
Now I was really annoyed, so I hooked it to the tiBook via firewire in target mode and tried to run disk first aid on it (no crossover cable or diskwarrior available, and I forgot that the tiBook's eth01 interface is auto-sensing). No luck, errored out straight quick.
So I had to copy over all the data, and do a reformat/reinstall on it, which is well, annoying as hell as the connection while not modem speed wasn't exactly speedy. Took forever for the OS install, updates and app installs... this plus the tiBook issues were not how I wanted to spend my evening.
The iBook going wacko just didn't make a lot of sense to me- nothing had happened to trigger it, and I'd just run fsck a few days before and it found no errors. Computer would boot fine, work fine, except for the burning.
Both are working fine for the moment, and I know windows has its own share of issues in the same vein... but damn, personal computers are still borderline mentaly retarded children in the grand scheme of technology.

Posted by drunkenbatman





