MacOS – Notification Center errors filling up /var/log/system.log

logsmacosnotifications

Once per second I'm getting the following errors in my system.log:

Aug 28 01:15:00 Air com.apple.launchd.peruser.501[122] (com.apple.notificationcenterui.agent[52635]): Exited with code: 1
Aug 28 01:15:00 Air com.apple.launchd.peruser.501[122] (com.apple.notificationcenterui.agent): Throttling respawn: Will start in 1 seconds
Aug 28 01:15:01 Air.local NotificationCenter[52636]: Unable to load nib file: MainMenu, exiting

Is this likely affecting system performance, and what can I do about it?

Note that the "Air" in the log is my very creative name for the MacBook Air computer I use. Also, Notification Center is delivering notifications as expected through all this; I don't know why it's attempting to respawn because as far as I can tell, the process isn't dead.

The output of ps -x |grep otific
is

 341 ??         0:22.61 /System/Library/CoreServices/Notification Center.app/Contents/MacOS/NotificationCenter -psn_0_430185

Notifications appear as expected.

The file /System/Library/CoreServices/Notification Center.app/Contents/Resources/en.lproj/MainMenu.nib has the following ls -l entry:

-rw-r--r-- 1 root wheel 1787 Jul 25 2012 MainMenu.nib

Best Answer

The solution is a bit of a mystery but if you really have /System/Library/CoreServices/Notification Center.app with the space and not /System/Library/CoreServices/NotificationCenter.app you may have to reinstall the OS or restore that entire directory from backup (or another similar Mac OS install).

As to the load on the computer due to the logging - it should be harmless or at worst a minor slowdown. I have Macs with thousands of messages a minute and can barely measure their load running Activity Monitor even when I have several windows up tailing the logs, grepping for patterns to filter out noise like you mention.

You can assure yourself the system is not loaded with the following command:

 iostat 15

You can run with the notifications running and the error messages and without and watch for long term problems in terms of CPU usage and disk IO. Airs and other SSD based Macs generally have plenty of horsepower to deal with thousands of messages a second let alone per minute and the system logging infrastructure scales very well, uses little RAM and is miserly with CPU and disk access.


Now, as far as hunting down the culprit - it's going to be a bit of sleuthing unless someone has already slayed this bug by noticing why the space got added in that directory for the app.

I would probably edit the plist file for that process to set the respawn to be 100 or 300 or 600 until you have a handle on the error (and if you don't want to see so many messages). Also, when you have unloaded (or removed) the job from launchd control, you could manually run the program from the terminal to see if it output any errors on startup that might help you.

 launchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist   
 /System/Library/CoreServices/NotificationCenter.app/Contents/MacOS/NotificationCenter

You can quit the app by pressing control+c - If it's a permission error, you could test that by running the process as root:

sudo /System/Library/CoreServices/NotificationCenter.app/Contents/MacOS/NotificationCenter