Bug 6477 - Reachability.InternetConnectionStatus() class hangs on Mountain Lion
Summary: Reachability.InternetConnectionStatus() class hangs on Mountain Lion
Status: RESOLVED DUPLICATE of bug 6309
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-08 16:43 UTC by René Ruppert
Modified: 2012-08-08 18:29 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 6309

Description René Ruppert 2012-08-08 16:43:53 UTC
MT 5.2.12, Simulator 5.1

The app gets stuck in Reachability

Here's the call:

if( Reachability.InternetConnectionStatus () == NetworkStatus.NotReachable)
			{
				UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
				bReachable = false;
			}


And here's where it is hanging:
static bool IsNetworkAvaialable (out NetworkReachabilityFlags flags)
		{
			if (defaultRouteReachability == null){
				defaultRouteReachability = new NetworkReachability (new IPAddress (0));
				defaultRouteReachability.SetCallback (OnChange);
===> THIS LINE IS THE CULPRIT   defaultRouteReachability.Schedule (CFRunLoop.Current, CFRunLoop.ModeDefault);
			}
			if (defaultRouteReachability.TryGetFlags (out flags))
			    return false;
			return IsReachableWithoutRequiringConnection (flags);
		}	

Always reproducible on Mountain Lion. I have upgraded my machine from Lion to Mountain Lion. 



0x9536f80e in semaphore_wait_trap ()
(gdb) thread apply all backtrace

Thread 13 (process 6985):
#0  0x953720ee in __workq_kernreturn ()
#1  0x91af604c in _pthread_workq_return ()
#2  0x91af5e19 in _pthread_wqthread ()
#3  0x91addcca in start_wqthread ()

Thread 12 (process 6985):
#0  0x953720ee in __workq_kernreturn ()
#1  0x91af604c in _pthread_workq_return ()
#2  0x91af5e19 in _pthread_wqthread ()
#3  0x91addcca in start_wqthread ()

Thread 11 (process 6985):
#0  0x953720ee in __workq_kernreturn ()
#1  0x91af604c in _pthread_workq_return ()
#2  0x91af5e19 in _pthread_wqthread ()
#3  0x91addcca in start_wqthread ()

Thread 10 (process 6985):
#0  0x9536f7d2 in mach_msg_trap ()
#1  0x9536ecb0 in mach_msg ()
#2  0x0385dea5 in _xpc_connection_recv_message ()
#3  0x0385eb87 in _xpc_connection_wakeup_recv ()
#4  0x0385ea2e in _xpc_connection_wakeup2 ()
#5  0x0385ed70 in _xpc_connection_reply_event ()
#6  0x03841450 in _dispatch_source_invoke ()
#7  0x0383dcc4 in _dispatch_queue_invoke ()
#8  0x0383de50 in _dispatch_queue_drain ()
#9  0x0383dcb4 in _dispatch_queue_invoke ()
#10 0x0383de50 in _dispatch_queue_drain ()
#11 0x0383dcb4 in _dispatch_queue_invoke ()
#12 0x0383d402 in _dispatch_worker_thread2 ()
#13 0x0383d59e in _dispatch_worker_thread3 ()
#14 0x91af5e12 in _pthread_wqthread ()
#15 0x91addcca in start_wqthread ()

