Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

w1z

macrumors 6502a
Original poster
Aug 20, 2013
692
480
Hey all,

Upgraded to 12.7.2 from 12.7.1 and observed odd behavior from the diagnosticd process, notably higher CPU usage. Attempted a reinstall of 12.7.2 to rule out a flawed update, but the issue persists - diagnosticd is using excessive CPU, leading to slowdowns. Killing the process seems to be the only solution currently.

Also, when using Console to stream logs, pausing the stream leads to a crash.

Can anyone else confirm similar experiences?

Thanks
W
 

bogdanw

macrumors 603
Mar 10, 2009
5,746
2,768
diagnosticd wasn’t even running on my system, it has started after I opened the Console app. No problems with either.
You could run Onyx maintenance https://titanium-software.fr/en/onyx.html and clean the Log messages and reports. Maybe one of them got corrupted and is causing the issue.
 

w1z

macrumors 6502a
Original poster
Aug 20, 2013
692
480
@bogdanw thanks for chiming in .. I created another user account and the diagnosticd process wasn't even running so I've narrowed it down to my account. What about streaming logs in Console then pausing the stream - does that lead to Console crashing on your system?

Edit: forgot to add, already tried Onyx ... no change.
 

msephton

macrumors 6502
Jan 6, 2004
456
197
United Kingdom, Europe
Sounds like an app or process is crashing and generating a spindump? Can take a while. If it's happening after an hour or happening multiple times track down the cause of the crash
 

bogdanw

macrumors 603
Mar 10, 2009
5,746
2,768
What about streaming logs in Console then pausing the stream - does that lead to Console crashing on your system?
No, I can start/pause without issues.
This command might give an indication to what is starting diagnosticd. Log out, log in and, if diagnosticd is running, try:
Code:
sudo launchctl blame system/com.apple.diagnosticd

From the launchctl manual
"blame service-target
If the service is running, prints a human-readable string describing why launchd launched the service.
Note that services may run for many reasons; this subcommand will only show the most proximate reason.
So if a service was run due to a timer firing, this subcommand will print that reason, irrespective of
whether there were messages waiting on the service's various endpoints. This subcommand is only
intended for debugging and profiling use and its output should not be relied upon in production
scenarios."
 
  • Like
Reactions: w1z

w1z

macrumors 6502a
Original poster
Aug 20, 2013
692
480
Sounds like an app or process is crashing and generating a spindump? Can take a while. If it's happening after an hour or happening multiple times track down the cause of the crash

I'm suspecting a corrupted plist file somewhere was behind diagnosticd starting on login and behaving erratically as after manually removing folder/files in the Cache folder and some really old plists (Apple/non-Apple from 2021/22) it stopped launching on login and excessively consuming CPU time under the impacted account.. not sure which process/step helped exactly.

No, I can start/pause without issues.
This command might give an indication to what is starting diagnosticd. Log out, log in and, if diagnosticd is running, try:
Code:
sudo launchctl blame system/com.apple.diagnosticd

From the launchctl manual
"blame service-target
If the service is running, prints a human-readable string describing why launchd launched the service.
Note that services may run for many reasons; this subcommand will only show the most proximate reason.
So if a service was run due to a timer firing, this subcommand will print that reason, irrespective of
whether there were messages waiting on the service's various endpoints. This subcommand is only
intended for debugging and profiling use and its output should not be relied upon in production
scenarios."

Appreciate your feedback and testing, and I'll give that command a try next time I run into this or other process-related issues. Good stuff!

Meanwhile, console is repeatedly crashing when pausing log streaming, was working fine under 12.7.1 ... I'll look into that over the weekend.

Code:
Crashed Thread:        7  Dispatch queue: com.apple.root.default-qos

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00004679d6605440
Exception Codes:       0x0000000000000001, 0x00004679d6605440
Exception Note:        EXC_CORPSE_NOTIFY

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

Thanks guys!
 

JimmyG

macrumors 6502
Oct 19, 2019
265
225
Hudson Valley NY
diagnosticd wasn’t even running on my system, it has started after I opened the Console app. No problems with either.
You could run Onyx maintenance https://titanium-software.fr/en/onyx.html and clean the Log messages and reports. Maybe one of them got corrupted and is causing the issue.
I just updated my M1 Max MBP to 12.7.2 yesterday (the "why I'm perusing the Monterey board") and took a look under the hood and with only Finder and Terminal running and I have no instance of diagnosticd running in Activity Monitor. So I fired up Console but that, alone, does not initiate diagnosticd. Perhaps related/being-triggered by another app or process?

My 2¢ observation, hope that helps. :)
 

bogdanw

macrumors 603
Mar 10, 2009
5,746
2,768
Meanwhile, console is repeatedly crashing when pausing log streaming, was working fine under 12.7.1 ... I'll look into that over the weekend.
You could try to delete its related files with AppCleaner https://freemacsoft.net/appcleaner/

So I fired up Console but that, alone, does not initiate diagnosticd.
Yes, sorry for the omission. Just opening the Console app doesn’t start diagnosticd. After I click on “Start streaming”, diagnosticd starts.
 
  • Like
Reactions: JimmyG
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.