Hammerspoon: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked

Created on 22 Sep 2016  路  10Comments  路  Source: Hammerspoon/hammerspoon

Been seeing this message in syslog since Sierra once in a while. No known reason or crashlog.

syslog: Sep 21 15:30:55 hostname1 Hammerspoon[56068]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked

Most helpful comment

I'm still having this error in 2019 along with other slow bootup problems on High Sierra.

All 10 comments

I've also seen this in the Bluetooth Explorer Event Log.
Just upgraded to Sierra.
I also see error:
Google Chrome[xxxx]: objc[xxxx]: __weak variable at 0x618003a25730 holds 0x2121212121212121 instead of 0x61800041e380. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug. not sure what thats about...

Trying to figure out why my bose quiet comfort 35's keep disconnecting, along with my bt mouse and keyboard sometimes...

@junkblocker ooi are you still seeing this in more recent versions of Sierra? I don't have any instances of it in my logs atm, but I may also be using different Hammerspoon modules to you.

Yes, I am. From today

...
...
2017-04-27 08:37:27: -- Loading extension: json
2017-04-27 08:37:27: syslog:    syslog: Apr 27 07:40:45 hostname Hammerspoon[72260]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
2017-04-27 08:37:27: syslog:    syslog: Apr 27 07:41:25 hostname Hammerspoon[67819]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
2017-04-27 08:37:27: syslog:    syslog: Apr 27 08:19:43 hostname Hammerspoon[71044]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
...
...

The 2017-04-27 08:37:27: syslog: prefix is from my own syslog module grepping syslog for such strings.

Is your config visible somewhere?

Nope, too many private details embedded to share. Now that I look at it, it seems other apps are logging the same issue

Apr 27 07:30:20 hostname Microsoft Outlook[66114]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 07:31:32 hostname NetNewsWire[66368]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 07:40:45 hostname Hammerspoon[72260]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 07:41:25 hostname Hammerspoon[67819]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 07:43:13 hostname LaunchControl[68742]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 07:44:05 hostname com.apple.preferences.users.remoteservice[69442]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:19:43 hostname Hammerspoon[71044]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:28:18 hostname Microsoft Outlook[77124]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:36:17 hostname Adium[79056]: BUG in libdispatch client: kevent[EVFILT_READ] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:36:33 hostname Adium[79358]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:38:18 hostname Hammerspoon[79465]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 08:38:40 hostname Adium[80049]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked
Apr 27 10:05:31 hostname SourceTree[87783]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked

fwiw the level of detail in logs in Sierra is way higher than it used to be, so I suspect this may well just be something that was always happening, and can be ignored, but we should do some research before deciding that for sure. Thanks!

I'm going to close this issue out because it doesn't seem to be getting any traction. Anyone please feel free to re-open it if you want to work on this :)

I noticed this same "BUG in libdispatch" message. For me, it came up in the System Log Console after stopping Spotlight in my MacOS Sierra. I had never seen it before, so I assume it has something to do with this little mess and the fact Location Services and Siri are both accessing your computer remotely via a "Remote Connection Agent" and from the log it seems to be an error message related to Spotlight?

" com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Mar 8 07:32:01 syslogd[n1]: ASL Sender Statistics
Mar 8 07:32:46 login[nn1]: USER_PROCESS: 811 ttys001
Mar 8 07:33:11 Activity Monitor[nn1]: BUG in libdispatch client: kevent[EVFILT_MACHPORT] monitored resource vanished before the source cancel handler was invoked"

'monitored resource vanished before the source cancel handler was invoked'
This is the syslog up to 'the out of memory error ' which caused me to look at it.
Any thoughts? thanks

