 |
 |
How can I deliberately cause a kernel panic?
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Yes, I'm serious about this. I'd like to know a simple way to induce a KP with software.
I remember there was a shell command in 10.2 that would cause a KP, but it was fixed in 10.3 IIRC. Does anybody know of such a command or an app that would allow me to induce KPs on a CD MB?
And before you post something like "<gasp>Why??? ", here's the deal. I'm trying to understand an issue with an iSight of one of our MBs here. Its iSight stops working every once in a while and all software repair attempts have failed. AHT reports no errors though. Interestingly enough we noticed the iSight started working again after a KP. We would like to reproduce this to see if it was just a coincidence.
|
|
•
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2004
Location: Portugal
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Unfortunately that didn't work.
One of the links was dead. The other one worked, but it didn't cause a KP. 
|
|
•
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2004
Location: Portugal
Status:
Offline
|
|
sorry about that, I didn't test it because I value my uptime 
I'll give you another way today.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Boot from an external hard disk and then pull its plug.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
Originally Posted by TETENAL
Boot from an external hard disk and then pull its plug.
Ouch.
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
It would probably have to be the same kind of kernel panic. They all look the same, but the underlying events might be completely different.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
Yeah - I can't recommend this as a diagnostic method. Many different things could cause a KP.
|
|
|
| |
|
|
|
 |
|
 |
|
Baninated
Join Date: May 2005
Location: England
Status:
Offline
|
|
open up the computer, and hit unimportant parts with a hammer.
perhaps you could erase some virtual memory files while it is doing stuff?
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by Chuckit
It would probably have to be the same kind of kernel panic. They all look the same, but the underlying events might be completely different.
Definitely. But only once it's been demonstrated will the user know that a KP is not going to fix his iSight.
|
|
•
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by kick52
open up the computer, and hit unimportant parts with a hammer.
How witty! Is that your way of telling us you have no clue as to how to induce a KP?
perhaps you could erase some virtual memory files while it is doing stuff?
Now that's better! But have you actually tried that? You can delete the swap files and your Mac will still run. The thing is the files aren't actually deleted even though they appear to be gone. The OS is smart enough to not allow you to really remove the files.
cd /private/var/vm
ls -al
-rw------T 1 root wheel 67108864 Jan 3 10:13 swapfile0
It's all about that "T" up there - the sticky bit.
(Last edited by Simon; Apr 28, 2007 at 03:40 AM.
)
|
|
•
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status:
Offline
|
|
How about modifying a .kext file with gibberish?
Or would that just KP at startup, hmm? I was thinking something along the lines of a corrupt extension/driver that could by loaded by, for example, plugging in a related device or launching a piece of software that attempts to communicate with it.
(Conincidentally, I'm just sitting at a Mac I'm going to wipe clean in a few hours, so maybe I'll give this a shot after the backups are all done  )
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Just write a kernel extension that tries to divide by zero or memset NULL or something.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Moving a kernel extension out of Extensions while leaving it in the extensions cache and then rebooting used to do it for me.
Note that if you do this, you'll need to use single-user mode to fix it.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2004
Location: Portugal
Status:
Offline
|
|
great find Proton!
Has anyone tested it with success?
(Last edited by Madrag; Apr 29, 2007 at 05:33 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by proton
You should be able to use kextload (as root) to load this extension and get an immediate kernel panic.
That's looking like a real winner, proton. Unfortunately I wasn't able to load the kext.
sudo kextload ~/Desktop/InstantPanic/InstantPanic.kext
Password:
kextload: extension /Users/simon/Desktop/InstantPanic/InstantPanic.kext is not authentic (check ownership and permissions)
Any ideas what's going wrong there? I tried it as belonging to me and as root:admin. No dice. It's got 755 permissions so I guess that should be ok too.
|
|
•
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I believe it's supposed to be owned by root:wheel.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by Chuckit
I believe it's supposed to be owned by root:wheel.
Tried that too. Still no dice. 
|
|
•
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|