So, here’s a recipe for destruction:

  • Open your Windows VM you have for uni classes to write up a nice little recursive version of a simple algorithm.
  • Put some printf statements there for debugging too. Should look something like this:
int eukleid(int x, int y)
{
    printf("%10d %10d", x, y);
    if(y=0) return x;
    else return eukleid(y, x%y);
}
  • Fail to notice that y=0 instead of y==0 sends your program to endless recursion
  • After 10 minutes of crashing in Windows, decide that, what the hell, I’ll try it in my linux machine.
  • Compile program
  • Instead of running in a shell, double click the executable in nautilus by negligence.
  • Watch your /home partition run out of space in seconds!!!!

Now, what happened is that stdout and stderr of programs started outside a terminal get logged in .xsession-errors. The recursion shouldn’t have gone forever, but, by some strange bad luck, it filled up what was left of my 5GB headspace I had in /home

Not finding the culprit at first glance, I decided to close all programs and restart to single-user to look into it. Unfortunately, closing the VM meant virtualbox trying to update the VM’s xml file. THAT didn’t go well.

So, I was left with an unusable VM which took me a couple of hours to restore to some working condition.

Hey, it could have been worse! All the other programs (firefox, thunderbird to name a couple) handled the problem nicely. And thank Cthulu I had a separate partition for /home. Can’t imagine the mayhem if the root partition had zeroed out.

But everything is swell! I now know a couple tricks more than yesterday and opportunities like this don’t come everyday 😉 Such is the mantra of a troubleshooter soul like me! =)

Nick

Advertisements