[Mono-bugs] [Bug 546569] New: Crash after AsyncCallback to Socket.BeginReceiveFrom

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 13 12:17:33 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=546569


           Summary: Crash after AsyncCallback to Socket.BeginReceiveFrom
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: ed at anuff.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I'm having a crash with MonoTouch 1.1 that wasn't happening with 1.03.
 No changes in my code other that to recompile with 1.1, and if I
reinstall 1.03, my app works again without any problems.

Compiling with --nolink resolves the problem.

A call is made to a udp socket with Socket.BeginReceiveFrom.  The AsyncCallback
passed to Socket.BeginReceiveFrom is called and completes without problem but
after the callback returns the crash occurs.  This is on the first packet being
received.

I am unable to carve out a simple repro, if this information isn't sufficient
for figuring out why it's happening, I will need to provide my project along
with login credentials for the tester.  I'm not sure how to add a private
upload to bugzilla.

Stacktrace:


Native stacktrace:

    0   TouchClient                           0x000930ea
mono_handle_native_sigsegv + 266
    1   TouchClient                           0x000066fa
mono_sigsegv_signal_handler + 298
    2   libSystem.B.dylib                   0x9695fb9b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   TouchClient                           0x001882e1 async_invoke_io_thread
+ 881
    5   TouchClient                           0x0018fd36 start_wrapper + 326
    6   TouchClient                           0x001c43c6 thread_start_routine +
166
    7   TouchClient                           0x001eea08 GC_start_routine + 107
    8   libSystem.B.dylib                   0x96926f39 _pthread_start + 345
    9   libSystem.B.dylib                   0x96926dbe thread_start + 34

Debug info from gdb:

warning: Trying to remove a section from the ordered section list that did not
exist at 0x2d5000.
warning: Could not find object file
"/var/folders/dM/dM7wqzvNEcW9Hwy8Gh3cDE+++TI/-Tmp-/tmpce3eb06.tmp/main.o" - no
debug information available for
"/var/folders/dM/dM7wqzvNEcW9Hwy8Gh3cDE+++TI/-Tmp-/tmpce3eb06.tmp/main.m".

Attaching to process 2181.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ......................................
done
0x968f97da in mach_msg_trap ()
  15 port# 0x7503 0x96927782 in __semwait_signal ()
  14 port# 0x7203 0x96927782 in __semwait_signal ()
  13 port# 0x7003 0x96927782 in __semwait_signal ()
  12 port# 0x5633 0x96927782 in __semwait_signal ()
  11 port# 0x6c03 0x96904afe in read$UNIX2003 ()
  10 port# 0x6a03 0x96927782 in __semwait_signal ()
   9 port# 0x6703 0x96927782 in __semwait_signal ()
   8 port# 0x5923 0x9698de3e in poll$UNIX2003 ()
   7 port# 0x6303 0x96927782 in __semwait_signal ()
   6 port# 0x4f17 0x96927782 in __semwait_signal ()
   5 port# 0x2a03 0x968f97da in mach_msg_trap ()
   4 port# 0x2903 0x968f9816 in semaphore_wait_trap ()
   3 port# 0x2503 0x96927782 in __semwait_signal ()
   2 port# 0x1403 0x968f97da in mach_msg_trap ()
*  1 port# 0x207  0x968f97da in mach_msg_trap ()

Thread 15 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x16b,
timeout=0xb0c64b88, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x16b, timeout=494,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018c10e in ves_icall_System_Threading_WaitHandle_WaitOne_internal
(this=0x8496060, handle=0x3c, ms=60, exitContext=0) at
./../../../mono/metadata/threads.c:1523
#6  0x083c2a60 in ?? ()
#7  0x083c28cb in ?? ()
#8  0x084dc794 in ?? ()
#9  0x03ef47a0 in ?? ()
#10 0x0000ca9d in mono_jit_runtime_invoke (method=0x50e9764, obj=0x848b9a0,
params=0xb0c64ed8, exc=0x0) at ../../../../mono/mini/mini.c:4616
#11 0x001568d4 in mono_runtime_delegate_invoke (delegate=0x848b9a0,
params=0x3c, exc=0x3c) at ../../../../mono/metadata/object.c:3149
#12 0x0018fd8b in start_wrapper (data=0x3cdd140) at
./../../../mono/metadata/threads.c:663
#13 0x001c43c6 in thread_start_routine (args=0x500ab20) at
./../../../mono/io-layer/wthreads.c:286
#14 0x001eea08 in GC_start_routine (arg=0x803bea0) at
./../../libgc/pthread_support.c:1390
#15 0x96926f39 in _pthread_start ()
#16 0x96926dbe in thread_start ()

