11 Replies
      Latest reply on Jun 27, 2019 12:34 PM by mobilepatagonia
      BooRangerMTT Level 1 Level 1 (0 points)

        Getting a network crash that looks to be system based, since iOS 11 the crash has came more prevalent. We have tried a number of fixes and investigation but have not found the root cause.

         

        Could I get confirmation

        - that this is not a system bug?

        - That EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 is indication of bad block management on our side.

         

        Issue:

        Crash on networking call.

         

        Top Trace:

        Crashed: com.apple.CFNetwork.Connection EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

        0: TubeManager::_onqueue_newTubeReady(Tube*, CFStreamError) + 992

         

        Note:

        - Seen on all types of devices

        - All crashes say that device has low memory (under 4%), we have investigated this and have fixed some  memory leak but issue still happens. We have never seen app use over 200mb of ram.

        - We have few a uiwebviews being used.

        - We have never been able to reproduce this ourselves

        - We have Cert pinning implemented.

        - We have one shared NSURLSession object

         

        What we've tried:

        - Memory leaks.

        - Updated all 3rd party dependences, firebase etc.

        - Better webview management. Nil delegate and calling stop loading.

         

        Crash log: (i've hundred of these!)

        https://gist.github.com/booranger/17c3a793f6f030555e9c90cc4072addb

         

         

        Any suggestions on how to debug this issue?

         

        How does one get an iPhone 8 plus to run out of ram!

        • Re: CFNetwork Tube Crash
          eskimo Apple Staff Apple Staff (12,425 points)

          Do you have any Apple crash reports for this?  If so, please post one.  TubeManager is a core component lying at the heart of CFNetwork and thus it will show up in lots of different crash reports (you can look at this thread for some other examples).  The best way to tease this apart is with a proper crash report.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

          • Re: CFNetwork Tube Crash
            zhixingare Level 1 Level 1 (0 points)

            Hi @BooRangerMTT, have you managed to fix this issue, or found some work arounds to reduce the crash rate? Thanks in advance!

            • Re: CFNetwork Tube Crash
              mobilepatagonia Level 1 Level 1 (0 points)

              Hi,

               

              I have the same crash in iOS related to:
              0x00000001812201c4 (    0xcc) Tube::_onqueue_errorHandler(CFStreamError) [FUNC, PEXT, NameNList, MangledNameNList, Merged, NList, FunctionStarts]

               

              Crash: https://pastebin.com/YB3rm4bZ

               

              The following are my insights:

              - many threads opened in all the crashes

              - crashes mainly in devices with slow cpu and low memory: iphone 6, 7

              - memory is almost full in the crashes: 2%, 3% of memory

              - cannot detect what's the coded that generates the crash: it's in iOS 12, inside *CFNetwork* (CFNetwork`Tube::_onqueue_invokeCB(CFStreamError).

              - we follow steps to use Xcode -> Organizer -> Crashes but there were no new information about.

              - *our steps now*: using instruments leaks, zombies and memory allocation we are going to suggest how to reduce memory foot print in such devices, because we think it's a problem of resources that should be managed more efficiently in the application (memory, network)

               

              Case ID: 715828880 in Technical Support Incidents (TSIs)

               

              Thanks.

               

              Javier.