-
Notifications
You must be signed in to change notification settings - Fork 586
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
Corrupted tables / database file #4533
Comments
Further, the app may have been close to running out of space (~2gb left). |
@cristianoccazinsp Thanks for reporting this. We will look into the issue. Please let us know is you come upon further information or find a reproduction scenario. |
In the meantime, what's the best option to handle a scenario like this? What can be done to either the database (discarding corrupted tables)? As it is right now, the app is 100% unable to start until re-installed or if the storage gets wiped by the OS. |
Has there been any update regarding this? Any discoveries? |
If the Realm file was created using 10.20.0-beta.3 or earlier, the corruption might be carried forward. If it is the case, I suggest that you delete the Realm file. Your issue has some similarities with #4525. |
The bug report was with I haven't seen other uses with this problem so far, but have you guys figured anything else or any work-around in case this ever happens again? Prompting users to re-install an app is really bad. Would an attempt at copy / delete / rename of the realm file recover the corruption or something? |
@kneth similar user-lock issue but with another crash. We are using This is only a guess, but the schema causing issues is most likely the following. At this point, we are in a situation where the only fix is to have the user re-install and lose all his data.
Further, this started happening after an app update, probably when upgrading realm from a version beta version as well. And the crash log.
Any thoughts on what could this be? Work arounds before recommending app reinstall? Thanks. |
We continue to see some more crashes related to corrupted databases that pretty much locks the user from using the app until a full reinstall. In addition to the above, here's a new one from today.
These all started right after upgrading to In the interim, any work-around or suggestion would also be greatly appreciated. |
@cristianoccazinsp We're investigating this – do you have any other stack traces you could share? |
@tomduncalf for users getting locked with a crash, only the above two traces. We may get more detailed traces once apple sends it to us through XCode. |
@cristianoccazinsp We think it's possible this could be happening on migration. Can you provide any details on your migration strategy? |
Hi @takameyer , We haven't done any migration in a long time, besides w/e is done when the library version changes. This is all the code related to creating/opening the realmdb: |
@cristianoccazinsp The reason for the question is that the stack trace has |
That is strange, we haven't touched the schema definition in a long time, certainly didn't remove indexes, but I will do some more digging to see if an index changed at some point without upgrading the schema version. However, wouldn't that always return in a crash? |
@kneth I can confirm we haven't changed the db schema in the past 10 months, so I'm not sure where's the remove_search_index call coming from. Further, the change that was done 10 months ago was only a new field being added (no indexes). |
@cristianoccazinsp It is an interesting observation. If possible, we would like to get a copy of the Realm file in order to understand how it can trigger the code path in the stack trace. |
Hi @kneth , I don't think we have a good way to extract the database of the user having those persistent crashes, he also already re-installed the app as instructed. How else can I help? Would a local copy of a non-crashing db file work? |
@cristianoccazinsp If you sent us a file, we can run a couple of checks to see if something pops up. Moreover, we can send back what we believe is the schema and you can verify it. Not that I think it will give us much insight into this issue. |
@kneth I sent you the db file in an email. Let me know if you've got it and if you need anything else. |
@cristianoccazinsp Thank you. I have examined the file and replied by email. |
@joze144 Please see my comment |
@joze144 @cristianoccazinsp We have not been able to reproduce the issue. Do you observe the issue recently? |
@kneth i haven’t seen the issue lately. |
@cristianoccazinsp That's great news. I'll close the issue, and you are welcome to either create a new or reopen if it occurs again. |
Description
First time seeing such an error. We've just got a crash report from a user that got the realm database in a state that it cannot start by any means, possibly a corrupted file?
In short {{ await Realm.open}} always fails with an exception and it cannot be recovered from. See below for more info.
Stacktrace & log output
Exception in HostFunction: No such table exists Exception backtrace: 0 zinspector3 0x0000000100d9a03c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 4825812 1 zinspector3 0x0000000100d9a1c8 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 4826208 2 zinspector3 0x0000000100bc0a80 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2886936 3 zinspector3 0x0000000100beea50 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 3075304 4 zinspector3 0x0000000100bee6f8 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 3074448 5 zinspector3 0x0000000100b926ac _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2697540 6 zinspector3 0x0000000100b91b5c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2694644 7 zinspector3 0x0000000100b91824 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2693820 8 zinspector3 0x0000000100bef6d0 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 3078504 9 zinspector3 0x0000000100af73b0 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2061896 10 zinspector3 0x0000000100aa57cc _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 1727076 11 zinspector3 0x0000000100af7604 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 2062492 12 zinspector3 0x00000001009d90c0 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 889688 13 zinspector3 0x00000001009d8e08 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 888992 14 JavaScriptCore 0x000000019f1f67f8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2779128 15 JavaScriptCore 0x000000019f85cffc F956E7A1-BC64-3D00-BE66-B45BD2222110 + 9490428 16 JavaScriptCore 0x000000019f853b10 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 9452304 17 JavaScriptCore 0x000000019f16d390 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2216848 18 JavaScriptCore 0x000000019f16ced4 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2215636 19 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 20 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 21 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 22 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 23 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 24 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 25 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 26 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 27 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 28 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 29 JavaScriptCore 0x000000019f16ce2c F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2215468 30 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 31 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 32 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 33 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 34 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 35 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 36 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 37 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 38 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 39 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 40 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 41 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 42 JavaScriptCore 0x000000019f16ce2c F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2215468 43 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 44 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 45 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 46 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 47 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 48 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 49 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 50 JavaScriptCore 0x000000019f149c88 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2071688 51 JavaScriptCore 0x000000019f777da0 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 8551840 52 JavaScriptCore 0x000000019fa22a20 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 11348512 53 JavaScriptCore 0x000000019f16e730 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2221872 54 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 55 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 56 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 57 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 58 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 59 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 60 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 61 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 62 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 63 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 64 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 65 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 66 JavaScriptCore 0x000000019f16d3a4 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2216868 67 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 68 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 69 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 70 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 71 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 72 JavaScriptCore 0x000000019f16be50 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211408 73 JavaScriptCore 0x000000019f16bda8 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2211240 74 JavaScriptCore 0x000000019f149c88 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2071688 75 JavaScriptCore 0x000000019f777da0 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 8551840 76 JavaScriptCore 0x000000019fa22a20 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 11348512 77 JavaScriptCore 0x000000019f16e730 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2221872 78 JavaScriptCore 0x000000019f149c88 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2071688 79 JavaScriptCore 0x000000019f777da0 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 8551840 80 JavaScriptCore 0x000000019fa22a20 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 11348512 81 JavaScriptCore 0x000000019f149e38 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 2072120 82 JavaScriptCore 0x000000019f777dd0 F956E7A1-BC64-3D00-BE66-B45BD2222110 + 8551888 83 JavaScriptCore 0x000000019f97dbdc _ZN3JSC12profiledCallEPNS_14JSGlobalObjectENS_15ProfilingReasonENS_7JSValueERKNS_8CallDataES3_RKNS_7ArgListE + 156 84 JavaScriptCore 0x000000019f20392c JSObjectCallAsFunction + 648 85 zinspector3 0x00000001009d72b8 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 882000 86 zinspector3 0x00000001009e126c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 922884 87 zinspector3 0x00000001009d39c0 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 867416 88 zinspector3 0x000000010091f2fc _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 128404 89 zinspector3 0x000000010092b630 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 178376 90 zinspector3 0x000000010092b3e4 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 177788 91 CoreFoundation 0x0000000196247608 37A3D601-9398-3DC2-9D00-1B162726A4C9 + 632328 92 CoreFoundation 0x000000019624689c 37A3D601-9398-3DC2-9D00-1B162726A4C9 + 628892 93 CoreFoundation 0x00000001962413dc 37A3D601-9398-3DC2-9D00-1B162726A4C9 + 607196 94 CoreFoundation 0x00000001962407d0 CFRunLoopRunSpecific + 572 95 zinspector3 0x00000001009143c0 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 83544 96 Foundation 0x00000001975fad90 E364C722-33B5-35B0-9A0B-0AFCCB69A18D + 1461648 97 libsystem_pthread.dylib 0x00000001de7fbc74 _pthread_start + 288 98 libsystem_pthread.dylib 0x00000001de800878 thread_start + 8
Can you reproduce a bug?
Not yet
Reproduction Steps
Call
initDatabase
somewhere on app start / root mount, and get the above exception error with the init failure.Version
10.20.0-beta.4
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 14.7.1 - iPhone 7 plus
The text was updated successfully, but these errors were encountered: