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

Realm Version 5.4.1 providing empty results (eventhough the result available) #6873

Closed
ganesh-ananthan opened this issue Oct 19, 2020 · 5 comments
Assignees

Comments

@ganesh-ananthan
Copy link

ganesh-ananthan commented Oct 19, 2020

Long story Short:
Application version - 2.4.3 - Realm Version 4.4.0 - No Crash
Application Version 2.4.4 Realm Version 5.4.1 - Lot of PNS crashes

We upgraded to version 5.4.1 to avoid crashes of accessing realm from shared directory. After the app released to store we are getting more crashes w.r.t VOIP push not report to call kit. But in earlier version we don't have such issue.

Questions :

  1. Some time the login status from DB is not returning properly (getting empty value) after upgraded to 5.4.1.
  2. Realm activity is making any crash ?

Realm framework version: 5.4.1
Xcode version: 11.3.1
iOS/OSX version: 12.4 +
Dependency manager + version: Cocoapod 1.9.1

Incident Identifier: 2e48b6bb-52e0-4700-b5e7-46fa31f87b02
CrashReporter Key: 18822694-8527-427B-A426-2B47EA819010
Hardware Model: iPhone9,1
Process: AppName [4372]
Path: /private/var/containers/Bundle/Application/74EB1CA3-6212-49DE-BBAC-4A40434ED395/AppName.app/AppName
Identifier: com.domain.phone2
Version: 4.0.969 (4.0.969)
Code Type: arm64
Parent Process: [1]

Date/Time: 2020-10-19T02:58:33.999Z
Launch Time: 2020-10-19T02:58:29Z
OS Version: iPhone OS 13.3 (17C54)
Report Version: 104

Exception Type: SIGABRT
Exception Codes: #0 at 0x1bc1ddec4
Crashed Thread: 0

Application Specific Information:

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback.'
Last Exception Backtrace:
0   CoreFoundation                       0x00000001bc3e6a48 __exceptionPreprocess + 220
1   libobjc.A.dylib                      0x00000001bc10dfa4 objc_exception_throw + 52
2   CoreFoundation                       0x00000001bc2e8e88 +[NSException raise:format:arguments:] + 92
3   Foundation                           0x00000001bc71e6c4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 124
4   PushKit                              0x00000001d0107a5c -[PKPushRegistry _terminateAppIfThereAreUnhandledVoIPPushes] + 264
5   libdispatch.dylib                    0x00000001bc0b3184 _dispatch_client_callout + 12
6   libdispatch.dylib                    0x00000001bc065c04 _dispatch_lane_barrier_sync_invoke_and_complete + 52
7   PushKit                              0x00000001d01069cc __73-[PKPushRegistry voipPayloadReceived:mustPostCall:withCompletionHandler:]_block_invoke + 448
8   libdispatch.dylib                    0x00000001bc0b2610 _dispatch_call_block_and_release + 20
9   libdispatch.dylib                    0x00000001bc0b3184 _dispatch_client_callout + 12
10  libdispatch.dylib                    0x00000001bc065190 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1040
11  CoreFoundation                       0x00000001bc3645e4 **CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE**

* 8
12  CoreFoundation                       0x00000001bc35f5d8 __CFRunLoopRun + 2000
13  CoreFoundation                       0x00000001bc35eadc CFRunLoopRunSpecific + 460
14  GraphicsServices                     0x00000001c62e4328 GSEventRunModal + 100
15  UIKitCore                            0x00000001c0459ae0 UIApplicationMain + 1932
16  AppName                        		 0x0000000100e7d3d4 main (AppDelegate.swift:39)
17  libdyld.dylib                        0x00000001bc1e8360 start + 0

