Re: Crashes in _Unwind_Resume
Re: Crashes in _Unwind_Resume
- Subject: Re: Crashes in _Unwind_Resume
- From: Greg Parker <email@hidden>
- Date: Wed, 25 Aug 2010 13:05:14 -0700
On Aug 24, 2010, at 7:02 AM, Benjamin Rister wrote:
> We’ve started seeing sporadic but regular crashes from _Unwind_Resume in a Foundation tool. The crashing thread is:
>> Thread 0 Crashed: Dispatch queue: com.apple.main-thread
>> 0 libSystem.B.dylib 0x00007fff87e363d6 __kill + 10
>> 1 libSystem.B.dylib 0x00007fff87ed6972 abort + 83
>> 2 libSystem.B.dylib 0x00007fff87e56972 _Unwind_Resume + 66
>> 3 com.apple.CoreFoundation 0x00007fff86e43a91 CFRunLoopRunSpecific + 1153
>> 4 com.apple.CoreFoundation 0x00007fff86e435d6 CFRunLoopRun + 70
>> 5 net.decimus.Synk.Engine 0x00000001000014bb main + 615
>> 6 net.decimus.Synk.Engine 0x000000010000124c start + 52
>
> The other threads aren’t doing anything noteworthy and are just sitting idle, but I’ll include the whole crash log below for completeness.
>
> It’s obviously involved with exception handling, perhaps an uncaught exception, except that we’re not getting any of the usual information in the crash log that we typically do with an Obj-C exception. From my web searches, I suspect something C++ is the culprit, but because we have zero C++ code of our own in this binary, I have no idea where the problem could be or how to do anything about it.
It's definitely an uncaught exception. On 64-bit Mac, Objective-C exceptions use the same machinery as C++ exceptions.
It's crashing after running an @finally block in CFRunLoopRunSpecific(). The exception unwinder is trying to find the next exception handler on the stack, but getting confused when it tries to do so. This is not the usual uncaught-exception path; usually the unwinder recognizes when it runs out of recognizable stack frames.
One possibility is that the unwind info for your main() was compiled incorrectly somehow. Another is that the unwinder's data structures were hit by a memory smasher.
You might try installing an @try/@catch block in main. If the unwinder is working long enough to get there then you can log something to help debug further. You can use `@catch (NSException *e)` to check for Objective-C exceptions and `@catch (...)` to check for C++ exceptions.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden