Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Since I upgraded to Mavericks, I often have the following processes using full CPU power:

  • securityd
  • syslogd
  • kernel_task

I guess securityd contains a bug, because it is polluting /var/log/system.log with thousands of messages per second, and the system can not follow up.

Here is an example of messages I get:

Nov 11 15:55:10 localhost securityd[22]: assertion failed: 13A603: libxpc.dylib + 44365 [4554927A-9467-365C-91F1-5A116989DD7F]: 0x13
Nov 11 16:14:47 --- last message repeated 1 time ---
Nov 11 15:55:10 localhost securityd[22]: assertion failed: 13A603: libxpc.dylib + 26642 [4554927A-9467-365C-91F1-5A116989DD7F]: 0x13
Nov 11 16:14:47 --- last message repeated 1 time ---
Nov 11 15:55:10 localhost securityd[22]: assertion failed: 13A603: libxpc.dylib + 44365 [4554927A-9467-365C-91F1-5A116989DD7F]: 0x13
Nov 11 16:14:47 --- last message repeated 1 time ---
Nov 11 15:55:10 localhost securityd[22]: assertion failed: 13A603: libxpc.dylib + 26642 [4554927A-9467-365C-91F1-5A116989DD7F]: 0x13
Nov 11 16:14:47 --- last message repeated 1 time ---

I believe this is a critical issue, as it makes Mac OS X is extremely slow and unresponsive.

Killing securityid doesn't help. The process is recreated, and keeps polluting syslogd.

If I reboot the entire system, everything seems ok for a while, before the same issue happens again. I didn't figured out what triggers this issue yet.

share|improve this question
    
If you don't get a good answer, you could run sudo sysdiagnose securityd and file a bug report and possibly get assistance from apple in fixing the bug or troubleshooting the cause. –  bmike Nov 11 '13 at 16:37
1  
You could also try to temporarily remove /System/Library/LaunchDaemons/com.apple.securityd.plist or /usr/sbin/securityd or do an upgrade install of OS X from the recovery partition. –  Lri Nov 11 '13 at 17:04
    
I've had this securityd assertion failed problem with 10.9, too. I'm not sure what the problem is yet, but I've rebooted in Safe Mode and been uninstalling various third-party packages (virus scanner, ...) with kernel extensions as identified by EtreCheck. I suspect that one of them is the problem, but since it is a bit intermittent, I'm going to wait a while longer before I claim to have fixed it. –  scott Nov 22 '13 at 22:04

7 Answers 7

In my case, the haywire securityd process was caused by GitHub desktop app - during commit, network issues caused an error in ssh handshake. Subsequent commits went fine. GitHub app was left open, securityd was heating up my CPU. Quitting GitHub app fixed the problem - probably terminating something in securityd. So my guess is, securityd has some infinite loop issue during crypto operations, maybe just with ssh and handshakes.

So, check if and how your daily workflow can trigger securityd (logging into server? github?) and isolate the problem.

share|improve this answer
    
Github app was the culprit for me as well. –  Teetotum May 2 at 20:47

Troubleshooting the actual cause may be problematic since XPC is a generic inter-process communication protocol and only loads on demand. The Apple software uses this subsystem as can any third party program - so it could be Apple's fault or it could be something you are running and the main problem is you don't have an easy way to know which program is causing the heavy logging load (and perhaps a heavy legitimate workload as well as just logging).


I agree that any diagnostic logging that is so rapid and uncontrollable as to affect either the energy usage of the computer or the performance of the computer noticeably should be considered a fault.

The most productive way to address that is actually to document the problem and report this as a bug to Apple.

Mavericks has done a stellar job at exposing both the diagnostic tools and the energy usage over time of all processes to the interested end user.

  • Open Energy Saver, select Energy and sort by Avg Energy Impact - snap a picture of the window it processes the last day's usage logs.
  • Select the CPU view, search for securityd, select it in the list of active tasks and then "Run System Diagnostics..." either from the View menu or the gear in the toolbar.
  • Send both the picture and the compressed diagnostics report to Apple at https://developer.apple.com/bug-reporting/

