Not a good idea

This morning I was investigating a problem at a customer site where their Manager (a program I wrote most of) is hanging. Thanks to “kill -3 pid” I discovered it was building a tool tip. Thanks to a database query, I found that the tool tip it was building was trying to display 430,000+ identical date ranges. Hmmm, looks like we’re going to be a while, and probably a little short of screen real estate at the same time.

I did a few database commands to remove the 430,000+ records and put back one copy of it. (I’m sure somebody has a command that will do both in one step – I did a “delete” followed by an “insert” because I’m lame.)

The Field Engineer at the customer site wrote to ask if I could tell him the database commands in case this happens again. I politely declined. I told my boss that this would be somewhat like giving handguns and tequila to a bunch of 9 year old boys. Repeat after me:

I’m sorry, you appear to have totally hosed the database. You’re going to have to wipe the database and re-injest all your content. You’ll probably be up and running again in two days or so.

Spoke too soon

Yesterday I wrote that I’d turned off the old machine for the last time. Well, it turns out I was wrong. I had put the mp3s in the wrong location, and had the permissions wrong, and so the backup script’s rsync deleted the mp3s from the wrong place and then couldn’t write them to the correct place. Which meant that this evening I had to turn the old machine back on, copy the mp3s back over (only having to reboot the old machine twice as it froze up under heavy load as it is prone to do) and then shut down the old box once again. Now that that’s done, I have to re-import my iTunes library, which will undoubtedly continue long after I’ve gone to bed tonight.

On the plus side, though, I managed to get the UPS software NUT installed and working. My new box doesn’t have a serial port, which means I had to use the USB driver for the first time. The kernel first identifies the UPS as a X Box controller (xpad), but eventually the newhidups driver figured it out.

More ubuntu weirdness

  1. Ubuntu is set up to use anacron, but the /etc/crontab is set up to not run the /etc/cron.daily stuff if anacron is installed by surrounding the normal “run-parts /etc/cron.daily” with “test -x /usr/sbin/anacron || ()”. Which is unnecessary because there is already a “0anacron” file in /etc/cron.daily to update the anacron timestamp if it’s being run out of cron instead of anacron. This means that there is no way I can get the /etc/cron.daily stuff to run at night when the system is idle instead of at 7am when I’m reading my morning email. I had to change the runtime in /etc/crontab to 3am, and delete the anacron checking. We’ll see tomorrow if that helps.
  2. Ubuntu installs findutils and slocate. findutils has an /etc/cron.daily job called “find” that runs updatedb. slocate installs its own updatedb and moves the findutils one to updatedb.notslocate. It has an /etc/cron.daily job called “slocate” that also runs updatedb. The slocate deb file moves /etc/cron.daily/find, but instead of doing something useful like moving it where it won’t get executed, or updating it so that it runs the findutils version of updatedb, it just renames it to /etc/cron.daily/find.notslocate. So slocate’s updatedb gets run twice every night. That’s pretty useless.

I’m getting the impression that Ubuntu, in spite of all the hype, is a pretty damn amateurish operation.