aws-amplify / aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
https://aws-amplify.github.io/docs
Other
1.68k stars 885 forks source link

Crashes in AWSSRWebSocket.m #1434

Closed Jonge closed 4 years ago

Jonge commented 5 years ago

Describe the bug Seeing a couple crash logs from AWSSRWebSocket.m.

To Reproduce Can't seem to reproduce, as it only happens to a small amount of users (probably a threading issue?). Here are the crash stacks, hope that helps a bit.

Crashed: Thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000054
--
0 | libdispatch.dylib | dispatch_async$VARIANT$mp + 160
1 | AWSIoT | AWSSRWebSocket.m line 1555__37-[AWSSRWebSocket stream:handleEvent:]_block_invoke_3
2 | libdispatch.dylib | _dispatch_call_block_and_release + 24
3 | libdispatch.dylib | _dispatch_client_callout + 16
4 | libdispatch.dylib | _dispatch_lane_serial_drain$VARIANT$mp + 592
5 | libdispatch.dylib | _dispatch_lane_invoke$VARIANT$mp + 428
6 | libdispatch.dylib | _dispatch_workloop_worker_thread + 596
7 | libsystem_pthread.dylib | _pthread_wqthread + 304
8 | libsystem_pthread.dylib | start_wqthread + 4
Crashed: Thread SIGABRT ABORT 0x00000001bc3d00bc
--
0 | libsystem_kernel.dylib | __pthread_kill + 8
1 | libsystem_pthread.dylib | pthread_kill + 300
2 | (Missing) | (Missing)
3 | (Missing) | (Missing)
4 | (Missing) | (Missing)
5 | AWSIoT | AWSSRWebSocket.m line 1378-[AWSSRWebSocket _pumpScanner]
6 | AWSIoT | AWSSRWebSocket.m line 1551__37-[AWSSRWebSocket stream:handleEvent:]_block_invoke_3
7 | libdispatch.dylib | _dispatch_call_block_and_release + 32

Which AWS service(s) are affected? AWS IoT

Expected behavior App should not crash.

Environment(please complete the following information):

Device Information (please complete the following information):

wooj2 commented 4 years ago

Attempting to fix this issue with back porting this bug fix: https://github.com/aws-amplify/aws-sdk-ios/pull/2984

Setting status to pending as we will wait to hear back to verify a reduction in crashes.

wooj2 commented 4 years ago

Optimistically closing this issue based on the PR that was submitted before.