Re: further help on debugging a hang
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VulA9Tds3Uo/+sJYNBPu++N25/2043t/mJxtw/mouUFnTHQUGXcdOFHUXSjIn808xke1/XFRqyxXjiBe22AvhKBIYXpI0N7C5JvEsKJOcpMfvBelLBYnQuxMeu3FtnLlpAS+DUZGcll/62WdhORnrL8ZnPAFcpgvJvwwhMhOAAE= When it hangs, NMI the machine to dump core. This assumes you have the boot-args set as sudo nvram boot-args="debug=0xd44" or equivalent, as documented in Apple's technical note. Once core is dumped, reboot the machine. You can tell when the coredump is finshed because you will see the message "waiting for some to attach" or equivalent. (see support.apple.com and search for "NMI" to see what the NMI key combinations for your machine are.) Now that you have the core file, it will be named something like core-xnu-792-XX.XX.XX.XX-xxxxxxxxxx where the XX.XX.XX.XX.XX is the IP address of the machine you are trying to debug, and the other x's are hexadecimal. Download the kernel debug kit for 10.4.8 from developer.apple.com/sdk. Open gdb and pass it the "-c" option, using the mach_kernel from 10.4.8 as the other argument. gdb -c core-xnu-792-XX.XX.XX.XX-xxxxxxxxxx mach_kernel (gdb) source kgmacros (gdb) showallstacks look for stacks which have I/O pending (you should see something related to the ACARD kext if your theory is correct.) You can add symbols for the ACARD kext by the following complicated process: (gdb) showallkmods find the ACARD kext, look in the second column for the address where it is loaded. (I downloaded the latest driver from http://dl.acard.com/download/mac/ACARD_Driver_1.5.7.pkg.sit) to get the following information. The driver is com.acard.driver.ACard68xxM In a different terminal window, enter the command mkdir ~/Desktop/gg kextload -a com.apple.iokit.IOPCIFamily@0x123456 -a com.apple.iokit.IOSCSIFamily@0x234567 -a com.acard.driver.ACard68xxM -s ~/Desktop/gg -- /path/to/ACard68xxM_driver.kext this will generate the symbol files. Now in gdb, add them with (gdb) add-symbol-file ~/Desktop/gg/com.acard.driver.ACard68xxM.sym and entering "yes" when prompted. Now, you do the hard part. You debug. You debug. You debug. Good luck. Remember, all of this is from memory, not from trying it myself. Your experience may vary. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On 12/12/06, Giuliano Gavazzi <dev+lists@humph.com> wrote: What course of action would you take to debug it? This email sent to site_archiver@lists.apple.com
participants (1)
-
Brian Bechtel