Xcode locks up continuously with "Dispatch Thread Soft Limit Reached"

On macOS High Sierra (10.13.3), Xcode 9.2 is locking up repeatedly while indexing our project. We have reproduced the issue on two different Macbook Pro 2015 laptops. I've attached an excerpt from the automatically generated crash report below. I can provide the entire file if needed. It appears that the relevant issue is that too many threads are getting created (Dispatch Thread Soft Limit Reached: 64 (too many dispatch threads blocked in synchronous operations)).


This is essentially halting us from making progress. If anyone can advise on a solution or any troubleshooting steps, that would be greatly appreciated.


Date/Time:      2018-03-05 11:56:48 -0600
OS Version:      Mac OS X 10.13.3 (Build 17D47)
Architecture:    x86_64h
Report Version:  26


Data Source:    Stackshots


Command:        Xcode
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:        9.2 (13772)
Build Version:  2
Product Build Version: 9C40b
Project Name:    IDEFrameworks
Source Version:  13772000000000000
App Item ID:    497799835
App External ID: 825038102
Parent:          launchd [1]
PID:            36657


Event:          hang
Duration:        6.59s (process was unresponsive for 31 seconds before sampling)
Steps:          66 (100ms sampling interval)


Hardware model:  MacBookPro11,5
Active cpus:    8


Time Awake Since Boot: 10000s


Fan speed:      6158 rpm


--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------


