I did not resolved the bug we had (but at least it avoided to do wrong stuff).
Now I try to go back to the first logs I got:
debug 14:25:16.056727+0200 TestES SystemExtensionInstaller - Install extension...
default 14:53:35.302403+0200 TestES [0x600003ce0000] activating connection: mach=true listener=false peer=false name=com.apple.sysextd
...
default 14:53:35.312582+0200 TestES [0x120756c90] activating connection: mach=false listener=false peer=false name=(anonymous)
default 14:53:35.312657+0200 TestES [0x600003ce0000] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
....
default 14:53:35.312657+0200 TestES [0x600003ce0000] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
....
debug 14:53:35.439389+0200 TestES SystemExtensionInstaller - didFinishWithResult: 0
SystemExtensionInstaller - *
are my logs.
So I'm not even sur that other logs are related to my xpc listenner as these messages happen during extension installation.
But what Im sure is that later, when the extension is installed and that the XPCClient has established the conneciton I saw:
debug 14:53:46.575298+0200 TestES Call start
default 14:53:46.576719+0200 tonygo.TestES.Extension [0x14c604b00] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
default 14:53:46.577816+0200 TestES [0x121a0a870] Re-initialization successful; calling out to event handler with XPC_ERROR_CONNECTION_INTERRUPTED
default 14:53:46.577229+0200 tonygo.TestES.Extension [0x14c604b00] activating connection: mach=false listener=false peer=true name=tonygo.TestES-group.xpc.peer[18172].0x14c604b00
error 14:53:46.577939+0200 TestES Remote process crashed or exited! (Catched with `interruptionHandler`)
(First and last lines is my logs)
The funny part is that if I filter to my logs only:
debug 15:15:47.541145+0200 TestES SystemExtensionInstaller - Install extension...
debug 15:15:47.562760+0200 TestES SystemExtensionInstaller - request actionForReplacingExtension
debug 15:15:47.657196+0200 TestES SystemExtensionInstaller - didFinishWithResult: 0
debug 15:15:47.667428+0200 tonygo.TestES.Extension Starting ES client
debug 15:15:47.669392+0200 tonygo.TestES.Extension ES client started!
debug 15:15:47.676040+0200 tonygo.TestES.Extension Resuming XPC Listener
debug 15:15:47.676227+0200 tonygo.TestES.Extension Resumed
debug 15:15:50.839447+0200 TestES Establishing IPC Client
debug 15:15:50.840981+0200 TestES Connection established
debug 15:15:53.668402+0200 TestES Call ping
error 15:15:53.670891+0200 TestES Remote process crashed or exited!
All seem to happen in the right order.