My back spasmed up in the middle of the night. Actually, it was about 5:30am so I just got up. But because I’m working on my Functional Spec, instead of spending the day lying down to relieve the pain, I’m going from chair to chair trying to find a comfortable position to type.
Category: Geekery
Stupid DVD drive, semi-stupid SpamKarma2
The DVD drive in my Powerbook has been a pain in the ass. It frequently refuses to eject a disk in the drive completely, sometimes showing me just a sliver of the disk which if I’m sufficiently alert I can grab before it gets sucked back in, and sometimes refusing to show anything before it acts as if it had just been re-inserted and mounting it again. Last time I took it to Apple, they replaced the drive under Apple Care, but said that because the laptop’s case has a bit of a dent in it, next time it happens they’re not going to cover it because it’s probably caused by damage to the frame of the case. (Yes, I admit I’ve dropped the laptop a few times. Being a geek means being hard on equipment.[1])
I got a couple of multi-disk audiobooks for Christmas, and I’m in the process of ripping them to MP3 so I can listen to them on my iPod. But in the 6 disks that I’ve ripped so far, I’ve had the computer pull the “Here’s a sliver, and there it’s gone again” trick several times, it’s locked up ripping a track once, and iTunes has gone into a “Not responding” state 3 times. I’ve had to reboot three times so far, two of those times I’ve had to use the power switch to reboot because iTunes wouldn’t quit. This last time I rebooted it, neither Finder, iTunes, nor Disk Utility will recognize that there was a disk in the drive. But it’s there, all right. I can just see it if I pry the disk slot open a little. Oh well, time to reboot into OpenFirmware and try the eject command there. But if I remember the last time correctly, that won’t work either. And then it’s back to the Apple store to price out a new case and frame for an “obsolete” Powerbook.
In other stupid news, I use SpamKarma2 to protect this blog against spam. I also recently started to use Akismet, but I think SK2 does a good job so I’m reluctant to switch entirely over to Akismet, in spite of the fact that SK2 isn’t actively maintained any more and doesn’t work well with the OpenID plugin. Every day SK2 is supposed to send me an email telling me how many spams it caught since the last report, and whether any have a score between 0 and -20 (which means it flagged them as spam, but it’s not 100% sure). I click the link, look at those doubtful ones, and then tell it to purge everything. For some reason, it doesn’t come the same time every day – I think it’s on a 25 hour cycle. Last night, for some bizarre reason, it sent me 5 copies of the daily report, all within minutes of each other and all identical. Strange. It’s not even like there was a time change or end of the month or something that would explain it.
Footnote [1]: Let me explain the logic behind that statement. Geeks are hard on equipment because they need to have it around all the time, which means that laptops don’t get put in fancy padded sleeves or left on desks, they get balanced on the arms of chairs or put on the floor sideways with the hinge open, with power cords running across the floor where they can be tripped over or run into by small dogs. iPods and cell phones get crammed into your pockets instead of living in some nice padded case or locked in a desk drawer, which means they fall out when you reach into your pocket to get your keys out (said keys also scratching the screens and doing other damage), and in one case, even falling in the toilet when they fall out of your pocket as you’re putting your pants back on. Keyboards accumulate crud because you don’t put them aside to eat, and TiVos and desktop computers never get their cases screwed back on because you’re always opening them up to do yet another upgrade or using them to do other work.
Upstairs TiVo upgraded without a hitch
Ok, a few weeks ago I bought a 320Gb drive to upgrade my upstairs TiVo, and discovered that although I had rejected a couple of earlier bargain drives because of it, this time I’d forgotten to check it was SATA or not. But then my coworker Rob pointed me towards satacables.com, where they sell a little adaptor doohickey that you slap on the back of a SATA drive and it can be plugged into an IDE cable and Molex power connector. Nifty.
Continue reading “Upstairs TiVo upgraded without a hitch”
Today’s physics discovery
“Friction makes me hot!”
Weird one
A week or two ago, somebody from customer support came to me because certain customer sites were having some weird problems – some sites weren’t seeing new content even though it had been delivered and couldn’t update their schedules. She reported that restarting our services fixed it on most sites, but on one she’d had to reboot. Unfortunately the wasn’t anything obvious in the logs. The weird thing is that she said that the problem started with our content provider moved to the new servers – but the content provider says that they didn’t change what they were sending, just what servers they were sending it from.
After a few days, she managed to find one site that still having the problem, and I poked around and still couldn’t find much, except for the fact that if I went into the postgres command line, psql, it would allow me to do anything on the database except query one particular table. If I tried to do anything on that table, it would freeze up. Hmmm. Lacking any other ideas, I shut down the database server and restarted it, and that cleared up the problem. But shutting down the database server also kills off any processes that might be using the database. I was starting to think that two processes were in a deadlock over this one particular table. I filed away the information and asked for her to call me if it happened on any other sites.
This morning, she comes and says it’s happened on several sites at once. She logged me into one of the sites, and sure enough psql would block if I tried to select from that same damn table. Time to dig a little deeper. “select * from pg_locks” showed a couple of exclusive locks. Hmmm. Doing a “ps auwwfx” showed that there was a vacuumdb going on. Oh oh. It’s the nightly backup scripts. A couple of years ago (21Sep2005), I threw a call to “vacuumdb –analyze –full” in there. A bit of googling showed that duh, you’re not supposed to do a “–full” when anything else is going on because it does an exclusive lock on full tables. And JDBC has to take some sort of weird work-around for the fact that Postgres doesn’t give them an easy way to turn autocommit on, so they do the equivalent of a “commit;begin;” after every command. And this causes some locking of its own to go on which is clashing with the vacuumdb locking.
In all this time, it’s never caused any problems, or at least none with any regularity, but evidently the server relocation has caused some content ingestion to happen at the exact time this vacuumdb is going on, and causing these particular sites to have semi-regular problems.
I told them to go around to all the customer sites and edit /etc/init.d/backup_cos_files and remove the “–full” from the vacuumdb command line, and all should be well. I can’t believe I made such a dumb mistake, and that it didn’t cause any problems until now. Actually, I’m sort of hoping it will solve my other mysterious database lock up that was only happening about once a year per site. But that’s probably too much to hope for.