Sep 19 02:10:26 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.quicklook[12330]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Sep 19 02:10:32 jcm-noaccess secd[12334]: objc[12334]: Class SecSOSStatus is implemented in both /System/Library/Frameworks/Security.framework/Versions/A/Security (0x7fffad0a8d78) and /usr/libexec/secd (0x1010b9850). One of the two will be used. Which one is undefined.
Sep 19 02:10:35 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:11:05 --- last message repeated 3 times ---
Sep 19 02:11:10 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:11:16 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:11:20 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.quicklook[12350]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Sep 19 02:11:22 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:11:42 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.quicklook[12366]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Sep 19 02:11:51 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:12:39 jcm-noaccess networkserviceproxy[12374]: objc[12374]: Class NSPFlowDivert is implemented in both /System/Library/PrivateFrameworks/NetworkServiceProxy.framework/Versions/A/NetworkServiceProxy (0x7fffaf9d3160) and /usr/libexec/networkserviceproxy (0x10784d8f0). One of the two will be used. Which one is undefined.
Sep 19 02:12:55 jcm-noaccess systemstats[71]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Sep 19 02:12:59 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:13:12 --- last message repeated 1 time ---
Sep 19 02:13:12 jcm-noaccess com.apple.xpc.launchd[1] (com.adobe.Photoshop.97200[9780]): Service exited due to signal: Terminated: 15 sent by loginwindow[113]
Sep 19 02:13:12 jcm-noaccess systemstats[71]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Sep 19 02:13:17 --- last message repeated 2 times ---
Sep 19 02:13:17 jcm-noaccess spindump[11924]: BUG in libdispatch client: dispatch_mig_server: mach_msg() failed (ipc/send) invalid data - 0x10000002
Sep 19 02:13:17 jcm-noaccess spindump_agent[12387]: BUG in libdispatch client: dispatch_mig_server: mach_msg() failed (ipc/send) msg too small - 0x10000008
Sep 19 02:13:23 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:14:00 --- last message repeated 1 time ---
Sep 19 02:14:00 jcm-noaccess SystemUIServer[392]: assertion failed: 17G65: libxpc.dylib + 75013 [0BC7AD67-671D-31D4-8B88-C317B8379598]: 0x89
Sep 19 02:14:00 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:14:16 --- last message repeated 1 time ---
Sep 19 02:14:16 jcm-noaccess systemstats[71]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Sep 19 02:14:25 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.bluetoothUIServer): Service only ran for 8 seconds. Pushing respawn out by 2 seconds.
Sep 19 02:14:50 jcm-noaccess systemstats[71]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Sep 19 02:14:54 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:15:15 jcm-noaccess diagnosticd[12438]: System mode client started - Console (12436) - mode: 0xb
Sep 19 02:15:16 jcm-noaccess diagnosticd[12438]: no EOS device present
Sep 19 02:15:19 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:18:19 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:19:14 jcm-noaccess syslogd[61]: ASL Sender Statistics
Sep 19 02:19:14 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:20:41 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:41.793 ksinstall[12457/0x7fffb206b380] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer started.
Sep 19 02:20:41 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:41.844 ksinstall[12457/0x7fffb206b380] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer starting Installation.
Sep 19 02:20:41 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:41.987 ksinstall[12457/0x7fffb206b380] [lvl=2] -[KeystoneInstallBackend install] Google Software Update attempting to install.
Sep 19 02:20:43 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:43.010 ksinstall[12457/0x7fffb206b380] [lvl=2] +[KSCodeSigningVerification verifyBundle:applicationId:error:] KSCodeSigningVerification verifying code signing for '/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle' with the requirement 'anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU]="EQHXZ8M8AV" and (identifier="com.google.Keystone")'
Sep 19 02:20:43 jcm-noaccess Google Chrome[12453]: BUG in libdispatch client: kevent[mach_recv] monitored resource vanished before the source cancel handler was invoked
Sep 19 02:20:52 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:52.836 ksinstall[12457/0x7fffb206b380] [lvl=2] -[KeystoneInstallBackend shouldInstallWithVersion:error:] Google Software Update found version that is the same or newer: 1.2.11.124.
Sep 19 02:20:52 jcm-noaccess ksinstall[12457]: 2018-09-19 02:20:52.868 ksinstall[12457/0x7fffb206b380] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer ran successfully.
Sep 19 02:20:58 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:21:00 jcm-noaccess ksadmin[12467]: Using ticket store: cketStore:0x7fc8e440f410 store=tentStore:0x7fc8e460aa10
path="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore"
lockFile= path="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
resolvedPath="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
shared=NO fileSpecificLock=0x7fc8e4413320>
keyType=NSString
valueTypes={(
KSTicket
)}

