[Mono-bugs] [Bug 609285] New: App crashes randomly and also creates threads that seemed to be in wait state

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 26 23:02:57 EDT 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=609285#c0


           Summary: App crashes randomly and also creates threads that
                    seemed to be in wait state
    Classification: Mono
           Product: MonoTouch
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: info at sketchmd.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

iPad App using the latest version of MT

The threads seem to be created in response to InvokeOnMainThread

The app crashes on a button click on a toolbar inside a modal FormSheet dialog
on the iPad randomly. 

Here is the output
Stacktrace:

  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
<0x00004>
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
<0x00004>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
  at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
  at Reports.Application.Main (string[]) [0x00000] in
/Users/macuser/Projects/Reports/Reports/Main.cs:22
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x0001d, 0x00090>

Native stacktrace:

    0   Reports                             0x000c1abc
mono_handle_native_sigsegv + 376
    1   Reports                             0x0000dcc6
mono_sigsegv_signal_handler + 313
    2   libSystem.B.dylib                   0x91b9642b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   UIKit                               0x0181df70
-[UIBarButtonItem(Internal) _sendAction:withEvent:] + 156
    5   UIKit                               0x015fecee -[UIApplication
sendAction:to:from:forEvent:] + 119
    6   UIKit                               0x0167843e -[UIControl
sendAction:to:forEvent:] + 67
    7   UIKit                               0x0167a8c0 -[UIControl(Internal)
_sendActionsForEvents:withEvent:] + 527
    8   UIKit                               0x0167946d -[UIControl
touchesEnded:withEvent:] + 458
    9   UIKit                               0x0161dde8 -[UIWindow
_sendTouchesForEvent:] + 513
    10  UIKit                               0x01603643 -[UIApplication
sendEvent:] + 403
    11  UIKit                               0x0160b1d8
_UIApplicationHandleEvent + 7102
    12  GraphicsServices                    0x03ef517c PurpleEventCallback +
1578
    13  CoreFoundation                      0x009f989c CFRunLoopRunSpecific +
4076
    14  CoreFoundation                      0x009f88a8 CFRunLoopRunInMode + 88
    15  GraphicsServices                    0x03ef389d GSEventRunModal + 217
    16  GraphicsServices                    0x03ef3962 GSEventRun + 115
    17  UIKit                               0x01609372 UIApplicationMain + 1134
    18  ???                                 0x067fa2d2 0x0 + 109028050
    19  ???                                 0x067fa0a2 0x0 + 109027490
    20  ???                                 0x067f9612 0x0 + 109024786
    21  ???                                 0x067f93f3 0x0 + 109024243
    22  ???                                 0x067f9519 0x0 + 109024537
    23  Reports                             0x0000da8a mono_jit_runtime_invoke
+ 1360
    24  Reports                             0x001c7f81 mono_runtime_invoke +
137
    25  Reports                             0x001c9cd8 mono_runtime_exec_main +
714
    26  Reports                             0x001c9599 mono_runtime_run_main +
812
    27  Reports                             0x000970bf mono_jit_exec + 200
    28  Reports                             0x0027d5f5 main + 3286
    29  Reports                             0x000027da start + 54

Debug info from gdb:

warning: Trying to remove a section from the ordered section list that did not
exist at 0x364000.
warning: Could not find object file
"/var/folders/i7/i7qGCU12EJyERd6E5iKVT++++TI/-Tmp-//ccHJ2dsC.o" - no debug
information available for "template.m".

warning: .o file
"/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.o)"
more recent than executable timestamp in "/Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports"
warning: Could not open OSO file
/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.o)
to scan for pubtypes for objfile /Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports
warning: .o file
"/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o)"
more recent than executable timestamp in "/Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports"
warning: Could not open OSO file
/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o)
to scan for pubtypes for objfile /Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports
warning: .o file
"/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(gc.x86.o)"
more recent than executable timestamp in "/Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports"
warning: Could not open OSO file
/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator10.5.sdk/usr/lib/libmonotouch.a(gc.x86.o)
to scan for pubtypes for objfile /Users/macuser/Library/Application
Support/iPhone
Simulator/3.2/Applications/CF7BD42A-D407-4E93-AD86-4C181677082E/Reports.app/Reports
Attaching to process 2184.
Reading symbols for shared libraries . done
Reading symbols for shared libraries
.........................................................................................
done
0x91b3b619 in read$UNIX2003 ()
  12                         0x91b5e262 in __semwait_signal ()
  11                         0x91b4f286 in select$DARWIN_EXTSN ()
  10                         0x91b302fa in mach_msg_trap ()
   9                         0x91b5e262 in __semwait_signal ()
   8                         0x91b5e262 in __semwait_signal ()
   7                         0x91b5e262 in __semwait_signal ()
   6                         0x91bc3b3a in poll$UNIX2003 ()
   5                         0x91b302fa in mach_msg_trap ()
   4                         0x91b6d572 in recvfrom$UNIX2003 ()
   3                         0x91b30336 in semaphore_wait_trap ()
   2                         0x91b302fa in mach_msg_trap ()
