Gamekit broken in iOS6 when in a heterogeneous iOS 5 and iOS 6 network

Originator:chadudell
Number:rdar://12799771 Date Originated:03-Dec-2012
Status:Open Resolved:Open
Product: Product Version:
Classification: Reproducible:
 
We have an application that implemented GKSession to pass data between iOS devices. Starting with iOS 6, we're starting to see an odd problem where the application hangs when sending data to or disconnecting from peers. Here's a sample stack trace from our application when it is frozen (occurred when attempting to send data):
#0 0x3485e0fc in __psynch_mutexwait ()
#1 0x32537128 in pthread_mutex_lock ()
#2 0x3833f89c in AGPSessionBroadcast ()
#3 0x38360a62 in -[GKSessionInternal sendDataToAllPeers:withDataMode:error:] ()
#4 0x38d22bac in -[GKSession sendDataToAllPeers:withDataMode:error:] ()
#5 0x000e8130 in -[RootViewController sendThisChat:peer:] at /Users/gauthamnookala/Developer/RabbleBrowser/RabbleBrowser/RabbleBrowser/RabbleBrowser/RootViewController.m:169
#6 0x000f8590 in -[ChatViewController sendThisChat:] at /Users/gauthamnookala/Developer/RabbleBrowser/RabbleBrowser/RabbleBrowser/RabbleBrowser/ChatViewController.m:280
#7 0x000f8af8 in -[ChatViewController textView:shouldChangeTextInRange:replacementText:] at /Users/gauthamnookala/Developer/RabbleBrowser/RabbleBrowser/RabbleBrowser/RabbleBrowser/ChatViewController.m:320
#8 0x33fb03d6 in -[UITextView keyboardInput:shouldInsertText:isMarkedText:] ()
#9 0x33f61922 in -[UIWebDocumentView keyboardInput:shouldInsertText:isMarkedText:] ()
#10 0x33f256ee in -[UIKeyboardImpl callShouldInsertText:] ()
#11 0x3403c5a4 in __48-[UIKeyboardImpl addInputString:fromVariantKey:]_block_invoke_0 ()
#12 0x33f24e06 in -[UIKeyboardImpl addInputString:fromVariantKey:] ()
#13 0x33f22f84 in -[UIKeyboardImpl handleKeyEvent:] ()
#14 0x33f228ae in -[UIKeyboardLayoutStar sendStringAction:forKey:isPopupVariant:] ()
#15 0x33f213a4 in -[UIKeyboardLayoutStar touchUp:] ()
#16 0x33f2072e in -[UIKeyboardLayout touchesEnded:withEvent:] ()
#17 0x33e085f0 in -[UIWindow sendTouchesForEvent:] ()
#18 0x33df5800 in -[UIApplication sendEvent:] ()
#19 0x33df511a in _UIApplicationHandleEvent ()
#20 0x321c05a2 in _PurpleEventCallback ()
#21 0x321c01d2 in PurpleEventCallback ()
#22 0x348fb172 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION_ ()
#23 0x348fb116 in __CFRunLoopDoSource1 ()
#24 0x348f9f98 in __CFRunLoopRun ()
#25 0x3486cebc in CFRunLoopRunSpecific ()
#26 0x3486cd48 in CFRunLoopRunInMode ()
#27 0x321bf2ea in GSEventRunModal ()
#28 0x33e492f8 in UIApplicationMain ()
#29 0x000d6556 in main at /Users/gauthamnookala/Developer/RabbleBrowser/RabbleBrowser/RabbleBrowser/RabbleBrowser/main.m:14

It attempted to send this data to two peers--one running iOS 5.1 and the other iOS 5.1.1. This hang only occurs on iOS 6 devices and seems to only occur when it has an iOS 5 device as a peer.

Steps to Reproduce:
We have not determined a consistent set of steps to reproduce, but whenever we have a GKSession with iOS 6 and iOS 5 devices, it's only a matter of time before the iOS 6 devices hangs.

Expected Results:
It should work like it did on iOS 5.x where it wouldn't lock up the main thread.

Actual Results:
Locks up main thread. No apparent error message or infinite loops or crashes. Just a thread lock.

Regression:

Notes:

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!