How to resolve crashes which include this thread message "Enqueued from com.apple.root.default-qos.overcommit"

Periodic crashes are occurring in areas where a frequent number of dispatches to the Default QOS queue are occuring. A search about this identifier generally says that there are too many items submitted to this queue and that iOS will not run the method, and that it can lead to a crash. In this particular case the crash comes from a method in the dispatch, "... unrecognized selector sent to instance ..."


That crash reason is fairly consistent, but random in where it occurs and when. Can someone provide a definitive definition and possible consequences of the overcommit, and suggestions beyond looking for Zombies to isolate hwo the overcommmit is occurring and what that may be breaking?

Replies

I think you’re mixing up two problems. In this context overcommit is Dispatch’s attempt to keep the CPU busy by starting new threads to run work on queues when the existing queue worker threads have blocked on I/O. Overcommit is bad — it’s much better to do that I/O work asynchronously and thus avoid the overcommit — but it generally won’t trigger an unrecognized selector exception. Such exceptions are usually caused by memory management problems.

Do you have an Apple crash report for this unrecognized selector exception? If so, please post it.

Regardless of the above, if you’re having overcommit problems that’s definitely something to look into. Excessive reliance of overcommit can result in a thread explosion, the symptoms of which are deadlocks or excessive latency. For more info about this problem, see WWDC 2015 Session 718 Building Responsive and Efficient Apps with GCD. And for specific guidance on how you should structure your Dispatch code to avoid problems like this, watch WWDC 2017 Session 706 Modernizing Grand Central Dispatch Usage

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I am awaiting the specific crash report for the example I provided. I appreciate the explaination and resources to track the overcommit side of this. The crash is occuring within our library implemented in a customer's app environment, where they just implemented a thread management system, hence the reason why there is some suspicion that the crash is from a new latency in the way threads are serviced.


When I have a crash report I will post it.

I'd like to say thanks, eskimo, for your comments RE `overcommit`, and offer a small correction to the link for Session 706 Modernizing Grand Central Dispatch Usage. That'was actually a 2017 session, found here https://developer.apple.com/videos/play/wwdc2017/706/


(The 2018 Session 706 link above points to a HealthKit Session)

Thanks for the correction. I went back and applied it to my earlier post, for the benefit of any other folk who stumble across this thread in the future.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
I'm getting crashed like this.

Process: Final Cut Pro [585]
Path: /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro
Identifier: com.apple.FinalCut
Version: 10.4.6 (342230)
Build Info: ProEditor-34223000026000000~1
App Item ID: 424389933
App External ID: 830604740
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Final Cut Pro [585]
User ID: 501

PlugIn Path: clkernels
PlugIn Identifier: cl
kernels
PlugIn Version: ??? (???)

Date/Time: 2020-06-20 11:23:01.147 -0700
OS Version: Mac OS X 10.13.6 (17G13035)
Report Version: 12
Anonymous UUID: EFAA159F-70D4-B4CC-C09A-BC07D510547A


Time Awake Since Boot: 720 seconds

System Integrity Protection: enabled

Crashed Thread: 75 Dispatch queue: com.apple.root.default-qos.overcommit

Exception Type: EXCBADACCESS (SIGSEGV)
Exception Codes: KERNINVALIDADDRESS at 0x0000000122b1a000
Exception Note: EXCCORPSENOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]

VM Regions Near 0x122b1a000:
OpenCL 0000000122b17000-0000000122b1a000 [ 12K] rw-/rwx SM=PRV
  • ->

CG raster data 0000000122b1b000-0000000122b1d000 [ 8K] r--/r-- SM=COW

Application Specific Information:
ÿ§ëˇ

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystemkernel.dylib 0x00007fff5fc281fa machmsgtrap + 10
1 libsystem
kernel.dylib 0x00007fff5fc27714 machmsg + 60
2 com.apple.CoreFoundation 0x00007fff37adae35
CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff37ada187
_CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff37ad97f7 CFRunLoopRunSpecific + 487
5 com.apple.HIToolbox 0x00007fff36db9d96 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff36db9b06 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff36db9884
Are you working on a Final Cut Pro plug-in?

Share and Enjoy


WWDC runs Mon, 22 Jun through to Fri, 26 Jun. During that time all of DTS will be busy with conference duties.
The key in the crash report is the Application Specific Information. Can you please re-post the crash report with that information?