Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1696

Stability issues with Realm v. 10.13.0 and 10.16.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Since we upgraded Realm from 10.10.1 => 10.13.0, we have experienced a big drop in stability on iOS and have been hit by what appears to be native memory management issues. Our crash reporting tool (Bugsnag) reports that the iOS app session stability dropped from ~ 99% to ~ 90%. We didn't update any other dependencies (or made any native code changes) in the release where we updated Realm and started seeing these issues. This is what the top crashes looked like with Realm 10.13.0:

      Then we tried upgrading Realm from 10.13.0 => 10.16.0 (again without making changes to other app dependencies or making native code changes) but unfortunately the session stability did not improve. This is what the top crashes look like with Realm after the Realm upgrade to 10.16.0 (sorry about the non-symbolicated traces):

      Both app versions with Realm 10.13.0 and 10.16.0 show realm::NoSuchTable and realm::KeyNotFound crashes. However, the most frequently reported crash comes in the form of a more general SIGABRT error report which it's my understanding could be rooted in any native module. Here's an example stack trace from the reported SIGABRT crash:

      CrashReporter Key:  6d45566d1ac905693d54683d15c5898bf1c38050
      Hardware Model:     iPhone12,5
      Process:            driversnote
      Identifier:         com.driversnote.driversnote
      Version:            4.4.0
      Role:               Background
      OS Version:         iOS 15.4.1
      
      
      SIGABRT: 
      
      0   libsystem_kernel.dylib  ___pthread_kill
      1   libsystem_pthread.dylib _pthread_kill
      2   libsystem_c.dylib       _abort
      [...]
      21  JavaScriptCore          JSC::JSCallbackObject<JSC::JSNonFinalObject>::getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&)
      22  JavaScriptCore          JSC::JSCallbackObject<JSC::JSNonFinalObject>::getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned int, JSC::PropertySlot&)
      23  JavaScriptCore          _llint_slow_path_get_by_val
      24  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      25  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      26  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      27  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      28  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      29  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      30  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      31  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      32  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      33  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      34  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      35  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      36  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      37  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      38  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      39  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      40  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      41  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      42  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      43  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      44  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      45  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      46  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      47  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      48  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      49  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      50  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      51  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      52  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      53  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      54  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      55  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      56  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      57  JavaScriptCore          _vmEntryToJavaScriptTrampoline
      58  JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      59  JavaScriptCore          JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*)
      60  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      61  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      62  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      63  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      64  JavaScriptCore          _vmEntryToJavaScriptTrampoline
      65  JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      66  JavaScriptCore          JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*)
      67  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      68  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      69  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      70  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      71  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      72  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      73  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      74  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      75  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      76  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      77  JavaScriptCore          _vmEntryToJavaScriptTrampoline
      78  JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      79  JavaScriptCore          JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*)
      80  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      81  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      82  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      83  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      84  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      85  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      86  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      87  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      88  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      89  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      90  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      91  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      92  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      93  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      94  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      95  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      96  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      97  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      98  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      99  JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      100 JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      101 JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      102 JavaScriptCore          _vmEntryToJavaScriptTrampoline
      103 JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      104 JavaScriptCore          JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*)
      105 JavaScriptCore          _llint_function_for_construct_arity_checkTagGateAfter
      106 JavaScriptCore          _vmEntryToJavaScriptTrampoline
      107 JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      108 JavaScriptCore          JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*)
      109 JavaScriptCore          _vmEntryToNative
      110 JavaScriptCore          JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      111 JavaScriptCore          JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
      112 JavaScriptCore          _JSObjectCallAsFunction
      [...]
      119 CoreFoundation          ___CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
      120 CoreFoundation          ___CFRunLoopDoBlocks
      121 CoreFoundation          ___CFRunLoopRun
      122 CoreFoundation          _CFRunLoopRunSpecific
      123 driversnote             0x100339374 (0x100339270 + 260) (driversnote)
      124 Foundation              ___NSThread__start__
      125 libsystem_pthread.dylib __pthread_start
      

      Here are a few crash reports retrieved through XCode which mention Realm in the stack trace - they are all from the app version which uses realm v. 10.16.0:
      2022-04-23_11-24-19.2673_-0500-2fd0a5349d21e8624bedea7cadd05249a7ef257e.txt
      2022-04-24_09-49-16.5911_+0800-5d54e08447eada3d190a81ad0583993fbed9e685.txt
      2022-04-24_11-06-35.7773_+0800-1dc9a5cb656aa8f4597272dea4f4e2fd2fe4b7d3.txt
      2022-04-24_11-51-44.3257_-0500-e80fd319087391b20fa73e248a7f66e80b34afa0.txt
      2022-04-24_13-26-48.1968_+0200-00cc3ee3534c38956fa8190f226d1dd5d1a04af5.txt
      2022-04-25_10-50-14.0976_+0200-10370900cb31f02fbe46c189a186c85709ec1532.txt

      We realise that this issue is somewhat vague but unfortunately we haven't yet found a way to reproduce the crashes. Our hope is that some of the attached crash reports will be meaningful for the Realm team and either point to a Realm problem - or to something which we could be doing wrong but which only causes problems in these new realm versions.

      We use Realm with react-native v. 0.65.2 (without Hermes)

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: