-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Checklist before submitting a bug report
- I've updated to the latest released version of the SDK
- I've searched for existing GitHub issues
- I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- I've read the Code of Conduct
- This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
13.4
Facebook iOS SDK version
14.1.0
Dependency Manager
CocoaPods
SDK Framework
Core
Goals
We want to solve the block of the main thread
Expected results
There will be no block of main thread
deadlock between thread 1 and thread 8
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00000001b81681a4 libsystem_kernel.dylib`__ulock_wait + 8
frame #1: 0x00000001f1d969a4 libsystem_platform.dylib`_os_unfair_lock_lock_slow + 196
frame #2: 0x00000001992fc634 libobjc.A.dylib`objc_sync_enter + 36
frame #3: 0x000000010d8a7804 FBSDKCoreKit`-[FBSDKAppEventsDeviceInfo encodedDeviceInfo](self=<unavailable>, _cmd=<unavailable>) at FBSDKAppEventsDeviceInfo.m:100:3 [opt]
frame #4: 0x000000010d8aa908 FBSDKCoreKit`-[FBSDKAppEventsUtility activityParametersDictionaryForEvent:shouldAccessAdvertisingID:userID:userData:](self=0x00000002810e1e00, _cmd=<unavailable>, eventCategory=<unavailable>, shouldAccessAdvertisingID=<unavailable>, userID=<unavailable>, userData=<unavailable>) at FBSDKAppEventsUtility.m:109:63 [opt]
frame #5: 0x000000010d8a19f0 FBSDKCoreKit`__32-[FBSDKAppEvents publishInstall]_block_invoke(.block_descriptor=0x0000000281f782c0) at FBSDKAppEvents.m:866:59 [opt]
frame #6: 0x000000010d8a2a40 FBSDKCoreKit`__43-[FBSDKAppEvents fetchServerConfiguration:]_block_invoke_2(.block_descriptor=0x0000000280a0e130, serverConfiguration=<unavailable>, error=<unavailable>) at FBSDKAppEvents.m:1023:9 [opt]
frame #7: 0x000000010d9037c8 FBSDKCoreKit`-[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:](self=<unavailable>, _cmd=<unavailable>, completionBlock=<unavailable>) at FBSDKServerConfigurationManager.m:192:7 [opt]
frame #8: 0x000000010d8a254c FBSDKCoreKit`__43-[FBSDKAppEvents fetchServerConfiguration:]_block_invoke(.block_descriptor=0x0000000280b93840) at FBSDKAppEvents.m:951:5 [opt]
frame #9: 0x000000010d8a738c FBSDKCoreKit`-[FBSDKAppEventsConfigurationManager _processResponse:error:](self=<unavailable>, _cmd=<unavailable>, response=<unavailable>, error=<unavailable>) at FBSDKAppEventsConfigurationManager.m:138:7 [opt]
frame #10: 0x000000010d8df8ec FBSDKCoreKit`-[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:](self=<unavailable>, _cmd=<unavailable>, connection=<unavailable>, results=<unavailable>, error=<unavailable>) at FBSDKGraphRequestMetadata.m:32:5 [opt]
frame #11: 0x000000010d8dc870 FBSDKCoreKit`__82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke(.block_descriptor=0x00000002826c94a0) at FBSDKGraphRequestConnection.m:998:5 [opt]
frame #12: 0x000000010d8dc764 FBSDKCoreKit`-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:](self=<unavailable>, _cmd=<unavailable>, body=<unavailable>, error=<unavailable>, metadata=<unavailable>, canNotifyDelegate=<unavailable>) at FBSDKGraphRequestConnection.m:1032:3 [opt]
frame #13: 0x000000010d8dc348 FBSDKCoreKit`__65-[FBSDKGraphRequestConnection _completeWithResults:networkError:]_block_invoke(.block_descriptor=0x000000016eeb22b0, metadata=<unavailable>, i=<unavailable>, stop=<unavailable>) at FBSDKGraphRequestConnection.m:981:5 [opt]
frame #14: 0x0000000180a45e18 CoreFoundation`__NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
frame #15: 0x0000000180a8434c CoreFoundation`-[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 196
frame #16: 0x000000010d8dc078 FBSDKCoreKit`-[FBSDKGraphRequestConnection _completeWithResults:networkError:](self=0x0000000282e4d9d0, _cmd=<unavailable>, results=<unavailable>, networkError=<unavailable>) at FBSDKGraphRequestConnection.m:959:3 [opt]
frame #17: 0x000000010d8db1fc FBSDKCoreKit`-[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:](self=0x0000000282e4d9d0, _cmd=<unavailable>, response=<unavailable>, data=<unavailable>, error=<unavailable>) at FBSDKGraphRequestConnection.m:814:3 [opt]
frame #18: 0x000000010c96c6d4 libdispatch.dylib`_dispatch_call_block_and_release + 32
frame #19: 0x000000010c96e3b4 libdispatch.dylib`_dispatch_client_callout + 20
frame #20: 0x000000010c97e898 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1224
frame #21: 0x0000000180a89d84 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
frame #22: 0x0000000180a43f5c CoreFoundation`__CFRunLoopRun + 2540
frame #23: 0x0000000180a57468 CoreFoundation`CFRunLoopRunSpecific + 600
frame #24: 0x000000019c5e338c GraphicsServices`GSEventRunModal + 164
frame #25: 0x00000001833f9088 UIKitCore`-[UIApplication _run] + 1100
frame #26: 0x0000000183177958 UIKitCore`UIApplicationMain + 2092
frame #27: 0x0000000100f54348 `main(argc=1, argv=0x000000016eeb3748) at main.m:19:17
frame #28: 0x000000010c839aa4 dyld`start + 520
thread #3, name = 'gputools.smt_poll.0x280558c00'
frame #0: 0x00000001b8167ae4 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x000000018b979f00 libsystem_c.dylib`nanosleep + 216
frame #2: 0x000000018b97ac20 libsystem_c.dylib`usleep + 68
frame #3: 0x000000010cafc6f0 libMTLCapture.dylib`___lldb_unnamed_symbol3110 + 108
frame #4: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
thread #5
frame #0: 0x00000001b8167b2c libsystem_kernel.dylib`__workq_kernreturn + 8
thread #6, name = 'com.apple.uikit.eventfetch-thread'
frame #0: 0x00000001b8167504 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x00000001b8167b9c libsystem_kernel.dylib`mach_msg + 76
frame #2: 0x0000000180a3f738 CoreFoundation`__CFRunLoopServiceMachPort + 372
frame #3: 0x0000000180a43a2c CoreFoundation`__CFRunLoopRun + 1212
frame #4: 0x0000000180a57468 CoreFoundation`CFRunLoopRunSpecific + 600
frame #5: 0x0000000182273c94 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
frame #6: 0x00000001822b4dc8 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 92
frame #7: 0x0000000183372230 UIKitCore`-[UIEventFetcher threadMain] + 524
frame #8: 0x00000001822c340c Foundation`__NSThread__start__ + 808
frame #9: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
thread #8, queue = 'com.apple.root.default-qos'
frame #0: 0x00000001b8167f90 libsystem_kernel.dylib`__psynch_cvwait + 8
frame #1: 0x00000001f1da6254 libsystem_pthread.dylib`_pthread_cond_wait + 1228
frame #2: 0x0000000182318e44 Foundation`-[NSOperation waitUntilFinished] + 584
frame #3: 0x0000000180a78e44 CoreFoundation`_CFXNotificationPost + 796
frame #4: 0x0000000182275f68 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 96
frame #5: 0x000000018119e9bc CoreTelephony`-[CTTelephonyNetworkInfo updateLegacyRat:] + 88
frame #6: 0x00000001811331fc CoreTelephony`-[CTTelephonyNetworkInfo updateRat:descriptor:] + 692
frame #7: 0x0000000181132e8c CoreTelephony`-[CTTelephonyNetworkInfo queryRatForDescriptor:] + 236
frame #8: 0x0000000181132cec CoreTelephony`-[CTTelephonyNetworkInfo queryRat] + 244
frame #9: 0x00000001811316c4 CoreTelephony`-[CTTelephonyNetworkInfo initWithClient:] + 900
frame #10: 0x0000000181137fa0 CoreTelephony`-[CTTelephonyNetworkInfo init] + 112
frame #11: 0x000000010d8a86a4 FBSDKCoreKit`+[FBSDKAppEventsDeviceInfo _getCarrier](self=<unavailable>, _cmd=<unavailable>) at FBSDKAppEventsDeviceInfo.m:260:41 [opt]
frame #12: 0x000000010d8a7cf8 FBSDKCoreKit`-[FBSDKAppEventsDeviceInfo _collectGroup1Data](self=0x000000028347ad00, _cmd=<unavailable>) at FBSDKAppEventsDeviceInfo.m:165:32 [opt]
frame #13: 0x000000010d8a783c FBSDKCoreKit`-[FBSDKAppEventsDeviceInfo encodedDeviceInfo](self=<unavailable>, _cmd=<unavailable>) at FBSDKAppEventsDeviceInfo.m:110:7 [opt]
frame #14: 0x000000010d8a6018 FBSDKCoreKit`-[FBSDKAppEventsATEPublisher publishATE](self=0x00000002810a9800, _cmd=<unavailable>) at FBSDKAppEventsATEPublisher.m:88:63 [opt]
frame #15: 0x000000010d8a1fc8 FBSDKCoreKit`__28-[FBSDKAppEvents publishATE]_block_invoke(.block_descriptor=<unavailable>) at FBSDKAppEvents.m:902:5 [opt]
frame #16: 0x000000010c96c6d4 libdispatch.dylib`_dispatch_call_block_and_release + 32
frame #17: 0x000000010c96e3b4 libdispatch.dylib`_dispatch_client_callout + 20
frame #18: 0x000000010c970f2c libdispatch.dylib`_dispatch_queue_override_invoke + 1052
frame #19: 0x000000010c982500 libdispatch.dylib`_dispatch_root_queue_drain + 408
frame #20: 0x000000010c982f0c libdispatch.dylib`_dispatch_worker_thread2 + 196
frame #21: 0x00000001f1d9f0b8 libsystem_pthread.dylib`_pthread_wqthread + 228
thread #9
frame #0: 0x00000001f1d9ee8c libsystem_pthread.dylib`start_wqthread
thread #13
frame #0: 0x00000001b8167b2c libsystem_kernel.dylib`__workq_kernreturn + 8
thread #15
frame #0: 0x00000001f1d9ee8c libsystem_pthread.dylib`start_wqthread
thread #18, name = 'AVAudioSession Notify Thread'
frame #0: 0x00000001b8167504 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x00000001b8167b9c libsystem_kernel.dylib`mach_msg + 76
frame #2: 0x0000000180a3f738 CoreFoundation`__CFRunLoopServiceMachPort + 372
frame #3: 0x0000000180a43a2c CoreFoundation`__CFRunLoopRun + 1212
frame #4: 0x0000000180a57468 CoreFoundation`CFRunLoopRunSpecific + 600
frame #5: 0x0000000189e6a308 AudioSession`CADeprecated::GenericRunLoopThread::Entry(void*) + 164
frame #6: 0x0000000189e73d64 AudioSession`CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 92
frame #7: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
thread #19, name = 'JavaScriptCore bmalloc scavenger'
frame #0: 0x00000001b8167f90 libsystem_kernel.dylib`__psynch_cvwait + 8
frame #1: 0x00000001f1da6254 libsystem_pthread.dylib`_pthread_cond_wait + 1228
frame #2: 0x00000001993a6ddc libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
frame #3: 0x000000018cc2b358 JavaScriptCore`void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108
frame #4: 0x000000018cc2fb28 JavaScriptCore`bmalloc::Scavenger::threadRunLoop() + 340
frame #5: 0x000000018cc2f6c8 JavaScriptCore`bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 16
frame #6: 0x000000018cc30b84 JavaScriptCore`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 48
frame #7: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
thread #23, name = 'com.apple.NSURLConnectionLoader'
frame #0: 0x00000001b8167504 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x00000001b8167b9c libsystem_kernel.dylib`mach_msg + 76
frame #2: 0x0000000180a3f738 CoreFoundation`__CFRunLoopServiceMachPort + 372
frame #3: 0x0000000180a43a2c CoreFoundation`__CFRunLoopRun + 1212
frame #4: 0x0000000180a57468 CoreFoundation`CFRunLoopRunSpecific + 600
frame #5: 0x00000001814cb3f0 CFNetwork`___lldb_unnamed_symbol14597 + 464
frame #6: 0x00000001822c340c Foundation`__NSThread__start__ + 808
frame #7: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
thread #24, name = 'com.apple.CFNetwork.CustomProtocols'
frame #0: 0x00000001b8167504 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x00000001b8167b9c libsystem_kernel.dylib`mach_msg + 76
frame #2: 0x0000000180a3f738 CoreFoundation`__CFRunLoopServiceMachPort + 372
frame #3: 0x0000000180a43a2c CoreFoundation`__CFRunLoopRun + 1212
frame #4: 0x0000000180a57468 CoreFoundation`CFRunLoopRunSpecific + 600
frame #5: 0x00000001814cb3f0 CFNetwork`___lldb_unnamed_symbol14597 + 464
frame #6: 0x00000001822c340c Foundation`__NSThread__start__ + 808
frame #7: 0x00000001f1d9f9a4 libsystem_pthread.dylib`_pthread_start + 148
Actual results
It gets stuck in the main thread for a long time
Steps to reproduce
Unfortunately I have not been able to reproduce this block yet.
It is only reported in Xcode hangs.
Hope to recover as soon as possible
Code samples & details
No response
Reactions are currently unavailable