Thread 9 (process 6985):
#0  0x953718e2 in __psynch_cvwait ()
#1  0x91af8220 in _pthread_cond_wait ()
#2  0x91b7e0f8 in pthread_cond_timedwait$UNIX2003 ()
#3  0x001ef13a in timedwait_signal_poll_cond [inlined] () at :1556
#4  0x001ef13a in _wapi_handle_timedwait_signal_handle (handle=0x10e, timeout=0xb06dabf0, alertable=1, poll=0) at handles.c:1650
#5  0x00200d1b in WaitForSingleObjectEx (handle=0x131, timeout=899999, alertable=1) at wait.c:205
#6  0x001d06bd in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=0xcc73e30, handle=0x10e, ms=899999, exitContext=0) at threads.c:1665
#7  0x13b6dade in ?? ()
#8  0x13b6d55c in ?? ()
#9  0x13b6d04b in ?? ()
#10 0x13b6b5b0 in ?? ()
#11 0x13b68ed6 in ?? ()
#12 0x099f0a50 in ?? ()
#13 0x0000ff02 in mono_jit_runtime_invoke (method=0xb2fa31c, obj=0xcc73f08, params=0xb06daf34, exc=0x0) at mini.c:5797
#14 0x00171e8e in mono_runtime_invoke (method=0xb2fa31c, obj=0xcc73f08, params=0xb06daf34, exc=0x0) at object.c:2758
#15 0x00171ffc in mono_runtime_delegate_invoke (delegate=0xcc73f08, params=0xb06daf34, exc=0x0) at object.c:3424
#16 0x001d1ce2 in start_wrapper_internal [inlined] () at :790
#17 0x001d1ce2 in start_wrapper (data=0x1609dec0) at threads.c:832
#18 0x00203bea in thread_start_routine (args=0xe0c5614) at wthreads.c:287
#19 0x001ae9d0 in gc_start_thread (arg=0x1609e280) at sgen-gc.c:6201
#20 0x91af3557 in _pthread_start ()
#21 0x91addcee in thread_start ()

Thread 8 (process 6985):
#0  0x9536f7d2 in mach_msg_trap ()
#1  0x9536ecb0 in mach_msg ()
#2  0x011bd10a in __CFRunLoopServiceMachPort ()
#3  0x011205d5 in __CFRunLoopRun ()
#4  0x0111fd84 in CFRunLoopRunSpecific ()
#5  0x0111fc9b in CFRunLoopRunInMode ()
#6  0x073fa420 in RunWebThread ()
#7  0x91af3557 in _pthread_start ()
#8  0x91addcee in thread_start ()

Thread 7 (process 6985):
#0  0x95371c72 in __semwait_signal ()
#1  0x91b7da6d in nanosleep$UNIX2003 ()
#2  0x91b7d936 in usleep$UNIX2003 ()
#3  0x0021c0a2 in monotouch_pump_gc ()
#4  0x91af3557 in _pthread_start ()
#5  0x91addcee in thread_start ()

Thread 6 (process 6985):
#0  0x95371b3e in recvfrom$UNIX2003 ()
#1  0x91b7dbd7 in recv$UNIX2003 ()
#2  0x00227a11 in recv_uninterrupted ()
#3  0x00227af4 in sdb_recv ()
#4  0x000afd4a in transport_recv [inlined] () at :1373
#5  0x000afd4a in debugger_thread (arg=0x0) at debugger-agent.c:7799
#6  0x00203bea in thread_start_routine (args=0xe0c532c) at wthreads.c:287
#7  0x001ae9d0 in gc_start_thread (arg=0x9b7e340) at sgen-gc.c:6201
#8  0x91af3557 in _pthread_start ()
#9  0x91addcee in thread_start ()

Thread 5 (process 6985):
#0  0x9536f80e in semaphore_wait_trap ()
#1  0x0020c14a in mono_sem_wait (sem=Cannot access memory at address 0x0
) at mono-semaphore.c:115
#2  0x0011213a in finalizer_thread (unused=0x0) at gc.c:1071
#3  0x001d1cb6 in start_wrapper_internal [inlined] () at :784
#4  0x001d1cb6 in start_wrapper (data=0xd88f8c0) at threads.c:832
#5  0x00203bea in thread_start_routine (args=0xe0c5234) at wthreads.c:287
#6  0x001ae9d0 in gc_start_thread (arg=0xd88f910) at sgen-gc.c:6201
#7  0x91af3557 in _pthread_start ()
#8  0x91addcee in thread_start ()

Thread 4 (process 6985):
#0  0x9536f7d2 in mach_msg_trap ()
#1  0x9536ecb0 in mach_msg ()
#2  0x000de33a in mach_exception_thread (arg=0x0) at mini-darwin.c:132
#3  0x91af3557 in _pthread_start ()
#4  0x91addcee in thread_start ()