Thread 14 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x17f,
timeout=0xb0b62c68, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x17f, timeout=100,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0014e49e in ves_icall_System_Threading_Monitor_Monitor_wait
(obj=0x3f1df28, ms=100) at ../../../../mono/metadata/monitor.c:1334
#6  0x084d789b in ?? ()
#7  0x084d7228 in ?? ()
#8  0x084d77b0 in ?? ()
#9  0x084d6f8f in ?? ()
#10 0x03ef47a0 in ?? ()
#11 0x0000ca9d in mono_jit_runtime_invoke (method=0x50e9764, obj=0x848ba80,
params=0xb0b62ed8, exc=0x0) at ../../../../mono/mini/mini.c:4616
#12 0x001568d4 in mono_runtime_delegate_invoke (delegate=0x848ba80,
params=0x3c, exc=0x3c) at ../../../../mono/metadata/object.c:3149
#13 0x0018fd8b in start_wrapper (data=0x48e3810) at
./../../../mono/metadata/threads.c:663
#14 0x001c43c6 in thread_start_routine (args=0x500a8b4) at
./../../../mono/io-layer/wthreads.c:286
#15 0x001eea08 in GC_start_routine (arg=0x803bea0) at
./../../libgc/pthread_support.c:1390
#16 0x96926f39 in _pthread_start ()
#17 0x96926dbe in thread_start ()

Thread 13 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x17e,
timeout=0xb0a60c68, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x17e, timeout=100,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0014e49e in ves_icall_System_Threading_Monitor_Monitor_wait
(obj=0x3f1df30, ms=100) at ../../../../mono/metadata/monitor.c:1334
#6  0x084d789b in ?? ()
#7  0x084d7228 in ?? ()
#8  0x084d7115 in ?? ()
#9  0x084d6df9 in ?? ()
#10 0x03ef47a0 in ?? ()
#11 0x0000ca9d in mono_jit_runtime_invoke (method=0x50e9764, obj=0x848bab8,
params=0xb0a60ed8, exc=0x0) at ../../../../mono/mini/mini.c:4616
#12 0x001568d4 in mono_runtime_delegate_invoke (delegate=0x848bab8,
params=0x3c, exc=0x3c) at ../../../../mono/metadata/object.c:3149
#13 0x0018fd8b in start_wrapper (data=0x48e3810) at
./../../../mono/metadata/threads.c:663
#14 0x001c43c6 in thread_start_routine (args=0x500a7bc) at
./../../../mono/io-layer/wthreads.c:286
#15 0x001eea08 in GC_start_routine (arg=0x803bea0) at
./../../libgc/pthread_support.c:1390
#16 0x96926f39 in _pthread_start ()
#17 0x96926dbe in thread_start ()

Thread 12 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x119,
timeout=0xb0454e08, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x119, timeout=1000,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018812b in async_invoke_io_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:338
#6  0x0018fd36 in start_wrapper (data=0x3cce720) at
./../../../mono/metadata/threads.c:657
#7  0x001c43c6 in thread_start_routine (args=0x500907c) at
./../../../mono/io-layer/wthreads.c:286
#8  0x001eea08 in GC_start_routine (arg=0x803bd80) at
./../../libgc/pthread_support.c:1390
#9  0x96926f39 in _pthread_start ()
#10 0x96926dbe in thread_start ()

