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 OutgoingMutationQueue.doStart(api:mutationEventPublisher:reconciliationQueue:) #3649

Open
amruth-movano opened this issue Apr 27, 2024 · 2 comments
Labels
bug Something isn't working datastore Issues related to the DataStore category pending-triage Issue is pending triage

Comments

@amruth-movano
Copy link

Describe the bug

Our users are getting repetative crash in -
OutgoingMutationQueue.doStart(api:mutationEventPublisher:reconciliationQueue:)
Attaching the crash log file

com.movano.ios.staging_issue_a19b83783e3e409ea2eb7c37819f80e6_crash_session_550b44cf76d64c2097a643748c701d1c_DNE_8_v2_stacktrace.txt

Steps To Reproduce

--

Expected behavior

App should not crash in amplify library

Amplify Framework Version

2.25.2

Amplify Categories

DataStore

Dependency manager

Swift PM

Swift version

5.8

CLI version

NA

Xcode version

15.0

Relevant log output

No response

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

iOS 17.4.1

Device

iPhone 15 Pro Max

Specific to simulators

No response

Additional context

No response

@lawmicha lawmicha added bug Something isn't working datastore Issues related to the DataStore category pending-triage Issue is pending triage labels Apr 29, 2024
@lawmicha
Copy link
Member

# Crashlytics - Stack trace
# Application: com.movano.ios.staging
# Platform: apple
# Version: 1.0 (240)
# Issue: a19b83783e3e409ea2eb7c37819f80e6
# Session: 550b44cf76d64c2097a643748c701d1c_DNE_8_v2
# Date: Fri Apr 26 2024 09:20:51 GMT+0530 (India Standard Time)

com.apple.main-thread
0  libsystem_kernel.dylib         0x1af8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x1890 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x17a8 mach_msg_overwrite + 436
3  libsystem_kernel.dylib         0x15e8 mach_msg + 24
4  CoreFoundation                 0x3601c __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x33f04 __CFRunLoopRun + 1208
6  CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
7  GraphicsServices               0x34e0 GSEventRunModal + 164
8  UIKitCore                      0x22aedc -[UIApplication _run] + 888
9  UIKitCore                      0x22a518 UIApplicationMain + 340
10 SwiftUI                        0x1033860 OUTLINED_FUNCTION_39 + 600
11 SwiftUI                        0x10336a8 OUTLINED_FUNCTION_39 + 160
12 SwiftUI                        0xc4f9fc get_witness_table 7SwiftUI4ViewRzlAA15ModifiedContentVyxAA30_EnvironmentKeyWritingModifierVySbGGAaBHPxAaBHD1__AgA0cI0HPyHCHCTm + 364
13 Evie Ring                      0x320810 main + 10 (MovanoRingApp.swift:10)
14 ???                            0x1c831ed84 (Missing)

io.sentry.app-hang-tracker
0  libsystem_kernel.dylib         0x22f8 __semwait_signal + 8
1  libsystem_c.dylib              0x9ea0 nanosleep + 220
2  Foundation                     0x7506c0 +[NSThread sleepForTimeInterval:] + 160
3  Evie Ring                      0xcccc60 -[SentryANRTracker detectANRs] + 105 (SentryANRTracker.m:105)
4  Foundation                     0x9ca9c __NSThread__start__ + 732
5  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
6  libsystem_pthread.dylib        0x1fcc thread_start + 8

Thread
0  libsystem_kernel.dylib         0x1af8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x1890 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x17a8 mach_msg_overwrite + 436
3  libsystem_kernel.dylib         0x15e8 mach_msg + 24
4  Instabug                       0x371f64 IBGplcrash_async_macho_string_free + 1644
5  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
6  libsystem_pthread.dylib        0x1fcc thread_start + 8

AwsLogger
0  libsystem_kernel.dylib         0x249c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1590 _pthread_cond_wait + 1228
2  Evie Ring                      0x9a1f28 aws_condition_variable_wait + 76 (condition_variable.c:76)
3  Evie Ring                      0x9970ac aws_condition_variable_wait_pred + 15 (condition_variable.c:15)
4  Evie Ring                      0x99f3c0 aws_background_logger_thread + 342 (array_list.inl:342)
5  Evie Ring                      0x9a4098 thread_fn + 183 (thread.c:183)
6  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
7  libsystem_pthread.dylib        0x1fcc thread_start + 8

