You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Slow boot - com.apple.afpstat-qfa[271]) Job failed to exec

Hi,


I have a Macbook Pro Retina. All has been working fine since I first got the MBP, but now I have a 30 second delay in booting each time.


Looking in the log I see this:

16/08/2012 10:07:05.284 CalendarAgent[245]: Property list invalid for format: 100 (property lists cannot contain objects of type 'CFSet')

16/08/2012 10:07:05.798 NetUpdate[91]: Launch background checker (Post reboot: 0)

16/08/2012 10:07:25.244 com.apple.launchd.peruser.501[170]: (com.apple.afpstat-qfa[271]) Job failed to exec(3). Setting up event to tell us when to try again: 2: No such file or directory

16/08/2012 10:07:25.244 com.apple.launchd.peruser.501[170]: (com.apple.afpstat-qfa[271]) Job failed to exec(3) for weird reason: 2

16/08/2012 10:07:26.317 appleprofilepolicyd[286]: appleprofilepolicyd: profiling drivers not loaded, loading


Every time there is a delay in boot I see a gap in the boot sequence log just before the error message in red above.


Does anyone have any idea a) what this is doing; and b) what might be causing the problem?


I have tried repairing permissions etc. but that didn't solve it.


Thanks


Darren.

MacBook Pro with Retina display, OS X Mountain Lion

Posted on Aug 16, 2012 8:02 AM

Reply
2 replies

Aug 16, 2012 10:19 AM in response to tenjinuk

I'm going to answer your question in more detail than you probably want, because it's somewhat important and I want to make a record.


The job referenced by those log messages is started when a user logs in, and the per-user launchd(8) process loads the following file:


/System/Library/LaunchAgents/com.apple.afpstat.plist


The file instructs launchd to invoke an executable at the path /usr/local/bin/afpstat. Although the syntax is correct, the executable doesn't exist. Even the directory doesn't exist, by default. I've searched all the Apple installer receipts in ML, and none of them refers to that file.

So what has happened here is that some extra pieces were inserted into ML during development, for debugging purposes no doubt. When the time came for release, the executable was removed, but the developer who removed it forgot to remove the corresponding launchd item. Every ML installation has it, and every one is being delayed during boot when it fails.


The solution to this problem is to delete the file that the Apple developer forgot to delete. In the Finder, select Go Go to Folder... from the menu bar, copy the text outlined above into the box that opens, and press return. A folder will open with the item selected. Move the selected item to the Trash, then empty. You'll be prompted for your login password.
Edit: On my Macs, although the same error is logged, it doesn't seem to be causing a delay of more than one second, so deleting the bogus LaunchAgent may not have a noticeable effect.

Apr 6, 2013 3:16 PM in response to Linc Davis

Linc,


Thank you for tracking that down. While I understand launchd and friend fairly well, I didn't think that Apple would send our a bad LaunchAgent or perhaps a premature link to an currently non-existance Agent. But it now makes perhaps sense as you outlined..... Were you able to figure this out because of being a Apple Dev - as in a paid subscribe Apple Dev or is this just a good guess of what has happened in this case?


Terry

Slow boot - com.apple.afpstat-qfa[271]) Job failed to exec

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