Thread 11 (process 2181):
#0  0x96904afe in read$UNIX2003 ()
#1  0x0009322a in mono_handle_native_sigsegv (signal=11, ctx=0xb095edd0) at
./../../../mono/mini/mini-exceptions.c:1589
#2  0x000066fa in mono_sigsegv_signal_handler (_dummy=10, info=0xb095ed90,
context=0xb095edd0) at ../../../../mono/mini/mini.c:4712
#3  <signal handler called>
#4  0x00185fa7 in mono_async_invoke (ares=0x848b1c0) at
./../../../mono/metadata/threadpool.c:998
#5  0x001882e1 in async_invoke_io_thread (data=0x8495ba0) at
./../../../mono/metadata/threadpool.c:314
#6  0x0018fd36 in start_wrapper (data=0x3c9ad70) at
./../../../mono/metadata/threads.c:657
#7  0x001c43c6 in thread_start_routine (args=0x5008558) at
./../../../mono/io-layer/wthreads.c:286
#8  0x001eea08 in GC_start_routine (arg=0x803be40) at
./../../libgc/pthread_support.c:1390
#9  0x96926f39 in _pthread_start ()
#10 0x96926dbe in thread_start ()

Thread 10 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x101,
timeout=0xb085ce08, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x101, timeout=1000,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018850f in async_invoke_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:1445
#6  0x0018fd36 in start_wrapper (data=0x3c9ad70) at
./../../../mono/metadata/threads.c:657
#7  0x001c43c6 in thread_start_routine (args=0x5008460) at
./../../../mono/io-layer/wthreads.c:286
#8  0x001eea08 in GC_start_routine (arg=0x803be40) at
./../../libgc/pthread_support.c:1390
#9  0x96926f39 in _pthread_start ()
#10 0x96926dbe in thread_start ()

Thread 9 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x119,
timeout=0xb075ae08, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x119, timeout=1000,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018812b in async_invoke_io_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:338
#6  0x0018fd36 in start_wrapper (data=0x3cbff10) at
./../../../mono/metadata/threads.c:657
#7  0x001c43c6 in thread_start_routine (args=0x5008368) at
./../../../mono/io-layer/wthreads.c:286
#8  0x001eea08 in GC_start_routine (arg=0x803be40) at
./../../libgc/pthread_support.c:1390
#9  0x96926f39 in _pthread_start ()
#10 0x96926dbe in thread_start ()

Thread 8 (process 2181):
#0  0x9698de3e in poll$UNIX2003 ()
#1  0x001872da in socket_io_poll_main (p=0x2b22e0) at
./../../../mono/metadata/threadpool.c:479
#2  0x0018fd36 in start_wrapper (data=0x48c8730) at
./../../../mono/metadata/threads.c:657
#3  0x001c43c6 in thread_start_routine (args=0x50082ec) at
./../../../mono/io-layer/wthreads.c:286
#4  0x001eea08 in GC_start_routine (arg=0x803be40) at
./../../libgc/pthread_support.c:1390
#5  0x96926f39 in _pthread_start ()
#6  0x96926dbe in thread_start ()

Thread 7 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x101,
timeout=0xb0556e08, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x101, timeout=1000,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018850f in async_invoke_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:1445
#6  0x0018fd36 in start_wrapper (data=0x3cb9a40) at
./../../../mono/metadata/threads.c:657
#7  0x001c43c6 in thread_start_routine (args=0x5007f88) at
./../../../mono/io-layer/wthreads.c:286
#8  0x001eea08 in GC_start_routine (arg=0x803bf60) at
./../../libgc/pthread_support.c:1390
#9  0x96926f39 in _pthread_start ()
#10 0x96926dbe in thread_start ()