Thread 3 (process 6985):
#0  0x95371b3e in recvfrom$UNIX2003 ()
#1  0x91b7dbd7 in recv$UNIX2003 ()
#2  0x00227a11 in recv_uninterrupted ()
#3  0x002291fb in monotouch_process_connection ()
#4  0x002288e7 in monotouch_connect_wifi ()
#5  0x00227787 in monotouch_configure_debugging ()
#6  0x0022bc45 in -[CocoaThreadInitializer entryPoint:] ()
#7  0x017504d6 in -[NSThread main] ()
#8  0x01750447 in __NSThread__main__ ()
#9  0x91af3557 in _pthread_start ()
#10 0x91addcee in thread_start ()

Thread 2 (process 6985):
#0  0x953729ae in kevent ()
#1  0x0383e372 in _dispatch_mgr_invoke ()
#2  0x0383cbe1 in _dispatch_mgr_thread ()

Thread 1 (process 6985):
#0  0x9536f80e in semaphore_wait_trap ()
#1  0x03840022 in _dispatch_semaphore_wait_slow ()
#2  0x038400fa in dispatch_semaphore_wait ()
#3  0x0385f2a1 in xpc_connection_send_message_with_reply_sync ()
#4  0x962168a1 in _reach_server_target_add ()
#5  0x96216613 in __SCNetworkReachabilityServer_targetAdd ()
#6  0x961e71b5 in __SCNetworkReachabilityScheduleWithRunLoop ()
#7  0x961e9f76 in SCNetworkReachabilityScheduleWithRunLoop ()
#8  0x15ece26b in ?? ()
#9  0x15ecddf0 in ?? ()
#10 0x15ecd088 in ?? ()
#11 0x15ecce20 in ?? ()
#12 0x15eccc94 in ?? ()
#13 0x15eccbd0 in ?? ()
#14 0x15ecca6c in ?? ()
#15 0x15ecc864 in ?? ()
#16 0x15ecb928 in ?? ()
#17 0x15ecb194 in ?? ()
#18 0x15ecb103 in ?? ()
#19 0x15ecb098 in ?? ()
#20 0x13b6335e in ?? ()
#21 0x13b632f7 in ?? ()
#22 0x13b61004 in ?? ()
#23 0x022a6757 in -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] ()
#24 0x0229ce49 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] ()
#25 0x0229cf34 in -[UIViewAnimationState animationDidStop:finished:] ()
#26 0x041b6b54 in CA::Layer::run_animation_callbacks ()
#27 0x0383e509 in _dispatch_main_queue_callback_4CF ()
#28 0x01120803 in __CFRunLoopRun ()
#29 0x0111fd84 in CFRunLoopRunSpecific ()
#30 0x0111fc9b in CFRunLoopRunInMode ()
#31 0x047d87d8 in GSEventRunModal ()
#32 0x047d888a in GSEventRun ()
#33 0x0226c626 in UIApplicationMain ()
#34 0x0ed4da75 in ?? ()
#35 0x0ed4c058 in ?? ()
#36 0x0ed4bd30 in ?? ()
#37 0x0ed4bea6 in ?? ()
#38 0x0000ff02 in mono_jit_runtime_invoke (method=0xe15adfc, obj=0x0, params=0xbffff3f8, exc=0x0) at mini.c:5797
#39 0x00171e8e in mono_runtime_invoke (method=0xe15adfc, obj=0x0, params=0xbffff3f8, exc=0x0) at object.c:2758
#40 0x001761b4 in mono_runtime_exec_main (method=0xe15adfc, args=0xcc68ef0, exc=0x0) at object.c:3934
#41 0x00176525 in mono_runtime_run_main (method=0xe15adfc, argc=0, argv=0x2dee80, exc=0x0) at object.c:3564
#42 0x0006b4d5 in mono_jit_exec (domain=0xd87bcd0, assembly=0x9886740, argc=1, argv=0x2dee80) at driver.c:1122
#43 0x0022bb9c in main ()
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-08-08 18:29:48 UTC

*** This bug has been marked as a duplicate of bug 6309 ***