[Mono-osx] [Mono-dev] crash on exit with Mono 2.10.2 on Lioen
Duane Wandless
duane at wandless.net
Sat Jun 25 23:55:12 EDT 2011
It appears that:
thr_ret = pthread_cond_destroy (&_WAPI_PRIVATE_HANDLES(idx).signal_cond);
results in thr_ret == EBUSY. I modified the code like this to match the
gross hack above these lines. This prevents the crash on exit. Is this
okay?
thr_ret = pthread_cond_destroy
(&_WAPI_PRIVATE_HANDLES(idx).signal_cond);
if (thr_ret != 0)
{
if (thr_ret == EBUSY &&
ignore_private_busy_handles)
early_exit = TRUE;
else
g_error ("Error destroying
handle %p cond var due to %d\n", handle, thr_ret);
}
On Sat, Jun 25, 2011 at 12:23 PM, Duane Wandless <duane at wandless.net> wrote:
> #0 0x9001d9c6 in __pthread_kill ()
> #1 0x9aee5f78 in pthread_kill ()
> #2 0x9aed6bdd in abort ()
> #3 0x00484373 in monoeg_g_logv (log_domain=0x0,
> log_level=G_LOG_LEVEL_ERROR, format=0x540040 "Error destroying handle %p
> cond var due to %d\n", args=0xbfffe28c "\031\001") at goutput.c:134
> #4 0x004843c1 in monoeg_g_log (log_domain=0x0,
> log_level=G_LOG_LEVEL_ERROR, format=0x540040 "Error destroying handle %p
> cond var due to %d\n") at goutput.c:144
> #5 0x0044b91a in _wapi_handle_unref_full (handle=0x119,
> ignore_private_busy_handles=1) at handles.c:1154
> #6 0x0044952e in handle_cleanup () at handles.c:217
> #7 0x9aed6944 in __cxa_finalize ()
> #8 0x9aed67f2 in exit ()
> #9 0x923d9466 in -[NSApplication terminate:] ()
> #10 0x926a3335 in -[NSApplication
> _terminateFromSender:askIfShouldTerminate:saveWindows:] ()
> #11 0x92b29384 in -[NSApplication(NSWindowCache)
> _checkForTerminateAfterLastWindowClosed:saveWindows:] ()
> #12 0x92b299b5 in __-[NSApplication(NSWindowCache)
> _scheduleCheckForTerminateAfterLastWindowClosed]_block_invoke_1 ()
> #13 0x98bffe96 in _runLoopTimerWithBlockContext ()
> #14 0x98bc4586 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
> ()
> #15 0x98bc3f17 in __CFRunLoopDoTimer ()
> #16 0x98ba2f70 in __CFRunLoopRun ()
> #17 0x98ba247c in CFRunLoopRunSpecific ()
> #18 0x98ba2328 in CFRunLoopRunInMode ()
> #19 0x95ac0667 in RunCurrentEventLoopInMode ()
> #20 0x95ac7ece in ReceiveNextEventCommon ()
> #21 0x95ac7e12 in BlockUntilNextEventMatchingListInMode ()
> #22 0x923d260c in _DPSNextEvent ()
> #23 0x923d1e78 in -[NSApplication
> nextEventMatchingMask:untilDate:inMode:dequeue:] ()
> #24 0x923ce284 in -[NSApplication run] ()
> #25 0x92660f67 in NSApplicationMain ()
> #26 0x0001533a in main ()
>
>
> On Fri, Jun 24, 2011 at 6:50 PM, Duane Wandless <duane at wandless.net>wrote:
>
>> I have not run a full set of tests but using libmonosgen seems to avoid
>> the crash on exit.
>>
>> I'm compiling now on Lion to see if I can further debug the crash when
>> using libmono.
>>
>> Duane
>>
>>
>> On Fri, Jun 24, 2011 at 3:18 PM, Duane Wandless <duane at wandless.net>wrote:
>>
>>> Nothing that I can find.
>>>
>>>
>>> On Fri, Jun 24, 2011 at 3:14 PM, Geoff Norton <grompf at gmail.com> wrote:
>>>
>>>> Is there a g_error printed prior to the crash?
>>>>
>>>> -g
>>>>
>>>>
>>>> On Fri, Jun 24, 2011 at 3:12 PM, Duane Wandless <duane at wandless.net>
>>>> wrote:
>>>> > I thought it was fixed with this commit:
>>>> >
>>>> https://github.com/mono/mono/commit/2b487789c8e3dcc3fbbcb16bb0268f88718cf8d0
>>>> > However, I'm using this code and still seeing the exception. Just now
>>>> > in _wapi_handle_unref_full.
>>>> > Duane
>>>> >
>>>> > On Fri, Jun 24, 2011 at 3:04 PM, Geoff Norton <grompf at gmail.com>
>>>> wrote:
>>>> >>
>>>> >> This is fixed in git by rodrigo iirc.
>>>> >>
>>>> >> -g
>>>> >>
>>>> >>
>>>> >> On Fri, Jun 24, 2011 at 3:02 PM, Duane Wandless <duane at wandless.net>
>>>> >> wrote:
>>>> >> > I am getting this exception on exit when using Lion and running the
>>>> >> > latest
>>>> >> > 2.10.2. I've tried calling Environment.Exit(0) and
>>>> mono_jit_cleanup
>>>> >> > during
>>>> >> > app shutdown. But doing either of those leads to other exceptions.
>>>> >> > Hopefully there is a solution for this situation. Thanks,
>>>> >> > Duane
>>>> >> >
>>>> >> > 0 libmono-2.0.1.dylib 0x001da7ab
>>>> >> > mono_handle_native_sigsegv + 376
>>>> >> > 1 libmono-2.0.1.dylib 0x0023d11d
>>>> >> > sigabrt_signal_handler +
>>>> >> > 116
>>>> >> > 2 libsystem_c.dylib 0x9745059b _sigtramp + 43
>>>> >> > 3 ??? 0xffffffff 0x0 + 4294967295
>>>> >> > 4 libsystem_c.dylib 0x973ebbdd abort + 167
>>>> >> > 5 libmono-2.0.1.dylib 0x0038ad29 monoeg_g_logv +
>>>> 197
>>>> >> > 6 libmono-2.0.1.dylib 0x0038ad5b monoeg_g_log +
>>>> 44
>>>> >> > 7 libmono-2.0.1.dylib 0x00357486
>>>> >> > _wapi_handle_unref_full +
>>>> >> > 1114
>>>> >> > 8 libmono-2.0.1.dylib 0x00355404 handle_cleanup +
>>>> 199
>>>> >> > 9 libsystem_c.dylib 0x973eb944 __cxa_finalize +
>>>> 243
>>>> >> > 10 libsystem_c.dylib 0x973eb7f2 exit + 25
>>>> >> > 11 AppKit 0x97d2e38a +[NSMenuItem
>>>> >> > initialize]
>>>> >> > + 0
>>>> >> > 12 AppKit 0x97ff832d -[NSApplication
>>>> >> > _terminateFromSender:askIfShouldTerminate:saveWindows:] + 435
>>>> >> > 13 AppKit 0x9847ef90
>>>> >> > -[NSApplication(NSWindowCache)
>>>> >> > _checkForTerminateAfterLastWindowClosed:saveWindows:] + 167
>>>> >> > 14 AppKit 0x9847f5c1
>>>> >> > __-[NSApplication(NSWindowCache)
>>>> >> > _scheduleCheckForTerminateAfterLastWindowClosed]_block_invoke_1 +
>>>> 126
>>>> >> > 15 CoreFoundation 0x98ba6e96
>>>> >> > _runLoopTimerWithBlockContext + 22
>>>> >> > 16 CoreFoundation 0x98b6b586
>>>> >> > __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
>>>> >> > 17 CoreFoundation 0x98b6af17
>>>> __CFRunLoopDoTimer +
>>>> >> > 743
>>>> >> > 18 CoreFoundation 0x98b49f70 __CFRunLoopRun +
>>>> 1888
>>>> >> > 19 CoreFoundation 0x98b4947c
>>>> CFRunLoopRunSpecific
>>>> >> > +
>>>> >> > 332
>>>> >> > 20 CoreFoundation 0x98b49328
>>>> CFRunLoopRunInMode +
>>>> >> > 120
>>>> >> > 21 HIToolbox 0x96ebe4ab
>>>> >> > RunCurrentEventLoopInMode
>>>> >> > + 318
>>>> >> > 22 HIToolbox 0x96ec5d12
>>>> >> > ReceiveNextEventCommon +
>>>> >> > 168
>>>> >> > 23 HIToolbox 0x96ec5c56
>>>> >> > BlockUntilNextEventMatchingListInMode + 88
>>>> >> > 24 AppKit 0x97d27530 _DPSNextEvent +
>>>> 678
>>>> >> > 25 AppKit 0x97d26d9c -[NSApplication
>>>> >> > nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
>>>> >> > 26 AppKit 0x97d231a4 -[NSApplication
>>>> run]
>>>> >> > +
>>>> >> > 897
>>>> >> > 27 AppKit 0x97fb5f55
>>>> NSApplicationMain +
>>>> >> > 1047
>>>> >> > 28 PIX 0x0000bbf5 main + 257
>>>> >> > 29 PIX 0x000028fa start + 54
>>>> >> > _______________________________________________
>>>> >> > Mono-devel-list mailing list
>>>> >> > Mono-devel-list at lists.ximian.com
>>>> >> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>> >> >
>>>> >> >
>>>> >
>>>> >
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110625/362df944/attachment.html
More information about the Mono-osx
mailing list