title: iOS - How to understand and properly debug this type of crash : com.apple.root.background-qos?
body: <p>I know this question has been already asked several times, but either it stayed unanswered or the answer was totally not helping.</p>
  
  <p>Here is my crash report :</p>
  
  <p><a href="https://i.stack.imgur.com/HSriQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HSriQ.png" alt="enter image description here"></a></p>
  
  <p><a href="https://stackoverflow.com/questions/45613424/ios-app-crashed-com-apple-root-background-qos">This question</a> and especially the comments helped me understand (kind of) my issue.</p>
  
  <blockquote>
    <p>It seems from your crash log com.apple.root.background-qos, this is the thread request which might be over committed due to which it exist as it cannot take any more request.</p>
  </blockquote>
  
  <p>If I understand it correctly, it may be possible that the thread handling requests might not be able to handle more requests ?</p>
  
  <p>How do I debug and test this ? I am unable to reproduce the crash.</p>
  
  <p><strong>NB:</strong> In my launcher service I am doing 5 or 6 requests each one separated in a dispatchGroup.enter / .leave when finished, like this :</p>
  
  <pre><code>dispatchGroup.enter()
  self.fetchObservationForecast(lat: lat, lon: lon) { result in
       switch result {
       case .success(let observationForecast) :
            print("Observation Forecast request succeeded")
            model["observationForecast"] = observationForecast
            break
       case .failure(let error) :
            print("Observation Forecast request failed : \(error)")
            model["observationForecast"] = error
            break
       }
       dispatchGroup.leave()
  }
  </code></pre>
  
  <p>Am I looking at the wrong place ? How can I test and reproduce it in order to submit a fix ?</p>
  
  <p>Any help would be appreciated.</p>