*  1 "com.apple.main-thread" 0x91b3b619 in read$UNIX2003 ()

Thread 12 (process 2184):
#0  0x91b5e262 in __semwait_signal ()
#1  0x91b5df1e in _pthread_cond_wait ()
#2  0x91b5fbb8 in pthread_cond_wait$UNIX2003 ()
#3  0x0022d135 in _wapi_handle_timedwait_signal_handle (handle=0x101,
timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4  0x0022cee9 in _wapi_handle_wait_signal_handle (handle=0x101, alertable=1)
at ../../../../mono/io-layer/handles.c:1557
#5  0x0024314e in WaitForSingleObjectEx (handle=0x101, timeout=4294967295,
alertable=1) at ../../../../mono/io-layer/wait.c:205
#6  0x002017c1 in async_invoke_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:1485
#7  0x002030be in start_wrapper (data=0xdb85900) at
./../../../mono/metadata/threads.c:661
#8  0x002454af in thread_start_routine (args=0x6844f90) at
./../../../mono/io-layer/wthreads.c:286
#9  0x0027598f in GC_start_routine (arg=0xd7a8f00) at
./../../libgc/pthread_support.c:1390
#10 0x91b5da19 in _pthread_start ()
#11 0x91b5d89e in thread_start ()

Thread 11 (process 2184):
#0  0x91b4f286 in select$DARWIN_EXTSN ()
#1  0x00a298ce in __CFSocketManager ()
#2  0x91b5da19 in _pthread_start ()
#3  0x91b5d89e in thread_start ()

Thread 10 (process 2184):
#0  0x91b302fa in mach_msg_trap ()
#1  0x91b30a67 in mach_msg ()
#2  0x009f9052 in CFRunLoopRunSpecific ()
#3  0x009f88a8 in CFRunLoopRunInMode ()
#4  0x00ed30de in +[NSURLConnection(NSURLConnectionReallyInternal)
_resourceLoadLoop:] ()
#5  0x00ea2bd1 in -[NSThread main] ()
#6  0x00ea2b43 in __NSThread__main__ ()
#7  0x91b5da19 in _pthread_start ()
#8  0x91b5d89e in thread_start ()

Thread 9 (process 2184):
#0  0x91b5e262 in __semwait_signal ()
#1  0x91b5df1e in _pthread_cond_wait ()
#2  0x91b5fbb8 in pthread_cond_wait$UNIX2003 ()
#3  0x0022d135 in _wapi_handle_timedwait_signal_handle (handle=0x101,
timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4  0x0022cee9 in _wapi_handle_wait_signal_handle (handle=0x101, alertable=1)
at ../../../../mono/io-layer/handles.c:1557
#5  0x0024314e in WaitForSingleObjectEx (handle=0x101, timeout=4294967295,
alertable=1) at ../../../../mono/io-layer/wait.c:205
#6  0x002017c1 in async_invoke_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:1485
#7  0x002030be in start_wrapper (data=0xdb094f0) at
./../../../mono/metadata/threads.c:661
#8  0x002454af in thread_start_routine (args=0x6843abc) at
./../../../mono/io-layer/wthreads.c:286
#9  0x0027598f in GC_start_routine (arg=0xd7a8e40) at
./../../libgc/pthread_support.c:1390
#10 0x91b5da19 in _pthread_start ()
#11 0x91b5d89e in thread_start ()

