[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[humorix] Kernel Hackers: Detectives For A Day



Kernel Hackers: Detectives For A Day
December 4, 1999

Disaster struck Augusta, Maine yesterday when a
mission-critical Linux server crashed and died
unexpectedly.  The tragic incident prompted Linus
Torvalds,  Alan Cox, and other kernel hackers to
immediately fly to Augusta on charter flights to
investigate the cause of the computercide.  "I've never
heard of a Linux box biting the dust like this," Torvalds
said.  "I had to find out what caused this freak mishap."

The tragic incident occured in the Computer Science Lab of
Maine University yesterday morning.  The Linux server, used
by students in CS235 ("Non-Microsoft Operating Systems")
and CS315 ("Advanced ed & vi", a five-hour course), crashed
unexpectedly, and then refused to boot.  Word quickly
spread throughout campus of the tragedy, and a crowd of
onlookers and gawkers quickly assembled near the lab.  The
CS faculty moved the dead machine to another room,
replacing it with a rectangular chalk outline, and they
surrounded the disaster area with police tape.

The kernel hackers arrived that afternoon.  A goon from the
Department of Public Safety, trying unsuccessfully to break
up the crowd of gawkers by yelling, "Move along! There's
nothing to see here!", obstructed the new arrivals.  "Who
are you?  Where's your ID card?  If you're a guest, you
need to register," he demanded of Linus Torvalds.  However,
one of the students recognized the hackers and shouted,
"Look!  That's Linus Torvalds and Alan Cox!"

Several dozen CS majors surrounded the kernal hackers and
demanded autographs from their idols.  Even a few CS
professors joined in.  "Wow, this is what I call tech
support!  If you have a major problem with Linux, the head
gurus themselves will show up personally to provide
assistance. Mr. Jesse "Linux-Is-Unsupported" Berst can bite
me," Professor Gruhenwald said.

Eventually the commotion died down and Torvalds & Co. were
able to sit down in front of the dead machine and perform
an autopsy. They opened the case up and were shocked to
discover that the Intel CPU had melted.  "I've always joked
about how you can fry eggs on a Pentium, but this is
ridiculous," Stephen Tweedie said.

The rest of the machine appeared to be intact.  Cox
unplugged the hard drive and installed it in another nearby
machine, hoping that the drive's logfiles might provide
some clue as to what happened. The final entries in
/var/log/messages provided no help.  The Kernel Krew
grepped the entire drive for clues but came up empty
handed.

The group discussed the situation and Alan Cox threw out
possible theories. "Maybe it was the Slashdot Effect.  Or a
Denial Of Service Attack. Or cosmic rays.  Or a Big
Uncontrolled Singularity.  At any rate, we've got ourselves
a bona fide mystery.  Torvalds responded, "Dammit, Cox, I'm
a kernal hacker, not a detective!"  

And then, an epiphany hit Linus.  He'd solved the mystery. 
Just like Sherlock Holmes could take a few trivial clues
and deduce that the butler did it with a knife in the
Conservatory, he had pieced together the mystery.  Torvalds
suddenly announced, "This was not a random kernel bug or a
hardware fault.  Somebody committed murder."

"I remember seeing a file called crash.c in a student's
home directory," he said to the other stunned hackers and
professors.  Sure enough, the file, found in
/home/student153, was the culprit.  It contained a C
function called guess_what_this_does():

void guess_what_this_does()
{
   char *p = malloc( 1024 * 1024 );
   fill_it_with_crap( p );
   dump_crap_out_to_disk( p );
   guess_what_this_does();
}

"Hmmm... a recursive function that eats up memory, CPU
time, and disk space. Probably every teenage hacker writes
one of these just to see what will happen," Cox said. 
"But, why would something like this crash the machine?
We're not dealing with Windows here, Linux should be able
to handle this. When the system runs out of memory, malloc
returns a null pointer and the program segfaults.  No harm
done.  So what happened?"

Tweedie chimed in, "This recursive program ate all of the
CPU time, causing the Pentium to overheat.  The darn thing
got too hot and melted. We've solved the mystery. 
student153 committed the computercide."


---

James S. Baughn
http://i-want-a-website.com/about-linux/
-
Humorix:      Linux and Open Source(nontm) on a lighter note
Archive:      http://humbolt.nl.linux.org/lists/
Web site:     http://www.i-want-a-website.com/about-linux/