.
Sep 19 02:21:00 jcm-noaccess ksadmin[12467]: Creating a new ticket...
Sep 19 02:21:01 jcm-noaccess ksadmin[12467]: Created ticket <KSTicket:0x7fc8e460bd30
productID=com.google.Chrome
version=68.0.3440.106
xc=
serverType=Omaha
url=https://tools.google.com/service/update2
creationDate=2016-12-09 03:45:43
tagPath=/Applications/Google Chrome.app/Contents/Info.plist
tagKey=KSChannelID
brandPath=/Users/jasonmccomb/Library/Google/Google Chrome Brand.plist
brandKey=KSBrandID
versionPath=/Applications/Google Chrome.app/Contents/Info.plist
versionKey=KSVersion
cohort=1:1y5:[email protected]
cohortName=Stable
ticketVersion=1
in store /Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.
Sep 19 02:21:01 jcm-noaccess ksadmin[12468]: Using ticket store: cketStore:0x7fe7d140ce70 store=tentStore:0x7fe7d140ceb0
path="/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore"
lockFile= path="/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
resolvedPath="/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
shared=NO fileSpecificLock=0x7fe7d140e4e0>
keyType=NSString
valueTypes={(
KSTicket
)}
.
Sep 19 02:21:01 jcm-noaccess ksadmin[12468]: KSKeyedPersistentStore store directory does not exist. [com.google.UpdateEngine.CommonErrorDomain:501 - '/Library/Google/GoogleSoftwareUpdate/TicketStore' - 'KSKeyedPersistentStore.m:327']
Sep 19 02:21:01 jcm-noaccess ksadmin[12468]: KSPersistentTicketStore failed to load tickets. (productID: com.google.Chrome) [com.google.UpdateEngine.CoreErrorDomain:1051 - '/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore'] (KSKeyedPersistentStore store directory does not exist. - '/Library/Google/GoogleSoftwareUpdate/TicketStore' [com.google.UpdateEngine.CommonErrorDomain:501])
Sep 19 02:21:01 jcm-noaccess ksadmin[12468]: ksadmin cannot access the ticket store:dateError:0x7fe7d140f190
domain="com.google.UpdateEngine.CoreErrorDomain"
code=1051
userInfo={
function = "-[KSProductKeyedStore(ProtectedMethods) errorForStoreError:productID:message:timeoutMessage:]";
date = 2018-09-19 09:21:01 +0000;
productids = {(
"com.google.Chrome"
)};
filename = "KSProductKeyedStore.m";
line = 102;
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore";
NSUnderlyingError = <KSError:0x7fe7d1702d00
domain="com.google.UpdateEngine.CommonErrorDomain"
code=501
userInfo={
NSLocalizedDescription = "KSKeyedPersistentStore store directory does not exist.";
line = 327;
filename = "KSKeyedPersistentStore.m";
function = "-[KSKeyedPersistentStore(PrivateMethods) validateStorePath]";
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore";
date = 2018-09-19 09:21:01 +0000;
}
;
NSLocalizedDescription = "KSPersistentTicketStore failed to load tickets.";
}

Sep 19 02:21:01 jcm-noaccess Google Chrome[12453]: Errors logged by ksadmin: KSKeyedPersistentStore store directory does not exist. [com.google.UpdateEngine.CommonErrorDomain:501 - '/Library/Google/GoogleSoftwareUpdate/TicketStore' - 'KSKeyedPersistentStore.m:327']
KSPersistentTicketStore failed to load tickets. (productID: com.google.Chrome) [com.google.UpdateEngine.CoreErrorDomain:1051 - '/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore'] (KSKeyedPersistentStore store directory does not exist. - '/Library/Google/GoogleSoftwareUpdate/TicketStore' [com.google.UpdateEngine.CommonErrorDomain:501])
ksadmin cannot access the ticket store:dateError:0x7fe7d140f190
domain="com.google.UpdateEngine.CoreErrorDomain"
code=1051
userInfo={
function = "-[KSProductKeyedStore(ProtectedMethods) errorForStoreError:productID:message:timeoutMessage:]";
date = 2018-09-19 09:21:01 +0000;
productids = {(
"com.google.Chrome"
)};
filename = "KSProductKeyedStore.m";
line = 102;
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore";
NSUnderlyingError = <KSError:0x7fe7d1702d00
domain="com.google.UpdateEngine.CommonErrorDomain"
code=501
userInfo={
NSLocalizedDescription = "KSKeyedPersistentStore store directory does not exist.";
line = 327;
filename = "KSKeyedPersistentStore.m";
function = "-[KSKeyedPersistentStore(PrivateMethods) validateStorePath]";
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore";
date = 2018-09-19 09:21:01 +0000;
}
;
NSLocalizedDescription = "KSPersistentTicketStore failed to load tickets.";
}

Sep 19 02:21:01 jcm-noaccess ksadmin[12469]: Using ticket store: cketStore:0x7f9995c057d0 store=tentStore:0x7f9995c05810
path="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore"
lockFile= path="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
resolvedPath="/Users/jasonmccomb/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore.lock"
shared=NO fileSpecificLock=0x7f9995c06f20>
keyType=NSString
valueTypes={(
KSTicket
)}

.
Sep 19 02:22:38 jcm-noaccess Console[12436]: BUG in libdispatch client: kevent[vnode] monitored resource vanished before the source cancel handler was invoked
Sep 19 02:23:36 jcm-noaccess systemstats[71]: assertion failed: 17G65: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40
Sep 19 02:26:17 jcm-noaccess com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
Sep 19 02:30:02 jcm-noaccess syslogd[61]: ASL Sender Statistics

I'm still having this error in 2019 along with other slow bootup problems on High Sierra.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazandrei19 picture lazandrei19  路  4Comments

latenitefilms picture latenitefilms  路  3Comments

piskov picture piskov  路  4Comments

latenitefilms picture latenitefilms  路  4Comments

zhenwenc picture zhenwenc  路  4Comments