58

Suddenly the diagnosticd daemon rise up to over 200% CPU usage, even with Xcode is not running, on OS X Mojave 10.14.1

I can't figure out it. The fans become very noisy.

enter image description here enter image description here

0

5 Answers 5

75

As a software developer:

Quitting the iOS Simulator resolved the issue.

4
  • 4
    It's amazing how much CPU the simulator uses when there's absolutely nothing going on. Commented Dec 1, 2021 at 23:12
  • 2
    Normally it does not use that much CPU. I don't know how it gets into this state. You can try "Device" > "Erase all Content and Settings..." from the menu or just use another simulator. For me the issue eventually went away before the pain got high enough to do more debugging.
    – de.
    Commented Dec 2, 2021 at 8:49
  • 2
    For me quitting the simulator wasn't enough - I had to quit Xcode as well.
    – Dylan Hand
    Commented Aug 22, 2022 at 11:27
  • This also solved my problem, very odd that having a simulator just open (not even running an app) would cause diagnosticd to go wild and chew CPU... must be related to logging overload like other responses mentioned. Commented Aug 28, 2022 at 19:18
44

I had the same issue and realized that some process (in my case osascript) was flooding the system log with error messages (AEGetDescData of non-desc type 'reco' not a good idea). This apparently led to lots of CPU intensive processing in the Console app (I see that's pretty high up on your process list as well) and the diagnosticd process .

Quitting the Console app solved the issue.

3
  • 10
    :facepalm: Amazing/crazy that a tool for diagnosing problems creates such stupid new problems. Commented Jul 7, 2020 at 17:42
  • The underlying root-cause in 10.14/etc. when console log messages get flooded is often soagent for various reasons. (cc: @DougHarris: Console is still only a symptom, although upstream). Workaround: I recently found a syntax to direct MacOS to suppress specific syslog messages from specific subsystems, but I can't remember the syntax or link to it.
    – smci
    Commented Jul 14, 2022 at 18:09
  • ...found the command: sudo log config --subsystem <subsystem> ...
    – smci
    Commented Aug 1, 2022 at 18:58
7

I noticed this whilst testing an Apple Sign In workflow on an iOS Simulator, initially when clicking on the Apple Sign In button in the simulator an Alert is shown asking you sign in with your Apple ID in Settings.

Depending on your iCloud settings after signing in iCloud will start syncing your entire iCloud profile to the simulator, in my case something was erroring badly in the sync which was visible in the Console and spiking diagnosticd + ReportCrash CPU usage. To fix go to Settings -> Apple ID and switch off syncing of everything from your iCloud account to the simulator, my CPU usage dropped in an instant but I was able to remain signed in on the simulator to continue Apple Sign In testing.

If you signed in a while ago and only noticed the high CPU usage later on you may want to reset the simulator first to wipe any partially synced iCloud data beforehand.

2

In my case it was due to active location simulation in Xcode after locationManager.startUpdatingLocation() was called. When I picked Xcode > Debug > Simulate Location > Don't Simulate Location the issue was resolved. enter image description here

It's also possible to disable it for the whole project in Edit Scheme... > Run > Options > Code Location > Allow Location Simulation

0

On an intel mac, I noticed crash logs that mention Calendar app icon. I assumed this has to do with the calendar icon showing in the simulator.

Removing the Calendar app icon inside the simulator, reduced the CPU usage of the simulator and diagnosticd A LOT.

It also improved the latency of the previews (canvas) inside the XCode (15.4)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .