NSURLSession: background session hangs indefinitely

Originator:warorface
Number:rdar://18576940 Date Originated:10/07/2014
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.0.2
Classification: Reproducible:Rarely
 
Summary:
NSURLSession’s private method “setupBackgroundSession” hangs, causing the thread to become unusable.
When the session is created on app launch, the app gets killed by the watchdog. Causing the app to become unusable.

Due to the workaround we’ve found, we believe that this is caused by a corruption of the internal persistance of the background session. This seems to only affect the corrupted background session associated with an identifier as other apps using background session keep working as they should.

Workaround:
For users: Uninstall the app, reboot the phone and install again.
For devs: When this crash happens, change the backgroundIdentifier for that install.

Steps to Reproduce:
I am unaware of any way to reproduce this, but I’ve attached a relevant stack trace.

Expected Results:
An NSURLSession instance

Actual Results:
The app getting killed

Version:
iOS 8.0.2 (12A405)

Notes:


Configuration:
iPhone7,2

Attachments:
'Seahorse.crash' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!