BUG in libdispatch client

I've implemented a custom VPN app for macOS (Network Extension, Packet Tunnel Provider).

I got some reports that my app crashed. I asked for the Console logs, and I saw this log:


MyAppExtension[85331]: BUG in libdispatch client: vnode, monitored resource vanished before the source cancel handler was invoked { 0x7f9debe12120[source], ident: 5 / 0x5, handler: 0x107f09ced }



This log appeared multiple times (every couple of hours), each time with a different PID:


MyAppExtension[85765]: BUG in libdispatch client: vnode, monitored resource vanished before the source cancel handler was invoked { 0x7fe76fc1ae70[source], ident: 5 / 0x5, handler: 0x1007d5ced }



Is it what crashed the app? The PID was different each time, so I guess it did crash the app.
What info can I get from this message (how to debug it)?

Answered by Systems Engineer in 669790022

But regarding to the log "BUG in libdispatch client: vnode, monitored resource vanished before the source cancel handler was invoked " - is it coming from the OS, or can happen because of my code?

Hard to say; the message, "BUG in libdispatch," is coming from libdispatch, and it looks like it's coming from _dispatch_bug_mach_client (open source link here), but tracking down what provoked this could be on the OS end or in your code is the difficult part. If you run through a crash report and this is taking place on a thread that only contains libdispatch code, i'd open a bug report just to be safe.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

What info can I get from this message (how to debug it)?

I would open a bug report on this. It looks like your Packet Tunnel Extension is crashing. Take a look in the Console.app under Reports for the Crash Report and there should be more information in the Crash Report.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
True, it probably crashed.
But regarding to the log "BUG in libdispatch client: vnode, monitored resource vanished before the source cancel handler was invoked " - is it coming from the OS, or can happen because of my code?

Accepted Answer

But regarding to the log "BUG in libdispatch client: vnode, monitored resource vanished before the source cancel handler was invoked " - is it coming from the OS, or can happen because of my code?

Hard to say; the message, "BUG in libdispatch," is coming from libdispatch, and it looks like it's coming from _dispatch_bug_mach_client (open source link here), but tracking down what provoked this could be on the OS end or in your code is the difficult part. If you run through a crash report and this is taking place on a thread that only contains libdispatch code, i'd open a bug report just to be safe.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
OK, once I'll have the Crash Report I'll open a bug report and update.
Thank you!
BUG in libdispatch client
 
 
Q