I've since gone and uploaded yet another sysdiagnose where we seemingly see the same thing happens, this time, on every reinstall from Xcode. In this case, once the newly installed packet tunnel starts, all networking on the device is broken, and seemingly this reliably reproduces.
However, it doesn't happen by default, usually after a day of not restarting the device and developing does this start happening again.
I've barely had time to look at the sysdiagnose, but from the cursory look there's plenty of No route to host errors, which would explain why the packet tunnel is not able to connect. Why is there no route to host? Who knows. At the time of installation, the VPN profile of the app I'm developing is set to be used on-demand, and it is set to include all routes (0.0.0.0/0 and ::0/0). We are not using enforceRoutes or includeAllNetworks due to bugs. It seems that there is a discrepancy between the two packet tunnel instances (the old one and new one), and one of them is desperately trying to work whilst the other one is the one that is allowed to send traffic, i.e. the routes are setup to route traffic into one instance but the system is routing traffic into the other.
The phone had another VPN profile installed, but even when it is not there, the bug reproduces.
I am not posting this with the expectation that you will do another deep dive, as much as we'd appreciate it. Just posting here so that maybe someone else who is encountering similar issues ends up seeing some documented.
Topic:
App & System Services
SubTopic:
Networking
Tags: