Skip to content
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

iOS18 crash at CF_IS_OBJC function #5480

Open
fingerplay opened this issue Dec 19, 2024 · 1 comment
Open

iOS18 crash at CF_IS_OBJC function #5480

fingerplay opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working iot Issues related to the IoT SDK

Comments

@fingerplay
Copy link

Describe the bug
Recently, I find some crash appears on in [AWSIoTStreamThread main] method. these crash have some same features, like OS version is iOS18, and the crashed thread's stack trace contains _cfstream_solo_signalEventSync(frame 3 below), and it all appears after MQTT disconnected.

To Reproduce
Steps to reproduce the behavior:

  1. MQTT disconnected
  2. Auto Reconnect(may be)
  3. Crash

Observed Behavior

Expected Behavior
A clear and concise description of what you expected to happen.

Stack Trace
EXC_BREAKPOINT 0x0000000189a550d4
0
CoreFoundation
CF_IS_OBJC + 76
1
CoreFoundation
CFRelease + 60
2
CoreFoundation
_signalEventSync + 252
3
CoreFoundation
_cfstream_solo_signalEventSync + 224
4
CoreFoundation
_CFStreamSignalEvent + 304
5
CFNetwork
SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 68
6
CFNetwork
SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 204
7
CoreFoundation
__CFSocketPerformV0 + 944
8
CoreFoundation
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
9
CoreFoundation
__CFRunLoopDoSource0 + 176
10
CoreFoundation
__CFRunLoopDoSources0 + 244
11
CoreFoundation
__CFRunLoopRun + 840
12
CoreFoundation
CFRunLoopRunSpecific + 588
13
Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
14
AWSIoT
-[AWSIoTStreamThread main] + 728
15
Foundation
NSThread__start + 724
16
libsystem_pthread.dylib
_pthread_start + 136
17
libsystem_pthread.dylib
thread_start + 8

Code Snippet
Please provide a snippet of the code causing the issue or how you are using the service that has the bug.

Unique Configuration
If you are reporting an issue with a unique configuration or where configuration can make a difference in code execution (i.e. Cognito) please provide your configuration. Please make sure to obfuscate sensitive information from the configuration before posting.

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
AWSIOT

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • SDK Version: 2.37.2
  • Dependency Manager: CocoaPods
  • Swift Version : 5.0
  • Xcode Version: 15.1

Device Information (please complete the following information):

  • Device: All iPhone
  • iOS Version: 18.0 or later
  • Specific to simulators:

Additional context
I think it may be related to CFStream. there is a similar crash report here https://forums.developer.apple.com/forums/thread/769191

Relevant Console Output
In some cases, it might be helpful to add any logs from your console that better help you tell the story of this issue. You can easily enable logging in your app by putting the following code in your app delegate.

AWSDDLog.sharedInstance.logLevel = .debug
AWSDDLog.add(AWSDDTTYLogger.sharedInstance)

Logs

Please logs in the code block below. (See: Logs Guidance)

Log Messages
INSERT LOG MESSAGES HERE
@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Dec 19, 2024
@ruisebas
Copy link
Member

Hi @fingerplay, thanks for opening this.

We've just released version 2.8.1 with numerous improvements to prevent AWSIoT crashes caused by AWSIoTStreamThread, could you please upgrade and check whether it addresses your issue?

If the issue remains, could you please provide us with the full symbolicated crashlog? It contains additional information that greatly helps us determine the root cause.
Thanks!

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Dec 19, 2024
@ruisebas ruisebas added iot Issues related to the IoT SDK bug Something isn't working and removed pending-triage Issue is pending triage labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iot Issues related to the IoT SDK
Projects
None yet
Development

No branches or pull requests

2 participants