Closed
Description
Step 0: Are you in the right place?
[REQUIRED] Step 1: Describe your environment
- Xcode version: 13.2.1
- Firebase SDK version: 8.10.0
- Installation method: CocoaPods
- Firebase Component: Core
- Target platform(s):
All | iOS | Catalyst | macOS | tvOS | watchOS
[REQUIRED] Step 2: Describe the problem
Crash when trying to launch on MacOS 12.0.1 Catalyst after compiling with thread sanitizer on
I see the following :
libdispatch.dylib`_dlock_wait.cold.1:
0x10efcdcf4 <+0>: movl %edi, %eax
0x10efcdcf6 <+2>: leaq 0x62ab(%rip), %rcx ; "BUG IN LIBDISPATCH: ulock_wait() failed"
0x10efcdcfd <+9>: movq %rcx, 0x33624(%rip) ; gCRAnnotations + 8
0x10efcdd04 <+16>: movq %rax, 0x3364d(%rip) ; gCRAnnotations + 56
-> 0x10efcdd0b <+23>: ud2
Thread 9: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
Thread 9 Queue : com.apple.network.connections (serial)
#0 0x000000010efcdd0b in _dlock_wait.cold.1 ()
#1 0x000000010ef951fa in _dlock_wait ()
#2 0x000000010ef9515c in _dispatch_once_wait ()
#3 0x00007ff8294c620d in nw_protocol_tcp_connect ()
#4 0x00007ff8200359e8 in nw_protocol_boringssl_connect ()
#5 0x00007ff820aeba67 in ___lldb_unnamed_symbol431$$CFNetwork ()
#6 0x00007ff820193de5 in nw_endpoint_flow_connect ()
#7 0x00007ff82015ed72 in nw_endpoint_flow_setup_protocols ()
#8 0x00007ff8202c0d4c in nw_endpoint_flow_setup_channel ()
#9 0x00007ff8201bc42e in -[NWConcrete_nw_endpoint_flow updatePathWithHandler:] ()
#10 0x00007ff820187bea in nw_endpoint_handler_path_change ()
#11 0x00007ff8201bb8bc in __nw_endpoint_handler_initialize_association_block_invoke ()
#12 0x00007ff8201bb7f2 in __nw_association_update_paths_block_invoke.74 ()
#13 0x00007ff8201ad9b1 in nw_hash_table_apply ()
#14 0x00007ff8201bb349 in nw_association_update_paths ()
#15 0x00007ff8201b6045 in nw_path_necp_update_evaluator ()
#16 0x00007ff8201b40f8 in nw_path_necp_check_for_updates ()
#17 0x00007ff8201b3b03 in nw_path_evaluator_force_update ()
#18 0x00007ff8201b37f4 in nw_association_force_update ()
#19 0x00007ff8202c25fd in nw_endpoint_flow_setup_channel ()
#20 0x00007ff82018e534 in -[NWConcrete_nw_endpoint_flow startWithHandler:] ()
#21 0x00007ff820189455 in nw_endpoint_handler_path_change ()
#22 0x00007ff820181240 in nw_endpoint_handler_start ()
#23 0x00007ff82022ae64 in nw_endpoint_resolver_start_next_child ()
#24 0x000000010e0670dc in __tsan::invoke_and_release_block(void*) ()
#25 0x000000010e066e32 in __tsan::dispatch_callback_wrap(void*) ()
#26 0x000000010ef94874 in _dispatch_client_callout ()
#27 0x000000010ef9e9be in _dispatch_workloop_invoke ()
#28 0x000000010efaad1d in _dispatch_workloop_worker_thread ()
#29 0x000000010f03b7e7 in _pthread_wqthread ()
#30 0x000000010f041ceb in start_wqthread ()
Enqueued from com.apple.network.connections (Thread 9) Queue : com.apple.network.connections (serial)
#0 0x000000010ef98ba7 in _dispatch_async_f_slow ()
#1 0x000000010e0670bf in wrap_dispatch_async ()
#2 0x00007ff820261fd1 in nw_queue_context_async ()
#3 0x00007ff820228e14 in nw_endpoint_resolver_update ()
#4 0x00007ff8207257be in __52-[NWConcrete_nw_endpoint_resolver startWithHandler:]_block_invoke.3 ()
#5 0x00007ff8202271b0 in __nw_resolver_update_client_block_invoke ()
#6 0x000000010e0670dc in __tsan::invoke_and_release_block(void*) ()
#7 0x000000010e066e32 in __tsan::dispatch_callback_wrap(void*) ()
#8 0x000000010ef94874 in _dispatch_client_callout ()
#9 0x000000010ef9e9be in _dispatch_workloop_invoke ()
#10 0x000000010efaad1d in _dispatch_workloop_worker_thread ()
#11 0x000000010f03b7e7 in _pthread_wqthread ()
#12 0x000000010f041ceb in start_wqthread ()
Enqueued from com.apple.network.connections (Thread 9) Queue : com.apple.network.connections (serial)
#0 0x000000010ef98ba7 in _dispatch_async_f_slow ()
#1 0x000000010e0670bf in wrap_dispatch_async ()
#2 0x00007ff820261fd1 in nw_queue_context_async ()
#3 0x00007ff820223f8a in nw_resolver_update_client ()
#4 0x00007ff820223349 in nw_resolver_update_status_locked ()
#5 0x00007ff820470ba8 in __nw_resolver_create_dns_getaddrinfo_locked_block_invoke.165 ()
#6 0x00007ff822809c04 in ___dnssd_getaddrinfo_activate_block_invoke ()
#7 0x000000010e066e32 in __tsan::dispatch_callback_wrap(void*) ()
#8 0x000000010ef94874 in _dispatch_client_callout ()
#9 0x000000010ef97792 in _dispatch_continuation_pop ()
#10 0x000000010efaef96 in _dispatch_source_invoke ()
#11 0x000000010ef9e7d1 in _dispatch_workloop_invoke ()
#12 0x000000010efaad1d in _dispatch_workloop_worker_thread ()
#13 0x000000010f03b7e7 in _pthread_wqthread ()
#14 0x000000010f041ceb in start_wqthread ()
Activity
morganchen12 commentedon Dec 22, 2021
There's a couple strange things about this crash.
BUG IN LIBDISPATCH
andEXC_BAD_INSTRUCTION
are unusual as well. If it really is a bug in libdispatch, the crash may not be reproducible in other versions of macOS. Can you test this?paulb777 commentedon Dec 22, 2021
This might be related to #9061.
I don't yet have Xcode 13.2.1, but Xcode 13.2b2 gives me the #9061 crash for iOS simulator targets with the thread sanitizer. It runs correctly for Catalyst. I tested with https://github.com/firebase/quickstart-ios/tree/master/analytics
paulb777 commentedon Dec 22, 2021
The Analytics Quickstart runs fine for me with Catalyst on macOS 12.0.1 with Xcode 13.2.1. I suspect the issue may be specific to the app and we'll likely need a reproducible test case to help.
google-oss-bot commentedon Dec 29, 2021
Hey @girishw. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
google-oss-bot commentedon Jan 4, 2022
Since there haven't been any recent updates here, I am going to close this issue.
@girishw if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.