Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Security Agent causing high cpu

I've noticed in Activity Monitor that the "Security Agent" process is consuming 100% of a CPU core. What's more is that there are 4 "Security Agent" processes running, each at 100%!


I've noticed this problem happens every 7 days or so and I can't figure out why. The only reason I notice is that I come up to my iMac and the fans are running trying to cool the thing as it struggles with the runs away "Security Agent" processes.


Please help!


iMac 27", 10.15

Posted on Nov 19, 2019 6:22 PM

Reply
Question marked as Best reply

Posted on Nov 19, 2019 7:57 PM

I do not see such a process on my system. I found a reference in one of the Developers manuals:


Security Agent

The Security Agent is a separate process that provides the user interface for the Security Server in macOS (not iOS). Its primary purpose is to request authentication whenever an app requests additional privileges.

When the Security Server requires the user to authenticate, the Security Agent displays a dialog requesting a user name and password. The advantages of performing this action in a separate process are twofold. First, an application can obtain authorization without ever having access to the user’s credentials (username and password, for example). Second, it enables Apple to add new forms of authentication without requiring every application to understand them.

The Security Agent requires that the user be physically present in order to be authenticated. Because the graphical user interface elements can’t be used through a command-line interface such as the Terminal app or a secure shell (ssh) remote session, this restriction makes it much more difficult for a malicious user to breach an app’s security.


Perhaps this may help you track down what is causing the problem. One thing you might try:


About Safe Mode



Boot into safe mode then restart normally. This clears out a number of caches which may stop the process from eating up so much CPU time. Safe mode is much slower than a normal startup, so be patient.


46 replies
Question marked as Best reply

Nov 19, 2019 7:57 PM in response to admiral u

I do not see such a process on my system. I found a reference in one of the Developers manuals:


Security Agent

The Security Agent is a separate process that provides the user interface for the Security Server in macOS (not iOS). Its primary purpose is to request authentication whenever an app requests additional privileges.

When the Security Server requires the user to authenticate, the Security Agent displays a dialog requesting a user name and password. The advantages of performing this action in a separate process are twofold. First, an application can obtain authorization without ever having access to the user’s credentials (username and password, for example). Second, it enables Apple to add new forms of authentication without requiring every application to understand them.

The Security Agent requires that the user be physically present in order to be authenticated. Because the graphical user interface elements can’t be used through a command-line interface such as the Terminal app or a secure shell (ssh) remote session, this restriction makes it much more difficult for a malicious user to breach an app’s security.


Perhaps this may help you track down what is causing the problem. One thing you might try:


About Safe Mode



Boot into safe mode then restart normally. This clears out a number of caches which may stop the process from eating up so much CPU time. Safe mode is much slower than a normal startup, so be patient.


May 17, 2020 9:02 PM in response to admiral u

Same problem on a new 2019 MacBook 16" i9.


Noticed the machine was constantly warm, even after a reboot - before opening applications. As others have already noted, my systempolicyd is the culprit, causing high CPU usage about 15-20 seconds after a restart:



I also noticed that it seems to be causing a lot of disk I/O for some reason:



I dug a little deeper, and it seems that the thread is getting "stuck", using the "top" command in a terminal. It rapidly cycles between stuck and running state, every refresh it displays an alternate status (once per second):



Uugh, this is annoying. I think I'm going to try backup to timemachine and perform a reinstall to see if I can't fix whatever random thing is broken.


BTW I also checked to see if my kext store was corrupted (following the advice on this thread), but it's fine:


sudo sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy .dump



Feb 1, 2020 1:37 PM in response to Stickman32

Same problem here with a Macbook pro 16 inch i9 after update to catalina 10.15.3.

SecurityAgent process all night at 100%, for more than 8 hours so it never settle. After reboot the high CPU load is gone.


