Then I noticed that my Ubuntu 10.04 machine exhibits hard-lock like symptoms anytime I make -j. I know approximately what the problem is: the kernel scheduler isn't giving enough time to the UI while it does this, but, even with source, it isn't something I can fix trivially. Just reading the source and seeing where it happens doesn't do anything to make me feel better. It shouldn't ever happen. Period.
Try upgrading to the latest version of Linux (or just upgrade your entire Ubuntu distribution). This problem was fixed by a tweak to the scheduler that creates a scheduling group for each pseudoterminal. For that matter, you probably shouldn't use make -j anyway, since AIUI it just forks until it can't anymore, and doesn't pay any attention to how much RAM gcc/g++ is using. I use make -j [ncpus] instead, which is very nearly optimal (and is optimal with the BFS scheduler).
Try upgrading to the latest version of Linux (or just upgrade your entire Ubuntu distribution). This problem was fixed by a tweak to the scheduler that creates a scheduling group for each pseudoterminal. For that matter, you probably shouldn't use make -j anyway, since AIUI it just forks until it can't anymore, and doesn't pay any attention to how much RAM gcc/g++ is using. I use make -j [ncpus] instead, which is very nearly optimal (and is optimal with the BFS scheduler).