AwsEventLoop 1
0  libsystem_kernel.dylib         0xf8cc kevent + 8
1  Evie Ring                      0x9aee54 aws_event_loop_thread + 876 (kqueue_event_loop.c:876)
2  Evie Ring                      0x9a4098 thread_fn + 183 (thread.c:183)
3  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
4  libsystem_pthread.dylib        0x1fcc thread_start + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1af8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x1890 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x17a8 mach_msg_overwrite + 436
3  libsystem_kernel.dylib         0x15e8 mach_msg + 24
4  CoreFoundation                 0x3601c __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x33f04 __CFRunLoopRun + 1208
6  CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
7  Foundation                     0x2b4a8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0x554e8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x18dac8 -[UIEventFetcher threadMain] + 420
10 Foundation                     0x9ca9c __NSThread__start__ + 732
11 libsystem_pthread.dylib        0x2a90 _pthread_start + 136
12 libsystem_pthread.dylib        0x1fcc thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  Evie Ring                      0x157a38c FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1  Evie Ring                      0x157a76c FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2  Evie Ring                      0x1588224 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3  Evie Ring                      0x1588a4c FIRCLSMachExceptionServer + 521 (FIRCLSMachException.c:521)
4  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
5  libsystem_pthread.dylib        0x1fcc thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1af8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x1890 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x17a8 mach_msg_overwrite + 436
3  libsystem_kernel.dylib         0x15e8 mach_msg + 24
4  CoreFoundation                 0x3601c __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x33f04 __CFRunLoopRun + 1208
6  CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
7  CFNetwork                      0x25ac48 estimatedPropertyListSize + 38228
8  Foundation                     0x9ca9c __NSThread__start__ + 732
9  libsystem_pthread.dylib        0x2a90 _pthread_start + 136
10 libsystem_pthread.dylib        0x1fcc thread_start + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

syncPersistentStorage.amplitude.com
0  CoreFoundation                 0x7120 CF_IS_OBJC + 256
1  CoreFoundation                 0x127cc CFGetAllocator + 48
2  CoreFoundation                 0x5e274 CFURLCopyFileSystemPath + 56
3  Foundation                     0x2d30c -[NSURL(NSURL) path] + 96
4  Foundation                     0xa41ec URL.path.getter + 236
5  Foundation                     0xa3fe0 URL.appendingPathExtension(_:) + 60
6  Evie Ring                      0xcab238 PersistentStorage.getEventFiles(includeUnfinished:) + 203 (PersistentStorage.swift:203)
7  Evie Ring                      0xcac8c8 closure #1 in PersistentStorage.read<A>(key:) + 59 (PersistentStorage.swift:59)
8  Evie Ring                      0xcb4a60 partial apply for closure #1 in PersistentStorage.read<A>(key:) + 24 (<compiler-generated>:24)
9  libswiftDispatch.dylib         0x1d4c partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 28
10 libswiftDispatch.dylib         0x9ea0 thunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply + 16
11 libswiftDispatch.dylib         0x1c80 closure #1 in closure #1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 192
12 libswiftDispatch.dylib         0x1bb4 partial apply for thunk for @callee_guaranteed () -> () + 28
13 libswiftDispatch.dylib         0x1b8c thunk for @escaping @callee_guaranteed () -> () + 28
14 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
15 libdispatch.dylib              0x132c4 _dispatch_lane_barrier_sync_invoke_and_complete + 56
16 libswiftDispatch.dylib         0x2788 implicit closure #2 in implicit closure #1 in OS_dispatch_queue.asyncAndWait<A>(execute:) + 192
17 libswiftDispatch.dylib         0x26c0 partial apply for implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<A>(execute:) + 76
18 libswiftDispatch.dylib         0x2540 OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 404
19 libswiftDispatch.dylib         0x237c OS_dispatch_queue.asyncAndWait<A>(execute:) + 140
20 libswiftDispatch.dylib         0x22e8 OS_dispatch_queue.sync<A>(execute:) + 64
21 Evie Ring                      0xcac7f0 PersistentStorage.read<A>(key:) + 65 (PersistentStorage.swift:65)
22 Evie Ring                      0xcaf1d4 protocol witness for Storage.read<A>(key:) in conformance PersistentStorage + 20 (<compiler-generated>:20)
23 Evie Ring                      0xcbedfc IdentifyInterceptor.getCombinedInterceptedIdentify() + 90 (IdentifyInterceptor.swift:90)
24 Evie Ring                      0xcbec00 IdentifyInterceptor.interceptIdentifyEvent(_:) + 68 (IdentifyInterceptor.swift:68)
25 Evie Ring                      0xcbe600 IdentifyInterceptor.intercept(event:) + 41 (IdentifyInterceptor.swift:41)
26 Evie Ring                      0xca0fb8 AmplitudeDestinationPlugin.enqueue(event:) + 15 (AmplitudeDestinationPlugin.swift:15)
27 Evie Ring                      0xca10dc AmplitudeDestinationPlugin.track(event:) + 20
28 Evie Ring                      0xca52f0 DestinationPlugin.execute(event:) + 47 (DestinationPlugin.swift:47)
29 Evie Ring                      0xc65c94 Amplitude.process(event:) + 27 (Mediator.swift:27)
30 Evie Ring                      0xc6305c Amplitude.track(eventType:eventProperties:options:) + 93 (Amplitude.swift:93)
31 Evie Ring                      0xed7c8 specialized InternalEventTracker.trackEvent(_:extras:) + 413 (TelemetryTracker.swift:413)
32 Evie Ring                      0xeddec specialized InternalEventTracker.trackAppGeneratedEvent(_:message:extras:) + 427 (TelemetryTracker.swift:427)
33 Evie Ring                      0xf2790 partial apply for closure #1 in closure #1 in MovanoTelemetryTracker.track(event:extras:) + 358 (TelemetryTracker.swift:358)
34 Evie Ring                      0xe8ac4 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28 (<compiler-generated>:28)
35 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
36 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
37 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
38 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
39 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
40 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
41 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
42 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_pthread.dylib        0x1fb8 start_wqthread + 438

