17 Replies
      Latest reply on May 27, 2020 2:02 AM by jaroslavqwerty
      mike.ly Level 1 Level 1 (20 points)

        Hello,

        I'm trying to debug an intermittent crash in my NEPacketTunnelProvider. Basically, it will sometimes crash about a minute after establishing a connection. If it survives the first couple minutes, it will work fine for the duration of the connection.

         

        My main problem is that there doesn't appear to be any crash dump created.  My provider just stops logging, and I see the following logged in the Console:

         

        neagent: extension connection was interrupted
        neagent: Extension <my extension ID> died unexpectedly
        nesessionmanager: NESMVPNSession[<uuid>]: status changed to disconnecting
        

         

        The crash happens only on macOS; iOS is fine.

         

        A few things I've tried:

        • Checked for a crash dump in ~/Library/Logs/DiagnosticReports and /Library/Logs/DiagnosticReports; found nothing related to my provider.
        • Attached the Xcode debugger. I can never get it to crash with the debugger attached (of course ).
        • Monitored memory usage in Xcode. It's typically around 6.7MB, but can drift up close to 8MB during heavy traffic. I believe this is acceptable?
        • Added an uncaught exception handler via NSSetUncaughtExceptionHandler. But my handler never gets called; I suspect this isn't supported for extensions?
        • Followed instructions for Crash Logs and VPN Logging.

         

        Has anybody run into an issue like this? Is there some other way to gather info that I'm missing?

         

        Thanks,

        Mike