-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in AWSIoTMQTTClient.m line 635 -[AWSIoTMQTTClient openStreams:] #4404
Comments
The same issue in SDK 2.29.1 |
I was able to reliably reproduce this issue (SDK 2.30.1) with the following code:
Basically here I start a connection to MQTT broker, and after a small delay I terminate the connection and start another connection. In theory this can happen when user doesn't wait for connection to be established and switches to another IoT device. The crash always occurs in background thread, however the stack trace may differ. Seems like it crashes in different parts of the AWSIoTMQTTClient code. The crash can also occur not immediately but only after 1, 2, 3... reconnection loops. |
@Banner2404 I was able to reproduce this issue on 2.27.7, but not on 2.30.1. |
Actually, I was able to reproduce this on 2.30.1 and 2.30.2. However, it appears that the fix in 2.30.3 I mentioned above fixes this. I've run your repro test case 20 times each with at least 250 iterations of connect + disconnect + reconnect and haven't encountered the crash. Please upgrade to 2.30.3 to test this yourself and confirm whether this resolves your issue. Thanks for your patience! |
I tested with the same code snipped as above and the issue seems to be resolved in 2.30.4. We will update the production app to see if it solves the crashes for customers. |
Great, thanks for letting us know! |
Closing this issue as resolved. If you encounter it on >= 2.30.3, please comment on this issue (feel free to ping me) and I'll reopen, or you can open a new issue. Thanks for your patience! |
@atierian Unfortunately, seems like the issue is still present in SDK 2.30.4. It's not that stable to reproduce anymore with my code snippet above. Screen.Recording.2023-04-05.at.17.21.30.mp4 |
Thanks for bringing this to our attention. I'm reopening the issue and we'll investigate. Can you please paste the full backtrace shown in the debug navigator on a crash? That'll help us confirm that we've reproduced the same issue you're experiencing. Thanks! |
Perfect, thanks! We'll follow up with here with any updates. |
@atierian any news on this? I'm also able to reproduce this issue with AWS SDK |
We are also experiencing that issue. |
@atierian Any news on the issue? I'm also able to reproduce this issue with AWS SDK |
@atierian any update on this issue ? I am also facing the same issue with v2.33.4 while syncing the data in background. |
We're prioritizing looking into this issue and related IoT issues -- we'll provide an update when we have one. |
Just chiming in to say we're encountering this crash as well on v2.30.4. Stack traces from our crash reports on Crashlytics
Also
Not sure why that second one has "redacted" everywhere. I can look into resolving that if it would be helpful. |
Describe the bug
I'm seeing a lot of crash reports in Crashlytics which all point to the same line:
AWSIoTMQTTClient.m line 635
-[AWSIoTMQTTClient openStreams:].
We are currently using AWS v2.27.13
Steps to reproduce the behavior:
Very difficult to reproduce - only seen intermittently on device when resuming from background.
Environment
SDK Version: [2.27.13]
Dependency Manager: Cocoapods
Device Information
Stack Trace
Crashed: Thread #1
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000012e
Crashed: Thread
0 libobjc.A.dylib 0x6cf0 objc_opt_respondsToSelector + 52
1 CoreFoundation 0x13b14c _inputStreamCallbackFunc + 48
2 CoreFoundation 0x105fb4 _signalEventSync + 216
3 CoreFoundation 0x117e84 _cfstream_solo_signalEventSync + 224
4 CoreFoundation 0x10e42c _CFStreamSignalEvent + 304
5 CFNetwork 0x147eb8 _CFNetworkErrorGetLocalizedDescription + 180236
6 CFNetwork 0x1533e4 _CFNetworkErrorGetLocalizedDescription + 226616
7 CoreFoundation 0x11a41c __CFSocketPerformV0 + 648
8 CoreFoundation 0xd5f54 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
9 CoreFoundation 0xe232c __CFRunLoopDoSource0 + 176
10 CoreFoundation 0x66210 __CFRunLoopDoSources0 + 244
11 CoreFoundation 0x7bba8 __CFRunLoopRun + 836
12 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612
13 Foundation 0x42334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
14 AWSIoT 0x5a728 -[AWSIoTMQTTClient openStreams:] + 759 (AWSIoTMQTTClient.m:759)
15 Foundation 0x5b808 NSThread__start + 716
16 libsystem_pthread.dylib 0x16cc _pthread_start + 148
17 libsystem_pthread.dylib 0xba4 thread_start + 8
I see a very similar issue was previously report at #1209 however this was reported resolved in a prior build - we are still seeing it in 2.27.13.
The text was updated successfully, but these errors were encountered: