A thing I don't like about Linux

So much for my nice uptime . As I wasbrowsing along in Firefox, the X server crashed. (The crash was forthe usual reason: trying to display some characters in some fontsgives the X server a signal 11 heartburn. Ever once in a while, I'llstumble over a web page that nails just the right combination.)

A crashed X server doesn't take the system down on the spot, but onLinux it makes the console pretty much unusable because the X serveris the


What Python threads are good for

Because of the sometimes much-maligned Global Interpreter Lock, purePython code itself can't run simultaneously on multiple CPUs. So whatshould you use Python threads for?

The real use for Python threads is turning synchronous functions inextension modules into asynchronous things that don't delay your mainprogram. Often these functions have no asynchronous equivalents (unlikenetwork IO), so it is either use threads or have your main programdelayed. This works for sufficiently compute-intensive functions as wellas functions, like socket.


Waiting for both network IO and inter-thread notifications

People doing lots of network IO in threaded programs have historicallyhad a problem: waiting for both network IO and for IPC from threads atthe same time.

Generally you want to wait for network IO using select() or poll() ; trying to use lots of threads, each doing one blocking IOoperation, is usually catastrophic to your performance. But both ofthese only wait on file descriptors, and inter-thread communication inlibraries is almost always implemented with mutexes, semaphores,queues, and so on,


Weekly spam summary on December 10th, 2005

Once again I'll lead with Hotmail's spam numbers, because theycontinue to be bad:

  • one email accepted (probably spam).
  • 218 messages rejected because they came from non-Hotmail emailaddresses.
  • 111 messages sent to our spamtraps.
  • 30 messages refused because their sender addresses had already hitour spamtraps.
  • 5 messages refused due to their origin IP address (all for being inthe SBL).

Now, on to the general numbers.

This week we received 17,2


How not to set up your DNS (part 6)

Today's illustrative example is about the odd things that can happenif you rename a nameserver without making sure that you tell thepeople delegating zones to you.

There are four nameservers for utoronto.ca : ns1, ns2, bay.cs, andns1.tpc.int (following local practice, I'm dropping the .utoronto.ca bit a lot). Three of those four (everything except ns1) are alsosecondaries for all campus subdomains, including the domain jpint.utoronto


Security versus resilience

A while back I wrote this , about an exceptioncreated by the cgi module when crackerssubmitted XML-RPC calls instead of form POSTs. It makes a great examplefor discussing the difference between 'secure systems' and 'resilientsystems'.

Put broadly, security is keeping people out, while resilience iskeeping operating when people attack you. The cgi module example shows that you can haveone without the other. Sometimes this may even be deliberate;an exceptionally paranoid system could shut itself down anytime it saw unexpected


A surprising hazard of running as root all the time

We have some machines that are 'no user-operable parts inside'setups; as part of that, they have no user logins, just root . (Yes,yes, running as root all the time is bad, but on these boxes almostall we'd ever do with a plain login is su to root.)

I'm attuned to all of the regular hazards of this, but today Istumbled over a new one: how long it takes to notice that /var hadaccidentally wound up


How not to set up your DNS (part 5)

This one is partly my fault, due to me inheriting responsibility formanaging DNS for this organization. (Needless to say it's fixed now,but it gives me a useful cautionary example.)

This won't be presented in illustrated form, because it's simplerto just explain the problem. All of this is for the domain transportationtomorrow.on.ca .

  • according to the .ca nameservers, the nameservers for the domainare ns1.jpint.utoronto.ca and mto.jpint.utoronto

Google Desktop and conditional GET

Some people using Google Desktop have been pulling my syndicationfeeds recently, which gives me the opportunity to see how well GoogleDesktop implements conditional GET .Unfortunately, the results are either mixed or unclear.

(At this point I have to repeat the disclaimer from my earlier entryabout this: I like having readers and we have a lot of sparebandwidth. This is absolutely not a request for people using GoogleDesktop to stop reading my feed.)

Google Desktop appears to sometimes but not always send (valid)If-


How not to set up your DNS (part 4)

Presented in the traditional illustrated form:

; dig +short mx mail2world.com.10 publicms2.mail2world.com.10 publicms1.mail2world.com.; dig +short a publicms1.mail2world.com.216.163.188.54; dig +short a publicms2.mail2world.com.216.163.188.54

That's an