Thread 0 Crashed:
0   libsystem_kernel.dylib               0x00000001bc1ddec4 __pthread_kill + 8
1   libsystem_c.dylib                    0x00000001bc04d844 abort + 96
2   AppName                        		 0x0000000101ded378 uncaught_exception_handler.cold.1 + 24
3   AppName                        		 0x0000000101cc4a5c uncaught_exception_handler (PLCrashReporter.m:366)
4   CoreFoundation                       0x00000001bc3e6d50 __handleUncaughtException + 632
5   libobjc.A.dylib                      0x00000001bc10e24c _objc_terminate() + 108
6   AppName                        		 0x0000000101cb91f8 MSCrashesUncaughtCXXTerminateHandler() (MSCrashesCXXExceptionHandler.mm:160)
7   libc++abi.dylib                      0x00000001bc1b3304 std::__terminate(void (*)()) + 12
8   libc++abi.dylib                      0x00000001bc1b329c std::terminate() + 40
9   libdispatch.dylib                    0x00000001bc0b3198 _dispatch_client_callout + 32
10  libdispatch.dylib                    0x00000001bc065c04 _dispatch_lane_barrier_sync_invoke_and_complete + 52
11  PushKit                              0x00000001d01069cc __73-[PKPushRegistry voipPayloadReceived:mustPostCall:withCompletionHandler:]_block_invoke + 448
12  libdispatch.dylib                    0x00000001bc0b2610 _dispatch_call_block_and_release + 20
13  libdispatch.dylib                    0x00000001bc0b3184 _dispatch_client_callout + 12
14  libdispatch.dylib                    0x00000001bc065190 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1040
15  CoreFoundation                       0x00000001bc3645e4 **CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE**

* 8
16  CoreFoundation                       0x00000001bc35f5d8 __CFRunLoopRun + 2000
17  CoreFoundation                       0x00000001bc35eadc CFRunLoopRunSpecific + 460
18  GraphicsServices                     0x00000001c62e4328 GSEventRunModal + 100
19  UIKitCore                            0x00000001c0459ae0 UIApplicationMain + 1932
20  AppName                        		 0x0000000100e7d3d4 main (AppDelegate.swift:39)
21  libdyld.dylib                        0x00000001bc1e8360 start + 0

Thread 1:
0   libsystem_kernel.dylib               0x00000001bc1e08a4 stat + 8
1   Foundation                           0x00000001bc7af6e8 _NSStandardizePathUsingCache + 2140
2   Foundation                           0x00000001bc69d024 -[NSString(NSPathUtilities) _stringByStandardizingPathUsingCache:] + 144
3   Foundation                           0x00000001bc7ae808 _NSExpandTildeInPath + 148
4   Foundation                           0x00000001bc6d6e78 -[NSString(NSPathUtilities) stringByExpandingTildeInPath] + 128
5   Foundation                           0x00000001bc7b125c NSSearchPathForDirectoriesInDomains + 276
6   AppName                        		 0x0000000101262220 function signature specialization <Arg[1] = Dead> of (extension in AppName):__C.NSFileManager.checksizeOfLogFile(fileName: Swift.String) -> Swift.UInt64? (FileManager.swift:18)
7   AppName                        		 0x00000001016afb58 AppName.LogManager.isLogFileRotate() -> Swift.Bool (<compiler-generated>:0)
8   AppName                        		 0x00000001016af7c8 closure #1 () -> () in AppName.LogManager.info(_: Any?, functionName: Swift.StaticString, fileName: Swift.StaticString, lineNumber: Swift.Int, logMode: AppName.LogMode?) -> () (LogManager.swift:262)
9   AppName                        		 0x00000001016b4f3c partial apply forwarder for closure #1 () -> () in AppName.LogManager.info(_: Any?, functionName: Swift.StaticString, fileName: Swift.StaticString, lineNumber: Swift.Int, logMode: AppName.LogMode?) -> () (<compiler-generated>:0)
10  AppName                        		 0x0000000100f311c8 reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () (<compiler-generated>:0)
11  libdispatch.dylib                    0x00000001bc0b2610 _dispatch_call_block_and_release + 20
12  libdispatch.dylib                    0x00000001bc0b3184 _dispatch_client_callout + 12
13  libdispatch.dylib                    0x00000001bc05f404 _dispatch_lane_serial_drain$VARIANT$mp + 604
14  libdispatch.dylib                    0x00000001bc05fdf8 _dispatch_lane_invoke$VARIANT$mp + 416
15  libdispatch.dylib                    0x00000001bc069314 _dispatch_workloop_worker_thread + 584
16  libsystem_pthread.dylib              0x00000001bc102b88 _pthread_wqthread + 272
17  libsystem_pthread.dylib              0x00000001bc105760 start_wqthread + 4

