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

Crash in AppSyncRealTimeClient.unsubscribe(id:) #3835

Closed
amruth-movano opened this issue Aug 26, 2024 · 6 comments
Closed

Crash in AppSyncRealTimeClient.unsubscribe(id:) #3835

amruth-movano opened this issue Aug 26, 2024 · 6 comments
Labels
api Issues related to the API category bug Something isn't working

Comments

@amruth-movano
Copy link

amruth-movano commented Aug 26, 2024

Describe the bug

Prod users are facing crash in -

          Crashed: com.apple.root.user-initiated-qos.cooperative
0  Evie Ring                      0x1451db4 AppSyncRealTimeClient.unsubscribe(id:) + 208 (AppSyncRealTimeClient.swift:208)
1  libswift_Concurrency.dylib     0x4d764 swift::runJobInEstablishedExecutorContext(swift::Job*) + 436
2  libswift_Concurrency.dylib     0x4e9c8 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72
3  libdispatch.dylib              0x15894 _dispatch_root_queue_drain + 392
4  libdispatch.dylib              0x1609c _dispatch_worker_thread2 + 156
5  libsystem_pthread.dylib        0x48f8 _pthread_wqthread + 228
6  libsystem_pthread.dylib        0x10cc start_wqthread + 8

Steps To Reproduce

Expected behavior

App should not crash

Amplify Framework Version

2.33.6

Amplify Categories

API, Auth

Dependency manager

Swift PM

Swift version

5.9.2

CLI version

12.11.1

Xcode version

15.0

Relevant log output

-

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

iOS 17.5.1

Device

iPhone 13 Pro

Specific to simulators

No response

Additional context

No response

@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 Aug 26, 2024
@amruth-movano
Copy link
Author

@5d @lawmicha
Can you please check this on priority

@harsh62
Copy link
Member

harsh62 commented Aug 27, 2024

Similar to what I mentioned in #3834 , would you be able to share more details around how we will be able to reproduce this crash in a local environment with symbolicated logs and verbose logs.

@harsh62 harsh62 added bug Something isn't working api Issues related to the API category and removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Aug 27, 2024
@amruth-movano
Copy link
Author

@harsh62
We are unable to reproduce this scenario using Xcode and the only stack trace which we have is I have already added

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 27, 2024
@lawmicha
Copy link
Contributor

lawmicha commented Aug 29, 2024

Hi @amruth-movano, can you try with the latest to reproduce and provide us with a full stack trace? see @5d's comment over here #3834

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 29, 2024
@5d
Copy link
Contributor

5d commented Aug 29, 2024

Hi @amruth-movano,

I've tried to subscribe/unsubscribe with 90 subscriptions several times to reproduce the issue. Unfortunately, I couldn't reproduce the issue.

var subscriptions = AtomicDictionary<String, Cancellable>()
Task {
    for _ in 1...30 {
        Task.detached {
            subscriptions.set(
                value: Amplify.API.subscribe(request: .subscription(to: Todo.self, subscriptionType: .onCreate)),
                forKey: UUID().uuidString
            )
        }

        Task.detached {
            subscriptions.set(
                value: Amplify.API.subscribe(request: .subscription(to: Todo.self, subscriptionType: .onUpdate)),
                forKey: UUID().uuidString
            )
        }

        Task.detached {
            subscriptions.set(
                value: Amplify.API.subscribe(request: .subscription(to: Todo.self, subscriptionType: .onDelete)),
                forKey: UUID().uuidString
            )
        }

    }
}

Would it be convenient for you to provide the complete crash symbol log from your side? Or if you have some confidential info inside the log, you can reach out to us with AWS support ticket.

@vincetran vincetran added closing soon This issue will be closed in 7 days unless further comments are made. pending-community-response Issue is pending response from the issue requestor labels Sep 17, 2024
@harsh62 harsh62 closed this as completed Sep 24, 2024
@github-actions github-actions bot removed pending-community-response Issue is pending response from the issue requestor closing soon This issue will be closed in 7 days unless further comments are made. labels Sep 24, 2024
Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to the API category bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@5d @vincetran @lawmicha @harsh62 @amruth-movano and others