Thread 8 (process 2184):
#0  0x91b5e262 in __semwait_signal ()
#1  0x91b5df1e in _pthread_cond_wait ()
#2  0x91b5fbb8 in pthread_cond_wait$UNIX2003 ()
#3  0x0022d135 in _wapi_handle_timedwait_signal_handle (handle=0x116,
timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4  0x0022cee9 in _wapi_handle_wait_signal_handle (handle=0x116, alertable=1)
at ../../../../mono/io-layer/handles.c:1557
#5  0x0024314e in WaitForSingleObjectEx (handle=0x116, timeout=4294967295,
alertable=1) at ../../../../mono/io-layer/wait.c:205
#6  0x001fe69c in async_invoke_io_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:369
#7  0x002030be in start_wrapper (data=0xd2b5c40) at
./../../../mono/metadata/threads.c:661
#8  0x002454af in thread_start_routine (args=0x6843568) at
./../../../mono/io-layer/wthreads.c:286
#9  0x0027598f in GC_start_routine (arg=0xd7a8480) at
./../../libgc/pthread_support.c:1390
#10 0x91b5da19 in _pthread_start ()
#11 0x91b5d89e in thread_start ()

Thread 7 (process 2184):
#0  0x91b5e262 in __semwait_signal ()
#1  0x91b5df1e in _pthread_cond_wait ()
#2  0x91b5fbb8 in pthread_cond_wait$UNIX2003 ()
#3  0x0022d135 in _wapi_handle_timedwait_signal_handle (handle=0x116,
timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4  0x0022cee9 in _wapi_handle_wait_signal_handle (handle=0x116, alertable=1)
at ../../../../mono/io-layer/handles.c:1557
#5  0x0024314e in WaitForSingleObjectEx (handle=0x116, timeout=4294967295,
alertable=1) at ../../../../mono/io-layer/wait.c:205
#6  0x001fe69c in async_invoke_io_thread (data=0x0) at
./../../../mono/metadata/threadpool.c:369
#7  0x002030be in start_wrapper (data=0xd2b4a70) at
./../../../mono/metadata/threads.c:661
#8  0x002454af in thread_start_routine (args=0x6843470) at
./../../../mono/io-layer/wthreads.c:286
#9  0x0027598f in GC_start_routine (arg=0xd7a8480) at
./../../libgc/pthread_support.c:1390
#10 0x91b5da19 in _pthread_start ()
#11 0x91b5d89e in thread_start ()

Thread 6 (process 2184):
#0  0x91bc3b3a in poll$UNIX2003 ()
#1  0x0025127b in mono_poll (ufds=0x6aa1400, nfds=1, timeout=-1) at
./../../../mono/utils/mono-poll.c:8
#2  0x001fea55 in socket_io_poll_main (p=0x3418a0) at
./../../../mono/metadata/threadpool.c:495
#3  0x002030be in start_wrapper (data=0xd2b1b60) at
./../../../mono/metadata/threads.c:661
#4  0x002454af in thread_start_routine (args=0x6843378) at
./../../../mono/io-layer/wthreads.c:286
#5  0x0027598f in GC_start_routine (arg=0xd7a8480) at
./../../libgc/pthread_support.c:1390
#6  0x91b5da19 in _pthread_start ()
#7  0x91b5d89e in thread_start ()

Thread 5 (process 2184):
#0  0x91b302fa in mach_msg_trap ()
#1  0x91b30a67 in mach_msg ()
#2  0x009f9052 in CFRunLoopRunSpecific ()
#3  0x009f88a8 in CFRunLoopRunInMode ()
#4  0x04a3d633 in RunWebThread ()
#5  0x91b5da19 in _pthread_start ()
#6  0x91b5d89e in thread_start ()

Thread 4 (process 2184):
#0  0x91b6d572 in recvfrom$UNIX2003 ()
#1  0x91b8d383 in recv$UNIX2003 ()
#2  0x000dc5ba in recv_length (fd=5, buf=0xb0284ee1, len=11, flags=0) at
./../../../mono/mini/debugger-agent.c:939
#3  0x000e9c4e in debugger_thread (arg=0x0) at
./../../../mono/mini/debugger-agent.c:6290
#4  0x002454af in thread_start_routine (args=0x6842d2c) at
./../../../mono/io-layer/wthreads.c:286
#5  0x0027598f in GC_start_routine (arg=0x6729f60) at
./../../libgc/pthread_support.c:1390
#6  0x91b5da19 in _pthread_start ()
#7  0x91b5d89e in thread_start ()

