Mono运行c#偶发异常

写的一个负载均衡程序,在Win下运行良好,Mac和Linux下用Mono运行总会偶发一些Native异常 T.T

* Assertion at ./mono-os-mutex.h:135, condition `res != EINVAL’ not met

Stacktrace:

at <0xffffffff>
at (wrapper managed-to-native) System.Threading.Thread.SleepInternal (int) <0x00012>
at System.Threading.Thread.Sleep (int) <0x00023>
at CRI.V2.Common.JobGroup.WorkProc (int) <0x0034f>
at CRI.V2.Common.JobGroup/<>c__DisplayClass1.b__0 () <0x0001b>
at System.Threading.ThreadHelper.ThreadStart_Context (object) <0x0008e>
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x001bb>
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00033>
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <0x0005a>
at System.Threading.ThreadHelper.ThreadStart () <0x00039>
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x0009c>

Native stacktrace:

0 mono 0x001c03d6 mono_handle_native_sigsegv + 342
1 mono 0x002132a1 sigabrt_signal_handler + 145
2 libsystem_platform.dylib 0x9f760ebb _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libsystem_c.dylib 0x9f5e9a5c abort + 141
5 mono 0x003771b1 monoeg_log_default_handler + 129
6 mono 0x003772ab monoeg_assertion_message + 107
7 mono 0x0036d46b mono_thread_info_sleep + 1035
8 mono 0x002af9a1 ves_icall_System_Threading_Thread_Sleep_internal + 97
9 ??? 0x005108dc 0x0 + 5310684
10 mscorlib.dll.dylib 0x0196dba4 System_Threading_Thread_Sleep_int + 36
11 ??? 0x0050eee0 0x0 + 5304032
12 ??? 0x0050e9b4 0x0 + 5302708
13 mscorlib.dll.dylib 0x0196cf3f System_Threading_ThreadHelper_ThreadStart_Context_object + 143
14 mscorlib.dll.dylib 0x0196b4ec System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 444
15 mscorlib.dll.dylib 0x0196b324 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 52
16 mscorlib.dll.dylib 0x0196b29b System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 91
17 mscorlib.dll.dylib 0x0196d06a System_Threading_ThreadHelper_ThreadStart + 58
18 ??? 0x0050e965 0x0 + 5302629
19 mono 0x00106487 mono_jit_runtime_invoke + 951
20 mono 0x002deb26 mono_runtime_invoke + 150
21 mono 0x002e427c mono_runtime_delegate_invoke + 92
22 mono 0x002b59f5 start_wrapper + 693
23 mono 0x0036f9bd inner_start_thread + 349
24 libsystem_pthread.dylib 0x9f76a11b _pthread_body + 184
25 libsystem_pthread.dylib 0x9f76a063 _pthread_body + 0
26 libsystem_pthread.dylib 0x9f76993e thread_start + 34

Debug info from gdb:

xcode-select: error: no developer tools were found at ‘/Applications/Xcode.app’, and no install could be requested (perhaps no UI is present), please install manually from ‘developer.apple.com’.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>