Heaviest stack for the main thread of the target process:
  66  start + 1 (libdyld.dylib + 4373) [0x7fff5528e115]
  66  NSApplicationMain + 804 (AppKit + 24346) [0x7fff2af1df1a]
  66  -[NSApplication run] + 764 (AppKit + 224621) [0x7fff2af4ed6d]
  66  ??? (<76F3AD2F-A605-3FC3-BF66-E09B2B991852> + 409498) [0x10182cf9a]
  66  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 (AppKit + 8223564) [0x7fff2b6efb4c]
  66  _DPSNextEvent + 2085 (AppKit + 270175) [0x7fff2af59f5f]
  66  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 194836) [0x7fff2cc8e914]
  66  ReceiveNextEventCommon + 366 (HIToolbox + 195231) [0x7fff2cc8ea9f]
  66  RunCurrentEventLoopInMode + 286 (HIToolbox + 196134) [0x7fff2cc8ee26]
  66  CFRunLoopRunSpecific + 483 (CoreFoundation + 544579) [0x7fff2d976f43]
  66  __CFRunLoopRun + 1240 (CoreFoundation + 546472) [0x7fff2d9776a8]
  66  __CFRunLoopDoObservers + 527 (CoreFoundation + 667727) [0x7fff2d99504f]
  66  __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 (CoreFoundation + 667943) [0x7fff2d995127]
  66  __65+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke + 283 (AppKit + 9668184) [0x7fff2b850658]
  66  CA::Transaction::commit() + 171 (QuartzCore + 66305) [0x7fff38aa4301]
  66  CA::Transaction::run_commit_handlers(CATransactionPhase) + 49 (QuartzCore + 71567) [0x7fff38aa578f]
  66  __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 695 (AppKit + 1575266) [0x7fff2b098962]
  66  ___NSWindowGetDisplayCycleObserver_block_invoke.5902 + 308 (AppKit + 9573081) [0x7fff2b8392d9]
  66  -[NSWindow displayIfNeeded] + 321 (AppKit + 1576534) [0x7fff2b098e56]
  66  -[NSView displayIfNeeded] + 1581 (AppKit + 1578168) [0x7fff2b0994b8]
  66  -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 253 (AppKit + 1593953) [0x7fff2b09d261]
  66  -[NSView _oldDisplayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2051 (AppKit + 9376216) [0x7fff2b8091d8]
  66  -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 327 (AppKit + 1597915) [0x7fff2b09e1db]
  66  -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 938 (AppKit + 1600082) [0x7fff2b09ea52]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  ??? (<76F3AD2F-A605-3FC3-BF66-E09B2B991852> + 30384) [0x1017d06b0]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2964 (AppKit + 1905711) [0x7fff2b0e942f]
  66  -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1735 (AppKit + 1904482) [0x7fff2b0e8f62]
  66  -[NSView _drawRect:clip:] + 1819 (AppKit + 1608504) [0x7fff2b0a0b38]
  66  _NSViewDrawRect + 83 (AppKit + 9370657) [0x7fff2b807c21]
  66  -[NSPathControl drawRect:] + 81 (AppKit + 10102116) [0x7fff2b8ba564]
  66  -[NSControl drawRect:] + 348 (AppKit + 1636019) [0x7fff2b0a76b3]
  66  ??? (<C19A9742-1C5E-345D-B0A5-E2CB0D88EA39> + 1034974) [0x102b47ade]
  66  ??? (<C19A9742-1C5E-345D-B0A5-E2CB0D88EA39> + 1073245) [0x102b5105d]
  66  ??? (<C19A9742-1C5E-345D-B0A5-E2CB0D88EA39> + 1073594) [0x102b511ba]
  66  ??? (<C19A9742-1C5E-345D-B0A5-E2CB0D88EA39> + 1072776) [0x102b50e88]
  66  -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1486 (AppKit + 1679337) [0x7fff2b0b1fe9]
  66  -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 164 (AppKit + 1452260) [0x7fff2b07a8e4]
  66  __71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1371 + 1072 (AppKit + 6528794) [0x7fff2b551f1a]
  66  -[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 971 (AppKit + 1651570) [0x7fff2b0ab372]
  66  __74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 963 (AppKit + 1653064) [0x7fff2b0ab948]
  66  CGContextDrawImage + 51 (CoreGraphics + 121709) [0x7fff2ddb1b6d]
  66  CGContextDrawImageWithOptions + 544 (CoreGraphics + 122279) [0x7fff2ddb1da7]
  66  CGContextDelegateDrawImage + 41 (CoreGraphics + 416464) [0x7fff2ddf9ad0]
  66  backing_store_DrawImage.llvm.933B347B + 514 (AppKit + 5032534) [0x7fff2b3e4a56]
  66  backing_store_delegate + 962 (AppKit + 1910401) [0x7fff2b0ea681]
  66  __backing_store_DrawImage_block_invoke + 70 (AppKit + 1925967) [0x7fff2b0ee34f]
  66  CGContextDelegateDrawImage + 41 (CoreGraphics + 416464) [0x7fff2ddf9ad0]
  66  ripc_DrawImage + 753 (CoreGraphics + 1033448) [0x7fff2de904e8]
  66  ripc_AcquireRIPImageData + 207 (CoreGraphics + 980422) [0x7fff2de835c6]
  66  RIPImageCacheGetRetained + 674 (CoreGraphics + 868609) [0x7fff2de68101]
  66  RIPImageDataInitializeShared + 88 (CoreGraphics + 980168) [0x7fff2de834c8]
  66  CGSImageDataLock + 230 (CoreGraphics + 124833) [0x7fff2ddb27a1]
  66  img_data_lock + 9031 (CoreGraphics + 139365) [0x7fff2ddb6065]
  66  img_blocks_extent + 98 (CoreGraphics + 256860) [0x7fff2ddd2b5c]
  66  img_blocks_create + 333 (CoreGraphics + 257234) [0x7fff2ddd2cd2]
  66  CGImageProviderCopyImageBlockSet + 196 (CoreGraphics + 120209) [0x7fff2ddb1591]
  66  CGImageProviderCopyImageBlockSetWithOptions + 137 (CoreGraphics + 114681) [0x7fff2ddafff9]
  66  subImageProviderCopyImageBlockSet + 333 (CoreGraphics + 115070) [0x7fff2ddb017e]
  66  CGImageProviderCopyImageBlockSetWithOptions + 137 (CoreGraphics + 114681) [0x7fff2ddafff9]
  66  __csiCompressImageProviderCopyImageBlockSetWithOptions + 1163 (CoreUI + 99660) [0x7fff417a654c]
  66  -[_CSIRenditionBlockData expandCSIBitmapData:fromSlice:makeReadOnly:] + 1041 (CoreUI + 102433) [0x7fff417a7021]
  66  _dispatch_group_wait_slow + 151 (libdispatch.dylib + 28161) [0x7fff55259e01]
  66  semaphore_wait_trap + 10 (libsystem_kernel.dylib + 75774) [0x7fff553d47fe]
*66  semaphore_wait_continue + 0 (kernel + 2577040) [0xffffff8000475290]




Process:        Xcode [36657]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Architecture:    x86_64
Parent:          launchd [1]
UID:            572990702
Task size:      1748.56 MB (+1660 KB)
Pageins:        2 pages
CPU Time:        0.972s
Note:            Unresponsive for 31 seconds before sampling
Note:            3 idle work queue threads omitted
Dispatch Thread Soft Limit Reached:  64  (too many dispatch threads blocked in synchronous operations)
Xcode locks up continuously with "Dispatch Thread Soft Limit Reached"
 
 
Q