Thread 3 (process 2184):
#0  0x91b30336 in semaphore_wait_trap ()
#1  0x00158c88 in finalizer_thread (unused=0x0) at
./../../../mono/metadata/gc.c:1026
#2  0x002030be in start_wrapper (data=0x652e7e0) at
./../../../mono/metadata/threads.c:661
#3  0x002454af in thread_start_routine (args=0x6842cb0) at
./../../../mono/io-layer/wthreads.c:286
#4  0x0027598f in GC_start_routine (arg=0x6729f60) at
./../../libgc/pthread_support.c:1390
#5  0x91b5da19 in _pthread_start ()
#6  0x91b5d89e in thread_start ()

Thread 2 (process 2184):
#0  0x91b302fa in mach_msg_trap ()
#1  0x91b30a67 in mach_msg ()
#2  0x00118e1a in mach_exception_thread (arg=0x0) at
./../../../mono/mini/mini-darwin.c:138
#3  0x91b5da19 in _pthread_start ()
#4  0x91b5d89e in thread_start ()

Thread 1 (process 2184):
#0  0x91b3b619 in read$UNIX2003 ()
#1  0x000c1cb7 in mono_handle_native_sigsegv (signal=11, ctx=0xbfffdc68) at
./../../../mono/mini/mini-exceptions.c:1826
#2  0x0000dcc6 in mono_sigsegv_signal_handler (_dummy=10, info=0xbfffdc28,
context=0xbfffdc68) at ../../../../mono/mini/mini.c:4846
#3  <signal handler called>
#4  0x03843c93 in objc_msgSend ()
#5  0x086aabb0 in ?? ()
#6  0x0181df70 in -[UIBarButtonItem(Internal) _sendAction:withEvent:] ()
#7  0x015fecee in -[UIApplication sendAction:to:from:forEvent:] ()
#8  0x0167843e in -[UIControl sendAction:to:forEvent:] ()
#9  0x0167a8c0 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#10 0x0167946d in -[UIControl touchesEnded:withEvent:] ()
#11 0x0161dde8 in -[UIWindow _sendTouchesForEvent:] ()
#12 0x01603643 in -[UIApplication sendEvent:] ()
#13 0x0160b1d8 in _UIApplicationHandleEvent ()
#14 0x03ef517c in PurpleEventCallback ()
#15 0x009f989c in CFRunLoopRunSpecific ()
#16 0x009f88a8 in CFRunLoopRunInMode ()
#17 0x03ef389d in GSEventRunModal ()
#18 0x03ef3962 in GSEventRun ()
#19 0x01609372 in UIApplicationMain ()
#20 0x067fa2d2 in ?? ()
#21 0x067fa0a2 in ?? ()
#22 0x067f9612 in ?? ()
#23 0x067f93f3 in ?? ()
#24 0x067f9519 in ?? ()
#25 0x0000da8a in mono_jit_runtime_invoke (method=0x6a0bd64, obj=0x0,
params=0xbfffefc8, exc=0x0) at ../../../../mono/mini/mini.c:4733
#26 0x001c7f81 in mono_runtime_invoke (method=0x6a0bd64, obj=0x0,
params=0xbfffefc8, exc=0x0) at ../../../../mono/metadata/object.c:2615
#27 0x001c9cd8 in mono_runtime_exec_main (method=0x6a0bd64, args=0x8b92020,
exc=0x0) at ../../../../mono/metadata/object.c:3581
#28 0x001c9599 in mono_runtime_run_main (method=0x6a0bd64, argc=0,
argv=0xbffff1a0, exc=0x0) at ../../../../mono/metadata/object.c:3355
#29 0x000970bf in mono_jit_exec (domain=0x64a0e58, assembly=0x8698390, argc=1,
argv=0xbffff19c) at ../../../../mono/mini/driver.c:1094
#30 0x0027d5f5 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.
=================================================================

System.NullReferenceException: Object reference not set to an instance of an
object
  at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00038] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26 
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in
/Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31 
  at Reports.Application.Main (System.String[] args) [0x00000] in
/Users/macuser/Projects/Reports/Reports/Main.cs:22 





Reproducible: Sometimes

Steps to Reproduce:
1. n/a
2.
3.
Actual Results:  
Crashes with above output

Expected Results:  
Not crash

Also, not sure why there are so many threads in wait state

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


More information about the mono-bugs mailing list