Thread 2:
0   libsystem_kernel.dylib               0x00000001bc1dd800 __msync + 8
1   Realm                                0x00000001030d05e8 realm::GroupWriter::commit(unsigned long) + 280
2   Realm                                0x00000001030c5ee8 realm::DB::low_level_commit(unsigned long long, realm::Transaction&) + 480
3   Realm                                0x00000001030c5c94 realm::DB::do_commit(realm::Transaction&) + 108
4   Realm                                0x00000001030c6264 realm::Transaction::commit_and_continue_as_read() + 68
5   Realm                                0x0000000102ea2ddc realm::_impl::RealmCoordinator::commit_write(realm::Realm&) (realm_coordinator.cpp:742)
6   Realm                                0x0000000102f7799c realm::Realm::commit_transaction() (shared_realm.cpp:673)
7   Realm                                0x0000000102f45a04 -[RLMRealm commitWriteTransactionWithoutNotifying:error:] (RLMRealm.mm:698)
8   RealmSwift                           0x00000001036c9af4 RealmSwift.Realm.write<A>(withoutNotifying: [__C.RLMNotificationToken], _: () throws -> A) throws -> A (Realm.swift:291)
9   AppName                        		 0x0000000101ba63d8 generic specialization <AppName.SplunkEntity> of closure #1 () -> () in AppName.UnifiedDatabase.save(item: A.ModelType) throws -> () (UnifiedDatabase.swift:100)
10  AppName                        		 0x000000010105f61c reabstraction thunk helper from @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) (<compiler-generated>:0)
11  AppName                        		 0x000000010185f70c partial apply forwarder for reabstraction thunk helper from @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) (<compiler-generated>:0)
12  libswiftObjectiveC.dylib             0x00000001f1d2dd20 ObjectiveC.autoreleasepool<A>(invoking: () throws -> A) throws -> A + 52
13  AppName                        		 0x000000010185f6c4 function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Exploded, Arg[3] = Exploded> of AppName.SplunkDao.addSplunkLogPNSDetail(event1: Swift.String, event2: Swift.String, pnsType: Swift.String, pnsSubType: Swift.String) -> () (UnifiedDatabase.swift:91)
14  AppName                        		 0x0000000101b23be4 closure #1 () -> () in AppName.SplunkManager.logPNSinSplunk(pns: SwiftyJSON.JSON, type: AppName.INCOMING_PNS_TYPE) -> () (<compiler-generated>:0)
15  AppName                        		 0x0000000100f311c8 reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () (<compiler-generated>:0)
16  libdispatch.dylib                    0x00000001bc0b2610 _dispatch_call_block_and_release + 20
17  libdispatch.dylib                    0x00000001bc0b3184 _dispatch_client_callout + 12
18  libdispatch.dylib                    0x00000001bc05ba3c _dispatch_continuation_pop$VARIANT$mp + 408
19  libdispatch.dylib                    0x00000001bc05b190 _dispatch_async_redirect_invoke + 596
20  libdispatch.dylib                    0x00000001bc067fa4 _dispatch_root_queue_drain + 372
21  libdispatch.dylib                    0x00000001bc068770 _dispatch_worker_thread2 + 124
22  libsystem_pthread.dylib              0x00000001bc102b48 _pthread_wqthread + 208
23  libsystem_pthread.dylib              0x00000001bc105760 start_wqthread + 4
@ganesh-ananthan
Copy link
Author

Can any one from Realm Team check this issue ?

@jsflax
Copy link
Contributor

jsflax commented Oct 23, 2020

Hi @ganesh-ananthan , we'll take a look at this.

@tgoyne
Copy link
Member

tgoyne commented Nov 2, 2020

The exception message says you're getting a VOIP push notification but not establishing a VOIP session within it, and it's not clear to me what that has to do with Realm.

@ganesh-ananthan
Copy link
Author

ganesh-ananthan commented Nov 3, 2020

@tgoyne Yes the straight forward case is VOIP crash, but we have gone through the flow and there could be a reason where the user details from DB might get missed while fetching. Did you got anything wrong on fetching the data case ?

realm::GroupWriter::commit has any issue on that particular version (5.4.1) ?

@jsflax
Copy link
Contributor

jsflax commented Jan 21, 2021

After further investigation, it seems that Realm is not crashing here, and is in fact a VOIP crash.

@jsflax jsflax closed this as completed Jan 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants