2 Replies
      Latest reply on Nov 9, 2018 10:06 AM by robvandy55
      robvandy55 Level 1 Level 1 (10 points)

        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?

        • Re: How to resolve crashes which include this thread message "Enqueued from com.apple.root.default-qos.overcommit"
          eskimo Apple Staff Apple Staff (10,445 points)

          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 2018 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"