I need to debug a kernel panic and the current information in the kernel panic log file is insufficient.

The only information available on that matter is in the following link: https://developer.apple.com/library/mac/technotes/tn2004/tn2118.html

but it talks about creating a server for core dump and it must be done locally (user's computer). Both Windows and Linux support local dump file.

So, is there a way to generate a kernel core dump file after a kernel panic occurred on OSX?

  • Using dtrace is the simplest avenue, but the article you linked to lists several ways to generate kernel dumps. sudo dtrace -w -n "BEGIN{ panic();}" Happy debugging – bmike Mar 10 '14 at 12:44
  • I need a way to generate a kernel core dump file, not the kernel panic. For this I have many ways, planned or not :) – mrdvlpr Mar 10 '14 at 12:54
  • What do you expect to be in the dump file if no actual panic gets triggered? (Assuming it is a file you can debug. You'll probably want to edit your question to explain what precisely you are looking to do.) – bmike Mar 10 '14 at 13:11
  • 2
    Most operating system allow you to dump the entire memory space of the kernel. OSX only provides you a way to dump it into a server instead of a local file (I understand their motive to protect the HD). I thought perhaps someone might have a solution for this, but it does not seem to be the case. – mrdvlpr Mar 10 '14 at 13:32
  • 1
    en.wikipedia.org/wiki/Core_dump Windows has the ability to dump the entire kernel memory to a file. And it's an ability I need in order to debug an abnormality in my code. OSX supports such behaviour (dumping kernel memory) by using a remote server. I thought perhaps it will be possible to dump it to a file in the paniced machine. However, looking through the kernel panic source code in xnu, it is not possible. – mrdvlpr Mar 10 '14 at 15:29

You must log in to answer this question.

Browse other questions tagged .