You will need an AppleID that is associated with some sort of developer account, so you can sign up as a Safari developer for free if you don't already have an account that is enabled for reporting specific bugs to Apple.

share|improve this answer
    
Also - if anyone has steps to reproduce this bug in securityd - I'll happily file a duplicate bug report and do the work to submit this to Apple, but I've not had a single system log any volume of these messages on 10.9 for several months. –  bmike Jan 2 at 19:05
    
thanks for the instructions, I generated a report, but your link where I could send the report doesn't work. It redirect to a JSON dataset, saying "Your session has timed out due to inactivity." –  alartur Jan 28 at 13:51
    
Looks like the URL has changed, I'll link to the article that explains how to use the tool instead. It has a sign in and sign up link on the left of the page (currently). –  bmike Jan 28 at 13:59
    
It finally works — thanks — maybe it was a temporary bug on Apple's servers. I filled a bug with the output of sysdiagnose securityd. –  alartur Jan 28 at 14:08

I'm seeing the same exact problem for the second time in a row within a week with the exact same messages in the console.

For me, rebooting usually solves the problem (first time I had to force shutdown as machine was unresponsive). And like you, I have yet to find the trigger that starts the messages.

The activity monitor is not the culprit, I am usually alerted by the fan going crazy, so then I start the activity monitor just to see both syslogd and securityd using about 90% of CPU.

share|improve this answer
    
Might the trigger be opening Activity Monitor and asking it to graph historical energy usage patterns? I see the spike in CPU usage when I do that, but apparently my logs from the past day or two aren't corrupt in a way that causes the flood of console messages. –  bmike Nov 18 '13 at 23:32
    
@bmike no. It seems like nothing special triggers it. My feeling is that it happens when computer is on for a while, and when I login after a screen saver / suspended activity. Also, when I login, I have two or three other prompts about my password, it may be related to this issue. –  alartur Jan 28 at 13:35
    
I filled a bug report at bugreport.apple.com and it was closed today, saying it is a duplicate of bug #15090630 (that is still open). Is there a way to see this bug report? –  alartur Jan 29 at 10:53

I think this may be a bug much older than Mavericks. I'm not sure I was having the same problem as you because I never checked my syslog, but I did have securityd eating up CPU and RAM. I used an old solution from 2007 (for Leopard?).

tldr:

sudo mv /var/db/CodeEquivalenceDatabase /var/db/CodeEquivalenceDatabase.old

then restart. Feel free to delete the old file afterwards, as OS X automatically creates a new one.

share|improve this answer
    
Hello, please be aware that this bug is related to the system logs pollution. If securityd didn't produce so much debug output, the system wouldn't run at 100% CPU. Apparently, Apple developers are aware of this bug, because I reported it and it was marked as a duplicate. So I guess we have to wait… –  alartur Feb 20 at 15:56

You can temporarily alleviate the problem by restarting SecurityAgent using the following terminal command:

sudo killall SecurityAgent

This worked each time for me. I am still investigating the root cause.


As far as I can tell, this was triggered by switching to another user account where I'd had to reset the password as I'd forgotten the original password. This caused multiple Keychain failures (original password required to unlock the Keychain) and I got an 'endless loop' of prompts along the lines of 'Apple Messages Agent wants to use the item 'login' from your keychain..'

share|improve this answer
    
I also have multiple prompts about my password after a login (2, 3, maybe 4 from time to time). –  alartur Jan 28 at 13:37
    
Killing SecurityAgent seems to have worked for me as well. Thanks! But I'd like to understand the root cause as well. I've just filled bug #15924434 at bugreport.apple.com with the output of sysdiagnose securityd. –  alartur Jan 28 at 14:07

I created a VM using virtualBox and this issue is somewhat recreateable. I have created some keychain items and when I visit the website that the keychain item is for, the VM hangs for a good 1-2min, then frees up. It may be git-osxkeychain-helper causing the securityd process to eat the whole cpu.

share|improve this answer

Seems to have something to do with keychain manager. I was just having this and killed keychain and it went away.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.