Crashed: com.amazonaws.OutgoingMutationQueue
0  Foundation                     0x97020 __NSOQSchedule + 232
1  Foundation                     0xbdc58 -[NSOperationQueue setSuspended:] + 168
2  Evie Ring                      0x8d7050 closure #1 in OutgoingMutationQueue.doStart(api:mutationEventPublisher:reconciliationQueue:) + 143 (OutgoingMutationQueue.swift:143)
3  Evie Ring                      0x8da378 closure #1 in OutgoingMutationQueue.queryMutationEventsFromStorage(onComplete:) + 349 (OutgoingMutationQueue.swift:349)
4  Evie Ring                      0x89df90 SQLiteStorageEngineAdapter.query<A>(_:modelSchema:predicate:sort:paginationInput:eagerLoad:completion:) + 339 (StorageEngineAdapter+SQLite.swift:339)
5  Evie Ring                      0x89e9e4 SQLiteStorageEngineAdapter.query<A>(_:predicate:sort:paginationInput:eagerLoad:completion:) + 308 (StorageEngineAdapter+SQLite.swift:308)
6  Evie Ring                      0x8a0680 protocol witness for ModelStorageBehavior.query<A>(_:predicate:sort:paginationInput:eagerLoad:completion:) in conformance SQLiteStorageEngineAdapter + 44 (<compiler-generated>:44)
7  Evie Ring                      0x8d7390 OutgoingMutationQueue.queryMutationEventsFromStorage(onComplete:) + 336 (OutgoingMutationQueue.swift:336)
8  Evie Ring                      0x8d6bb0 OutgoingMutationQueue.doStart(api:mutationEventPublisher:reconciliationQueue:) + 140 (OutgoingMutationQueue.swift:140)
9  Evie Ring                      0x8d64c0 OutgoingMutationQueue.respond(to:) + 108 (OutgoingMutationQueue.swift:108)
10 Evie Ring                      0x8dd28c partial apply for closure #1 in closure #1 in OutgoingMutationQueue.init(_:storageAdapter:dataStoreConfiguration:authModeStrategy:) + 77 (OutgoingMutationQueue.swift:77)
11 Evie Ring                      0x8591c4 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28 (<compiler-generated>:28)
12 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
13 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
14 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
15 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
16 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
17 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
18 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
19 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_pthread.dylib        0x1fb8 start_wqthread + 438

com.google.fira.worker
0  Evie Ring                      0x18bb410 +[APMDataTypeValidator isValidString:minLength:maxLength:type:failureCode:] + 92
1  Evie Ring                      0x18bb648 +[APMDataTypeValidator isValidInternalName:maxLength:type:failureCode:] + 76
2  Evie Ring                      0x193b638 -[APMUserAttribute initWithOrigin:name:value:lastSetTimestamp:] + 104
3  Evie Ring                      0x18b47a4 APMUserAttributeFromDictionary + 260
4  Evie Ring                      0x18ba2c4 -[APMDatabase allDataTypesFromTableWithName:tableLimit:error:createDataTypeBlock:] + 336
5  Evie Ring                      0x18b4a34 -[APMDatabase userAttributesIncludingInternal:error:] + 88
6  Evie Ring                      0x18eb680 -[APMMeasurement(Event) writeEvent:isPublicEvent:isRealtime:] + 368
7  Evie Ring                      0x18e9560 __57-[APMMeasurement(Event) writeFilteredEventOnWorkerQueue:]_block_invoke + 488
8  Evie Ring                      0x1939728 -[APMSqliteStore performTransactionWithError:block:] + 160
9  Evie Ring                      0x18b0718 -[APMDatabase performTransaction:] + 40
10 Evie Ring                      0x18e934c -[APMMeasurement(Event) writeFilteredEventOnWorkerQueue:] + 212
11 Evie Ring                      0x18e9060 -[APMMeasurement(Event) writeEventOnWorkerQueue:] + 1136
12 Evie Ring                      0x18e8afc -[APMMeasurement(Event) handleEventOnWorkerQueue:] + 488
13 Evie Ring                      0x18dd900 -[APMMeasurement logEventOnWorkerQueue:notifyEventListeners:] + 56
14 Evie Ring                      0x18dd878 -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] + 524
15 Evie Ring                      0x18dd5c4 __151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke + 60
16 Evie Ring                      0x1930838 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
17 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
18 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
19 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
20 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
21 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
22 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
23 libsystem_pthread.dylib        0x1f20 _pthread_wqthread + 288
24 libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0xa084 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1f6c _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1fc0 start_wqthread + 8

@lawmicha
Copy link
Member

Hi @amruth-movano, thanks for opening this issue. Are you able to correlate whether this started happening after upgrading to a particular version of Amplify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datastore Issues related to the DataStore category pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants