« Did you say sorry? | Main | Another mysterious kernel panic »

Alarming kernel panic

This morning I was flicking through a new issue of Atomic magazine. In the questions and answers section, someone asked about whether you can turn off the pagefile if you're got lots of RAM.

The answer given was along the lines of "You can, but your operating system is smart enough not to use the pagefile if it doesn't need to so there's no performance hit; and besides, without a pagefile if you ran out of RAM your computer would crash".

I don't have a swap partition.

I was just looking up pictures of Miley Cyrus (at that stage I didn't know about her more Hudgeons-esque photos, honest!) and had quite a few tabs open, when Firefox froze up and went dark. I left it be for a few seconds, hoping it would become responsive again. But instead, the Gnome panels died! Alt-F2 didn't work for "xkill" so I had to press the X on the Firefox window and wait.

After a few seconds, Compiz died and I was left without a window manager! At that stage I realised that something Very Bad was happening. I tried opening a terminal by right-clicking on the desktop and going "Open Terminal", but the Gnome Terminal never appeared.

So I killed X - control-alt-delete. When I did and was dropped to a text terminal, I found the kernel printing all sorts of messages about memory addresses - it looked like a core dump. X didn't restart. I tried switching to another terminal and logging in to look at "top" or at least find out what the hell was going on, but the kernel printed messages all over whatever terminal I was in. Eventually, I got the "Kernel Panic: Not synced - attempted to kill init!" message.

Rebooted, then tried to look at /var/log/kern.log. The logs only went to 70 seconds into the last bootup. I guess the bit about "not synced" meant that it hadn't synchronized the kernel log before it panicked.

I have a theory about what caused the problem. Some sort of errant Javascript caused Firefox to start using up massive amounts of memory. When the system's RAM usage hit 2 gigabytes, the kernel started killing the smaller programs to try and free up memory. This would explain why Gnome-panel and Compiz died - these programs don't use up much memory.

I always thought that killing X would also kill all graphical programs. Maybe this isn't inherently so - maybe killing X only kills graphical programs that are still communicating with X. Firefox had stopped communicating, so it must have still been resident in RAM after X was gone. It continued to use memory until eventually the only thing left for the kernel to kill was Init.

But killing Init crashes the computer. Why wouldn't the kernel kill Firefox instead?

The other possibility is a fork bomb - a malicious DoS attack against my computer.

But I don't have any ports poked open in my firewall, and when I went to the same websites again I haven't had any troubles. What is going on?

                            

TrackBack

TrackBack URL for this entry:
http://blogs.www.friendster.com/t/trackback/815588

Listed below are links to weblogs that reference Alarming kernel panic:

Comments

Post a comment

Post a comment

Name:

You are currently signed in as .