I had (nearly) the same experience about a week ago. During compiling one
process started to grow until it occupied 99 % of processor-time. Top
showed cc1 to be the one, but after I killed cc1 it suddenly was xterm,
and after that (on the console) top itself. When tried shutdown, the
machine hang during unmounting the root-partition. After this I couldn't
reboot. It appeared, that my /bin directory had changed into a broken link
to bash (wherever that now was). After some heavily e2fscking all the
binaries where present again in lost+found, but nothing in the logs.
There is really something haunty with 3.0.31!
My System is pentium120 with 48 megs and the root-partition on /dev/hdb1.
Compiled with gcc 2.7.2.1 and the clib before .38, whatever it was
(Upgraded now).
Cheers
Peter