Created a sample of the process (I could not send it in the Feedback to apple because the field isn't big enough.



Looks like something to do with display (got an external monitor connected)

Sort by top of stack, same collapsed (when >= 5):
        __ulock_wait  (in libsystem_kernel.dylib)        2836
        mach_msg_trap  (in libsystem_kernel.dylib)        2836
        CoreDisplay::XXH64(unsigned char const*, unsigned long long)  (in CoreDisplay)        1322
        syscall_thread_switch  (in libsystem_kernel.dylib)        1251
        _platform_memmove$VARIANT$Haswell  (in libsystem_platform.dylib)        218
        GetRealtimeDisplayInfo(unsigned int)  (in CoreDisplay)        39

Dec 25, 2019 1:47 PM in response to admiral u

admiral u Said:

"Just an update, I have not seen this issue since the macOS 10.15.2 patch was installed on my iMac. I also turned off my wifi (I have an ethernet connection) so it seems that one of those fixed things."

-------


Inform Apple of the Update's Fix:

Inform Apple of this. Provide them feedback on this. I think it is extremely important that their engineers know about positive impacts any update whatsoever may have had on issues that may or may not have been intentionally fixed by the installation of the update. So,...

  1. Go Here: Feedback - macOS - Apple
  2. Select: "Performance" for the "Feedback Type"
  3. Select: "Software/Firmware Update" for the "Feedback Area"
  4. Proceed from there as Necessary

Feb 1, 2020 10:03 AM in response to admiral u

I have (had) the same issue with a new 16" MacBook Pro (spec, activity monitor & Intel Powergadget monitoring attached)


"SecurityAgent" pushes the CPU up to about 4.3Ghz then sits back watching the temperature rise and the battery drain... for no apparent reason. I left it for about 30 mins to see where it would go. It gets the CPU up to about 80C then leaves it simmering, until you decide to re-boot the computer.


I've also had issues with it forgetting an external monitor is attached via CalDigit TS3+ when it sleeps, which requires a re-boot.... and of course with a monitor attached the extra strain on the GPU stresses the cooling so the CPU is often sitting at 100C which I can't imagine is good for it long term.


I intimated past tense in my first paragraph with the word "had"... because I returned the machine to Apple this afternoon for a refund. I was hoping it would be a worthy replacement for my 8 year old Mac Pro.... but alas, I think they are still trying to squeeze too much grunt into too small a space.


Form above function... no, not when I rely on this for my living.


SM




Apr 10, 2020 12:49 PM in response to admiral u

I have the same problem on a 2017 MacBook Pro with i5 and other wonderful stuff inside, with 10.15.3 Catalina installed.

The problem appears randomly, I tried to follow Apple's suggestion and I cleaned my cache by booting in safe mode; now obviously the MacBook works fine, but I can't tell if the problem is solved.

Here's my table of process



Did anyone find a fix for this annoying issue?

Nov 20, 2019 5:33 AM in response to Kappy

Thanks Kappy, this is helpful. The problem goes away when I reboot the machine (safe mode or not). Once I start back up I don't see the process either. Maybe while I am away the Security Agent is trying to display a dialog or ask my permission to do something and can't? I'll try booting into safe mode and see if clearing those caches you mentioned helps.

Dec 10, 2019 7:29 PM in response to mshearer6

Some additional Information. I've noticed these messages in the Console, under Log Reports, wifi.log. This repeats over and over again.


Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events.private, will not register for event type 100
Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events.private, will not register for event type 101
Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events, but allowing anyways for event type 7
Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events, but allowing anyways for event type 2
Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events, but allowing anyways for event type 1
Tue Dec 10 11:02:50.848 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events, but allowing anyways for event type 5
Tue Dec 10 11:02:50.849 <airportd[246]> ERROR: SecurityAgent (5615) is not entitled for com.apple.wifi.events, but allowing anyways for event type 6

Jan 7, 2020 2:50 AM in response to yx66

i see this issue occurring for me as well as for others when twp or more users are logged in (you can check with tick marks on the lock screen if it is 1 or 2 or more depending on number of users one has created on the mac).


it just keeps these fans ON most of the time as this process uses 100% CPU.. 8 core i9 or 32GB RAM is of no use or help :-)

Mar 1, 2020 10:35 PM in response to admiral u

I also notice(d) this unusual behaviour of the SecurityAgent process now and then, unrelated to using Parent Control, but maybe related to booting a secondary user account on my MacBook Pro 16" (2019) with Catalina 10.15.3. I'll see if I can see a pattern in it. Signing-out that user didn't stop the activity. Restarting the whole MacBook indeed made it go away...

Mar 4, 2020 3:37 AM in response to Stickman32

Ha ! Coincidentally, I wanted to type inn my earlier message "one diagnose". Because there can be multiple causes and situations for such a problem, just like with a headache or nausea...


You need to find a pattern which triggers the problem to occur, or to vanish. That takes time and perseverance. But only with that information, a developer, engineer, or doctor might be able to come up with a thorough solution.

Security Agent causing high cpu

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.