notifyd

Since the first El Capitan beta, to the current one, I have had to force-quit notifyd process at least every other day. I notice my fully trickedout rMBP will lag, open Acivity Monitor, and see it's consuming 50-100% of CPU. Since this AM it's used upwards of 6 hours of CPU time.

Replies

I've been having the same issue. I've noticed it tends to happen right after closing a session in iTerm.

Same here, about 60% of times I get the issue when closing iTerm but I also got that once closing Preview

Yes, appears connected to Terminal.app. Persists in beta 6. notifyd's CPU usage skyrockets after running a command. Not helping with my productivity efficiency ha

This is the log I got from the console app:



17/08/15 15:55:58,828 osascript[82223]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
17/08/15 15:55:58,828 osascript[82223]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
17/08/15 15:55:58,828 osascript[82223]: LaunchServices: Database mapping failed with result -10822, retrying
17/08/15 15:55:58,828 osascript[82223]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
17/08/15 15:56:01,565 login[4657]: DEAD_PROCESS: 4657 ttys000
17/08/15 15:56:01,566 iTerm2-Server[4656]: select returned -1, error = Interrupted system call
17/08/15 15:56:01,566 iTerm2-Server[4656]: Calling select...
17/08/15 15:56:01,566 iTerm2-Server[4656]: select returned 1, error = Interrupted system call
17/08/15 15:56:01,566 iTerm2-Server[4656]: select returned. child dead=2, connection closed=0
17/08/15 15:56:01,566 iTerm2-Server[4656]: Connection closed.
17/08/15 15:56:01,566 iTerm2-Server[4656]: Unlink /var/tmp/iTerm2.socket.4656
17/08/15 15:56:01,569 iTerm2[4655]: File descriptor server exited with status 0
17/08/15 15:56:06,255 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:56:06,575 iTerm2[4655]: File descriptor server exited with status 0
17/08/15 15:56:21,600 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:56:31,736 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:56:42,489 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:57:06,399 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:57:09,374 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:09,521 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:09,588 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 215 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:09,591 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:09,696 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 216 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:09,701 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:09,778 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:09,888 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 217 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:09,888 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 218 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:09,892 Spotlight[380]: XPC connection was invalidated
17/08/15 15:57:10,000 kernel[0]: process notifyd[107] thread 3970763 caught burning CPU! It used more than 50% CPU (Actual recent usage: 55%) over 180 seconds. thread lifetime cpu usage 90.024405 seconds, (89.592387 user, 0.432018 system) ledger info: balance: 90008093414 credit: 90008093414 debit: 0 limit: 90000000000 (50%) period: 180000000000 time since last refill (ns): 162960397176
17/08/15 15:57:10,290 com.apple.xpc.launchd[1]: (com.apple.ReportCrash.Root[82229]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash.DirectoryService
17/08/15 15:57:10,336 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 226 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:10,336 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 225 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
17/08/15 15:57:10,381 sandboxd[143]: ([388]) SpotlightNetHelp(388) deny system-fsctl 0x682f
17/08/15 15:57:10,418 sandboxd[143]: ([388]) SpotlightNetHelp(388) deny system-fsctl 0x682f
17/08/15 15:57:52,367 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:58:07,881 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:58:13,068 com.apple.xpc.launchd[1]: (com.apple.ActivityMonitor.19232[28859]) Service exited due to signal: Terminated: 15
17/08/15 15:58:13,084 sysmond[231]: assertion failed: 15A243d: sysmond + 13471 [A4B0FFB0-162B-3358-A9E7-8328B6AB6362]: 0x0
17/08/15 15:58:14,000 syslogd[47]: ASL Sender Statistics
17/08/15 15:58:20,518 iTerm2[4655]: Tab bar control view for <PseudoTerminal: 0x7fd6c23088d0> (<PTYWindow: 0x7fd6bb0097c0 frame=NSRect: {{155, 93}, {400, 422}}>) is <iTermTabBarControlView: 0x7fd6c25c2120>
17/08/15 15:58:20,518 iTerm2[4655]: Add tab bar control <iTermTabBarControlView: 0x7fd6c25c2120> as subview of <SolidColorView: 0x7fd6b8f637b0 frame={{0, 0}, {400, 400}} isHidden=0 alphaValue=1>
17/08/15 15:58:20,585 iTerm2[4655]: ReceiveMessageAndFileDescriptor
17/08/15 15:58:22,508 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:58:35,507 WindowServer[199]: send_datagram_available_ping: pid 428 failed to act on a ping it dequeued before timing out.
17/08/15 15:58:44,210 SpotlightNetHelper[388]: tcp_connection_destination_handle_tls_close_notify 229 closing socket due to TLS CLOSE_NOTIFY alert
17/08/15 15:58:44,210 SpotlightNetHelper[388]: tcp_connection_tls_session_error_callback_imp 229 __tcp_connection_tls_session_callback_write_block_invoke.434 error 32
17/08/15 15:59:18,351 watchdogd[274]: [watchdog_daemon] @(_wd_daemon_service_thread) - service (com.apple.WindowServer) reported as unresponsive

I am still having this exact issue mostly when I am running tmux within Terminal, wondering if anyone has found a resolution to this.

Yup, same here. Only happens when I use tmux. Specifically, tmux and zsh with powerline. I switched to using nothing but bash for a few weeks and the notifyd issue didn't appear at all. Then I switched back to tmux/zsh and it reappeared. So that's definitely part of the problem. I'm going to mess around with the configuration a bit to see if I can narrow it down some more.

Same here, notifyd needs to be killed now and then, since it's making the system sluggish and is the top cumulative CPU user. Haven't been able to pinpoint what. Also, it seems in El Capitan you cannot dtrace notifyd to see what it is doing.


This was present in GM and in 10.11.1 beta

In my case it's definitely being triggered by tmux.

I have also observed problems with notifyd either when


Waking from sleep

Starting tmux sessions

Ending tmux sessions


In order to have some more logging of notifyd, I did


cp /System/Library/LaunchDaemons/com.apple.notifyd.plist /root


edited /root/com.apple.notifyd.plist and added -d to args like so:


<key>ProgramArguments</key>
        <array>
                <string>/usr/sbin/notifyd</string>
                <string>-d</string>
        </array>


Unloaded the system service


launchctl unload /System/Library/LaunchDaemons/com.apple.notifyd.plist


Loaded my modified copy


launchctl load /root/com.apple.notifyd.plist


Now logs appear in /var/log/notifyd.log, hopefully i'll catch something useful when notifyd goes crazy

Do you have steps to reproduce?

Is this the same issue? https://github.com/tmux/tmux/issues/108

I had the same issue, but I think I'm onto something... If you inspected the notifyd process with the Activity Monitor, you'll see a high number of faults and context switches in the statistics tabs. When I'm using tmux + tmux-powerline, notifyd starts context switching at thousands per seconds and faulting at hundreds per seconds. Once I disabled tmux-powerline and completed restarted tmux, the rates seem lower. I tried disabling the widgets in powerline instead of completely disabling the powerline, without any success. I also tried to lower the status bar refresh rate in tmux.conf instead of disabling the powerline, and it does seem to help. I also notice that the faults and context switches increase when you simply use tmux (change tabs, type in it). So, my guess is that it really seems to be related to https://github.com/tmux/tmux/issues/108. Slowing down tmux refreshes seems to help a bit, but doesn't actually fix the issue.

There is a temporary workaround in tmux with this:


set -g status-interval 0


This is definitely an issue with notifyd though that Apple will have to fix.