Solved

Xcode Thread Performance Checker warning

  • 30 September 2022
  • 1 reply
  • 927 views

We recently updated to Xcode 14.0.1 and it started throwing a TPC (Thread Performance Checker) warning about potential hang risk due to priority inversion. Detailed logs below. We never saw any TPC warning in Xcode 13. Is this something on Heap’s radar to solve? Or can we do something on our end to resolve the issue?

 

Attaching logs from Xcode’s debugger and also attaching a screenshot of the TPC analyzer.

 

======================

Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions

PID: 20145, TID: 146901

Backtrace

=================================================================

3   Hearsay Msgs                        0x000000010144fac4 -[_heap_SRRunLoopThread runLoop] + 32

4   Hearsay Msgs                        0x000000010144f8cd __53+[NSRunLoop(heap_SRWebSocket) heap_SR_networkRunLoop]_block_invoke + 117

5   libdispatch.dylib                   0x0000000115252f5b _dispatch_client_callout + 8

6   libdispatch.dylib                   0x00000001152545b5 _dispatch_once_callout + 66

7   Hearsay Msgs                        0x000000010144f856 +[NSRunLoop(heap_SRWebSocket) heap_SR_networkRunLoop] + 46

8   Hearsay Msgs                        0x000000010144b380 -[heap_SRWebSocket openConnection] + 76

9   Hearsay Msgs                        0x0000000101449e7f -[heap_SRWebSocket open] + 210

10  Hearsay Msgs                        0x000000010145615e -[heap_SocketIOTransportWebsocket open] + 652

11  Hearsay Msgs                        0x000000010145454f -[heap_SocketIO connectionDidFinishLoading:] + 957

12  CFNetwork                           0x000000010c5ff13a __CFTubeSetTubeTypeNotifier + 106715

13  CFNetwork                           0x000000010c5ff0fa __CFTubeSetTubeTypeNotifier + 106651

14  CFNetwork                           0x000000010c5ff1bf __CFTubeSetTubeTypeNotifier + 106848

15  CFNetwork                           0x000000010c531536 _CFNetworkSetATSContext + 52688

16  CFNetwork                           0x000000010c5310dd _CFNetworkSetATSContext + 51575

17  libdispatch.dylib                   0x0000000115252f5b _dispatch_client_callout + 8

18  libdispatch.dylib                   0x00000001152568d2 _dispatch_block_invoke_direct + 496

19  CFNetwork                           0x000000010c5dcc08 _CFURLStorageSessionDisableCache + 58199

20  CoreFoundation                      0x0000000111a66f2b CFArrayApplyFunction + 67

21  CFNetwork                           0x000000010c5dcb2d _CFURLStorageSessionDisableCache + 57980

22  CFNetwork                           0x000000010c5de84d _CFURLStorageSessionDisableCache + 65436

23  CoreFoundation                      0x0000000111ae8ebd __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

24  CoreFoundation                      0x0000000111ae8dfc __CFRunLoopDoSource0 + 157

25  CoreFoundation                      0x0000000111ae85f9 __CFRunLoopDoSources0 + 212

26  CoreFoundation                      0x0000000111ae2db3 __CFRunLoopRun + 927

27  CoreFoundation                      0x0000000111ae2637 CFRunLoopRunSpecific + 560

28  GraphicsServices                    0x000000011871928a GSEventRunModal + 139

29  UIKitCore                           0x00000001291df425 -[UIApplication _run] + 994

30  UIKitCore                           0x00000001291e4301 UIApplicationMain + 123

31  Hearsay Msgs                        0x00000001013aca5f main + 63

icon

Best answer by Jonas-Heap 22 December 2022, 20:53

View original

1 reply

Userlevel 3
Badge +2

Thanks for posting this issue! Unfortunately, I haven’t been able to find other reports of this and I haven’t been able to reproduce it myself. Can you confirm whether you’re able to reproduce this with Heap installed on a brand new test app? 

Reply