Difference between revisions of "Panic"

From OpenZFS on OS X
Jump to: navigation, search
(panic)
 
m
Line 25: Line 25:
 
   
 
   
 
       Kernel Extensions in backtrace:
 
       Kernel Extensions in backtrace:
         net.lundman.spl(1.0)[7F69C13B-C730-3475-99E9-53861AC6C54E]@'''0xffffff7f85d2a000'''->0xffffff7f85d36fff
+
         net.lundman.spl(1.0)[7F69C13B-C730-3475-99E9-53861AC6C54E]@0xffffff7f85d2a000->0xffffff7f85d36fff
 
         net.lundman.zfs(1.0)[5637421D-EE17-33F1-ACB2-8FA38BC5A5A6]@'''0xffffff7f80d54000'''->0xffffff7f85f38fff
 
         net.lundman.zfs(1.0)[5637421D-EE17-33F1-ACB2-8FA38BC5A5A6]@'''0xffffff7f80d54000'''->0xffffff7f85f38fff
  
 
We can then run the command
 
We can then run the command
  
   # xcrun '''atos''' -arch '''x86_64''' -o ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs -l '''0xffffff7f80d54000'''    0xffffff7f80dcf760 0xffffff7f80dcf423 0xffffff7f80dc491a  
+
   # xcrun '''atos''' -arch '''x86_64''' -l '''0xffffff7f80d54000''' -o ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs   '''0xffffff7f80dcf760 0xffffff7f80dcf423 0xffffff7f80dc491a'''
 
  got symbolicator for ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs, base address 0
 
  got symbolicator for ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs, base address 0
 
  spa_taskqs_init (in zfs) (spa.c:888)
 
  spa_taskqs_init (in zfs) (spa.c:888)
 
  spa_create_zio_taskqs (in zfs) (spa.c:972)
 
  spa_create_zio_taskqs (in zfs) (spa.c:972)
 
  spa_activate (in zfs) (spa.c:1094)
 
  spa_activate (in zfs) (spa.c:1094)
 +
 +
Which can be repeated for spl, and spl load address as well, if needed.

Revision as of 01:31, 17 March 2014

Kernel panics

One of the most useful settings to assist with debugging is telling Darwin kernel to keep the symbols from kexts. This can be set using the nvram command, and requires a reboot.

First check to see if you have any special boot-args set and add the new keepsyms instruction.

# nvram boot-args="keepsyms=y"

and reboot the machine for it to take effect.


Panic decoding

If you get a panic but you do not have symbols enabled, it can be decoded using the atos command.

In a standard panic log, you will see something like:

# cd /Library/Logs/DiagnosticReports/
# less Kernel_2014-03-13-093629_OSX109.panic
Backtrace (CPU 0), Frame : Return Address
0xffffff8088843b10 : 0xffffff7f85e25759  : 0xffffff7f80dcf760 
0xffffff8088843b40 : 0xffffff7f85e25560  : 0xffffff7f80dcf423 
0xffffff8088843be0 : 0xffffff7f85e08f27  : 0xffffff7f80dc491a

      Kernel Extensions in backtrace:
        net.lundman.spl(1.0)[7F69C13B-C730-3475-99E9-53861AC6C54E]@0xffffff7f85d2a000->0xffffff7f85d36fff
        net.lundman.zfs(1.0)[5637421D-EE17-33F1-ACB2-8FA38BC5A5A6]@0xffffff7f80d54000->0xffffff7f85f38fff

We can then run the command

 # xcrun atos -arch x86_64 -l 0xffffff7f80d54000 -o ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs   0xffffff7f80dcf760 0xffffff7f80dcf423 0xffffff7f80dc491a
got symbolicator for ../zfs/module/zfs/zfs.kext/Contents/MacOS/zfs, base address 0
spa_taskqs_init (in zfs) (spa.c:888)
spa_create_zio_taskqs (in zfs) (spa.c:972)
spa_activate (in zfs) (spa.c:1094)

Which can be repeated for spl, and spl load address as well, if needed.