Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious Kernel Panics



Hi Dirk,

On May 6, 2005, at 1:48 AM, Dirk Musfeldt wrote:

Maybe someone on this list is experienced in decoding this type of bug? :-)

Here's what this looks like to me:


From panic.log:

Unresolved kernel trap(cpu 1): 0x400 - Inst access DAR=0x00000000F0130F70

Instruction access exception; one cause being trying to load an instruction from an illegal address.


PC=0x00000000FFFFFFFC
Latest crash info for cpu 1:
   Exception state (sv=0x4A39CC80)
      PC=0xFFFFFFFC; MSR=0x00009030; DAR=0xF0130F70; DSISR=0x00000000;

The PC here is actually Save and Restore Register 0 (SRR0), which is set to the effective address of the instruction that the processor would have executed. If the address is a branch target, SRR0 is set to the branch target address.


LR=0xFFFFFFFF; R1=0x19D73E00; XCP=0x00000010 (0x400 - Inst access)

The link register is set to the return address following a bl (branch then link) instruction, aka a function call. Since LR is PC + 4, I believe the last instruction that ran was "bl 0xfffffffc". This in turn leads me to think that somewhere a bogus function pointer has been given to the kernel. Since you bring up USB, one possibility is that you're using asynchronous USB calls in your app and you passed a bad callback function pointer.


Since the kernel branched so far out into the weeds, it's unfortunately not possible to find the rest of the backtrace. Assuming that a callback pointer is the culprit, you could add some defensive code to test that the function pointer is say, < 0xfffff000, before passing it to USB.

      Backtrace:
         0xFFFFFFFF
Proceeding back via exception chain:
   Exception state (sv=0x4A39CC80)
      previously dumped as "Latest" state. skipping...
   Exception state (sv=0x30AB0C80)
      PC=0x90007878; MSR=0x0000D030; DAR=0xE04C7CE0; DSISR=0x00200000;
LR=0x900073F8; R1=0xBFFEDCA0; XCP=0x00000030 (0xC00 - System call)

Kernel version:
Darwin Kernel Version 7.9.0:
Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC

Hope this helps, --gc __________________________________________________________________ Garth Cummings Apple Developer Technical Support email@hidden

http://developer.apple.com/technicalsupport

Spotlight on Innovation

Worldwide Developers Conference 2005
June 6-10 in San Francisco
http://developer.apple.com/wwdc


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden

References: 
 >Mysterious Kernel Panics (From: Dirk Musfeldt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.