Thread 6 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x9692743e in _pthread_cond_wait ()
#2  0x96926f91 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ace02 in _wapi_handle_timedwait_signal_handle (handle=0x164,
timeout=0xb03525c8, alertable=1, poll=0) at
./../../../mono/io-layer/handles.c:1609
#4  0x001c1aad in WaitForSingleObjectEx (handle=0x164, timeout=30000,
alertable=1) at ../../../../mono/io-layer/wait.c:207
#5  0x0018c10e in ves_icall_System_Threading_WaitHandle_WaitOne_internal
(this=0x84960a8, handle=0x14e, ms=334, exitContext=0) at
./../../../mono/metadata/threads.c:1523
#6  0x083c2a60 in ?? ()
#7  0x083c28cb in ?? ()
#8  0x084d7648 in ?? ()
#9  0x084d54ad in ?? ()
#10 0x084d517a in ?? ()
#11 0x084cbd46 in ?? ()
#12 0x0838e296 in ?? ()
#13 0x03ef47a0 in ?? ()
#14 0x0000ca9d in mono_jit_runtime_invoke (method=0x50e9764, obj=0x8032888,
params=0xb0352ed8, exc=0x0) at ../../../../mono/mini/mini.c:4616
#15 0x001568d4 in mono_runtime_delegate_invoke (delegate=0x8032888,
params=0x14e, exc=0x14e) at ../../../../mono/metadata/object.c:3149
#16 0x0018fd8b in start_wrapper (data=0x48c1280) at
./../../../mono/metadata/threads.c:663
#17 0x001c43c6 in thread_start_routine (args=0x5007e90) at
./../../../mono/io-layer/wthreads.c:286
#18 0x001eea08 in GC_start_routine (arg=0x803bf60) at
./../../libgc/pthread_support.c:1390
#19 0x96926f39 in _pthread_start ()
#20 0x96926dbe in thread_start ()

Thread 5 (process 2181):
#0  0x968f97da in mach_msg_trap ()
#1  0x968f9f47 in mach_msg ()
#2  0x01f37382 in CFRunLoopRunSpecific ()
#3  0x01f36c48 in CFRunLoopRunInMode ()
#4  0x02938803 in RunWebThread ()
#5  0x96926f39 in _pthread_start ()
#6  0x96926dbe in thread_start ()

Thread 4 (process 2181):
#0  0x968f9816 in semaphore_wait_trap ()
#1  0x000fe8f0 in finalizer_thread (unused=0x0) at
./../../../mono/metadata/gc.c:1022
#2  0x0018fd36 in start_wrapper (data=0x4807d30) at
./../../../mono/metadata/threads.c:657
#3  0x001c43c6 in thread_start_routine (args=0x5007a34) at
./../../../mono/io-layer/wthreads.c:286
#4  0x001eea08 in GC_start_routine (arg=0x3bb9f60) at
./../../libgc/pthread_support.c:1390
#5  0x96926f39 in _pthread_start ()
#6  0x96926dbe in thread_start ()

Thread 3 (process 2181):
#0  0x96927782 in __semwait_signal ()
#1  0x96953621 in nanosleep$UNIX2003 ()
#2  0x001a66c0 in collection_thread (unused=0x0) at
./../../../mono/io-layer/collection.c:34
#3  0x96926f39 in _pthread_start ()
#4  0x96926dbe in thread_start ()

Thread 2 (process 2181):
#0  0x968f97da in mach_msg_trap ()
#1  0x968f9f47 in mach_msg ()
#2  0x000c64ba in mach_exception_thread (arg=0x0) at
./../../../mono/mini/mini-darwin.c:131
#3  0x001eea08 in GC_start_routine (arg=0x3bb9f60) at
./../../libgc/pthread_support.c:1390
#4  0x96926f39 in _pthread_start ()
#5  0x96926dbe in thread_start ()

Thread 1 (process 2181):
#0  0x968f97da in mach_msg_trap ()
#1  0x968f9f47 in mach_msg ()
#2  0x01f37382 in CFRunLoopRunSpecific ()
#3  0x01f36c48 in CFRunLoopRunInMode ()
#4  0x027227ad in GSEventRunModal ()
#5  0x02722872 in GSEventRun ()
#6  0x0088f003 in UIApplicationMain ()
#7  0x03ef6bb9 in ?? ()
#8  0x03ef6af2 in ?? ()
#9  0x03ef6355 in ?? ()
#10 0x03ef6291 in ?? ()
#11 0x03ef62eb in ?? ()
#12 0x0000ca9d in mono_jit_runtime_invoke (method=0x503adbc, obj=0x0,
params=0xbffff11c, exc=0x0) at ../../../../mono/mini/mini.c:4616
#13 0x0015b24b in mono_runtime_exec_main (method=0x503adbc, args=0x3fecf10,
exc=0x0) at ../../../../mono/metadata/object.c:3515
#14 0x0015de75 in mono_runtime_run_main (method=0x503adbc, argc=0,
argv=0xbffff1c8, exc=0x0) at ../../../../mono/metadata/object.c:3295
#15 0x001f5729 in main ()

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

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list